Search Results

Search found 185 results on 8 pages for 'd joke'.

Page 1/8 | 1 2 3 4 5 6 7 8  | Next Page >

  • Why do "Joke" programming languages exist? [closed]

    - by ThePlan
    First of all please be aware this post contains some abusive language but I hope it will not bother anyone. I apologize for the bad language but that's what the name is. As I've been doing documentation on existing programming languages attempting to make a complete list of them I stumbled across terrible programming languages, which were clearly not made for actual use and implementation due to their insane difficulty. Languages such as Brainfu*k and LOLCODE or Whitespace are fool languages because they have no real use. For example, a "Hello world" program written in BrainFu*k. Taken from Wikipedia: The following program prints "Hello World!" and a newline to the screen: +++++ +++++ initialize counter (cell #0) to 10 [ use loop to set the next four cells to 70/100/30/10 > +++++ ++ add 7 to cell #1 > +++++ +++++ add 10 to cell #2 > +++ add 3 to cell #3 > + add 1 to cell #4 <<<< - decrement counter (cell #0) ] > ++ . print 'H' > + . print 'e' +++++ ++ . print 'l' . print 'l' +++ . print 'o' > ++ . print ' ' << +++++ +++++ +++++ . print 'W' > . print 'o' +++ . print 'r' ----- - . print 'l' ----- --- . print 'd' > + . print '!' > . print '\n' or another example taken from LOLCODE language: HAI CAN HAS STDIO? PLZ OPEN FILE "LOLCATS.TXT"? AWSUM THX VISIBLE FILE O NOES INVISIBLE "ERROR!" KTHXBYE These languages are very difficult to learn/read/work with. My question is - Why do they exist? What is the purpose of them? Also, is there an official "name" for these type of languages?

    Read the article

  • What's Your Favorite Harmless Computer Practical Joke?

    - by Ben Griswold
    A couple of months ago, I returned from lunch to find that typing any key launched a random application. As I always lock my machine before walking away from it, my first thought was that a co-worker was playing a practical joke on me. As it turned out, the cause was random computer wonkiness. But just in case there's a need :), what's your favorite harmless computer practical joke? For example, would you alter host file entries to direct google.com to a random site or would you put tape over the optical sensor of a co-worker’s mouse?

    Read the article

  • Translate binary joke to ASCII

    - by Nix
    I found this cartoon is a binary joke and have been trying to translate! I got the binary from the GIF, but I can't find out how to translate to ASCII... 10001 11011 11 1011 01 01001 11011 0111011 01 100101 10 01111 01 100101 10 01111 01 01001 11011 0111011 01 10001 11011 11 1011 01 10001 11011 11 1011 01 01001 11011 0111011 01 100101 10 01111 01 100101 10 01111 01 01001 11011 0111011 01 1001 11011 11 1011 01 01101 Any help translating would be great.

    Read the article

  • 2010 April Fools Joke

    - by Dane Morgridge
    I started at my current job at the end of March last year and there were some pretty funny April fools jokes.  Nothing super crazy, but pretty funny.  One guy came in and there was a tree in his cube.  We (me and the rest of my team) were planning for a couple of weeks on what we could do that would be just awesome.  We had a lot of really good ideas but nothing was spectacular.  Then Steve Andrews had a brilliant idea (yes it's true).  Since we have internal DNS servers we could redirect DNS to our internal servers for a site such as cnn.com.  Then we would lift the code from the site and create our own home page that would contain news about people in the company.  Steve was actually laughing so hard when he thought of the idea that it took him almost 30 minutes to spit it out. I thought, "this is perfect". I had enlisted a couple of people to help come up with the stories and at the same time we were trying to figure out how to get everybody to the site the morning of the 1st.  Then it hit me.  We could have the main article be one of my getting picked up by the FBI on hacking charges.  Then Chris (my boss) could send an email out telling everyone that I would not be there today and direct them to the site.  That would for sure get everyone to go to cnn.com first thing and see our prank.  I begun the process of looking for photos I could crop myself into and found the perfect one.  Then my wife took a good pic with our Canon 40D and I went to work.  The night before I didn't have any other stories due to everyone being really busy at work, but I decided to go ahead with just the FBI bust on it's own.  I got everything working and tested and coordinated with Chris for me to come in late so no one would see me at the office until after everyone had seen the joke. And so the morning of April fools came and I was waiting at home and the email was perfect.  Chris told everyone that I wouldn't be in and that not to answer any questions if you got any calls from anybody.  The Photoshop job I did was not perfect, but good enough and I even wrote an article with it that went into more detail about how I had been classified as a terrorist and all kinds of stuff. People at work started getting the emails and a few people didn't realize it was a joke (as I had hoped), including some from senior management (one person in particular who shall remain nameless in this post).  Emails started flying around about how to contain the situation and how to handle bad PR.  He basically bought it hook, line and sinker and then went in to crisis mode.  It was awesome! He did finally realize it was a joke and I will likely print and frame the email he sent out.  In short, April fools this year was a huge success.

    Read the article

  • RIM's current BB7 developer toolset is a joke

    - by mbrit
    tl;dr - RIM's current developer toolset is not fit for purpose.Background to this is that I'm currently working on a PhoneGap/Cordova project for a client that has to run on BlackBerry. The tooling is so ridiculous to use that even though I had a gentle dig at them in a Guardian piece it's worth having a more full-on attack.At the moment, RIM's pitch is that apps are built for the current BBOS7 devices using WebWorks. This is an HTML-based toolset. Essentially a browser is spun up in a native app container and your app is powered by JavaScript. Specific JavaScript libraries exist that thunk down to native capabilities no the device. I happen to use PhoneCap/Cordova in combination with this.The tooling is non-existent. I'm using TextMate, Ant, and Terminal to develop the app. There's no "console.log" output, and no debugging. The only way to instrument the app is to put "alert" calls in your code.Apart from the fact that that's *not* fine in 2012, how about this… every time you deploy a new app to the device, the device has to reboot. This process takes six minutes on a relatively modern BlackBerry device. How about this as well - in order to get a file into the package it has to be signed. My small app over here has 100 different files (75 or so generated). Signing doesn't happen locally, it happens on RIM's servers in Waterloo. Thus whenever you deploy the app you have this utility have to call RIM's servers 100 times. More to the point, sometimes during the day these servers have "micro-downtime" moments where they're unreachable for five or ten minutes, normally two or three times a day. Oh yes, you'll also get an email sent to you per signing on success or failure. 100 inbound emails, per deployment.(I started this post at the beginning of one of these cycles, by the way. That's how long it takes to build and deploy *once*. By the way, the change I made didn't work.)To clarify:* Change the script,* Build it using Ant,* Ant will spin up a Java app that talks to RIM's servers to sign it.* Receive 100 emails, assuming the server is up.* App deployed - takes about 30 seconds.* BlackBerry device restarts - takes about six minutes.* Find and open the app. Go through security prompts.* Test the app, with no "console.log" output and no debugger."Why not use the simulator?" I hear you ask. Well, apart from the fact that the simulator refused to reach any network service over HTTPS that I happen to own? (Some people suggest changing DNS settings for this known issue.) Admittedly, the simulator does show you console.log, but you still have the "six minute" restart issue on the simulator.Developers will understand this problem. Breaking concentration for six-plus minutes every time you want to deploy an app turns developing into a nightmare. Combining that with no worthy debugging tools turns the toolset into a joke.

    Read the article

  • Java's Object.wait method with nanoseconds: Is this a joke or am I missing something

    - by Krumia
    I was checking out the Java API source code (Java 8) just out of curiosity. And I found this in java/lang/Object.java. There are three methods named wait: public final native void wait(long timeout): This is the core of all wait methods, which has a native implementation. public final void wait(): Just calls wait(0). And then there is public final void wait(long timeout, int nanos). The JavaDoc for the particular method tells me that, This method is similar to the wait method of one argument, but it allows finer control over the amount of time to wait for a notification before giving up. The amount of real time, measured in nanoseconds, is given by: 1000000*timeout+nanos But this is how the methods achieves "finer control over the amount of time to wait": if (nanos >= 500000 || (nanos != 0 && timeout == 0)) { timeout++; } wait(timeout); So this method basically does a crude rounding up of nanoseconds to milliseconds. Not to mention that anything below 500000ns/0.5ms will be ignored. Is this piece of code bad/unnecessary code, or am I missing some unseen virtue of declaring this method, and it's no argument cousin as the way they are?

    Read the article

  • I don't get this C/C++ Joke

    - by Buttercup
    After reading this article on thedailywtf.com, I'm not sure that I really got the joke. It says there that some guy changed the code from int function() { int x; char data_string[15]; ... x = 2; strcpy(data_string,"data data data"); ... } to int function() { int x = 2; char data_string[15] = "data data data"; ... } everywhere in the code and that for some reason did inflate the size of the executable from 1 to 2 CDs (or maybe it didn't do that?). Obviously I'm not familiar enough with C/C++ to get this joke, but what seems strangest is that the 2nd code listing seems "cleaner"—at least from what I've been told in school (that is that initializing variables is a good thing, not a bad one).

    Read the article

  • What is your best programmer joke?

    - by hmason
    When I teach introductory computer science courses, I like to lighten the mood with some humor. Having a sense of fun about the material makes it less frustrating and more memorable, and it's even motivating if the joke requires some technical understanding to 'get it'! I'll start off with a couple of my favorites: Q: How do you tell an introverted computer scientist from an extroverted computer scientist? A: An extroverted computer scientist looks at your shoes when he talks to you. And the classic: Q: Why do programmers always mix up Halloween and Christmas? A: Because Oct 31 == Dec 25! I'm always looking for more of these, and I can't think of a better group of people to ask. What are your best programmer/computer science/programming jokes?

    Read the article

  • T-SQL Jokes

    - by Tomaz.tsql
    SQL Table walks to a psychiatrist dr. Index Table: "Doctor, I have a problem" Dr: "what kind a problem?" Table: "I'm a mess. I have things all over the place, i always look for my stuff" Dr. "No problem. I will get you in order". Index and table are reading a book "index-sutra" Table: Oh, baby tonight we can try a clustered position" Index: "yeah baby, we can also try covered position" Table: "or maybe multiple clustered position"...(read more)

    Read the article

  • Amusing or Sad? Network Solutions

    - by dbasnett
    When I got sick my email ended up in every drug sellers email list. Some days I get over 200 emails selling everything from Viagra to Xanax. Either they don't know what my condition is or they are telling me you are a goner, might as well chill-ax and have a good time. In order to cut down on the mail being downloaded I thought I would add all of the Junk email senders from Outlook to my Network Solution mail server. Much to my amazement I could not find that import Spammers button, so I submitted a tech support request. Here is the response: Thank you for contacting Network Solutions Customer Service Department. We are committed to creating the best Customer experience possible. One of the first ways we can demonstrate our commitment to this goal is to quickly and efficiently handle your recent request. We apologize for any inconvenience this might have caused you. With regard to your concern, please be advised that we cannot import blocked senders in to you e-mail servers. An alternative option is for you to create a Custom Filter that filters unwanted e-mails. To create a Custom Filter: Open a Web browser (e.g., Netscape, Microsoft Internet Explorer, etc.). Type mail.[domain name].[ext] in the address line. Login to your Network Solutions email account. Click on the Configuration left menu tab. Click on the Custom Filter link. Type the rule name. blah, blah, blah Basically add them one at a time. "We are committed to creating the best Customer experience possible." No you are not. You are trying to squeeze every nickle you can out of me. "With regard to your concern, please be advised that we cannot import blocked senders in to you e-mail servers." Maybe I should apply for a job to write those ten complicated lines of code... Maybe I should question my choice of vendors, because if they truly "cannot" then they are to stupid to have my business. It is both amusing and sad. I'll be posting this in every forum I am a member of.

    Read the article

  • Amusing or Sad? Network Solutions

    - by dbasnett
    When I got sick my email ended up in every drug sellers email list. Some days I get over 200 emails selling everything from Viagra to Xanax. Either they don't know what my condition is or they are telling me you are a goner, might as well chill-ax and have a good time. In order to cut down on the mail being downloaded I thought I would add all of the Junk email senders from Outlook to my Network Solution mail server. Much to my amazement I could not find that import Spammers button, so I submitted a tech support request. Here is the response: Thank you for contacting Network Solutions Customer Service Department. We are committed to creating the best Customer experience possible. One of the first ways we can demonstrate our commitment to this goal is to quickly and efficiently handle your recent request. We apologize for any inconvenience this might have caused you. With regard to your concern, please be advised that we cannot import blocked senders in to you e-mail servers. An alternative option is for you to create a Custom Filter that filters unwanted e-mails. To create a Custom Filter: Open a Web browser (e.g., Netscape, Microsoft Internet Explorer, etc.). Type mail.[domain name].[ext] in the address line. Login to your Network Solutions email account. Click on the Configuration left menu tab. Click on the Custom Filter link. Type the rule name. blah, blah, blah Basically add them one at a time. "We are committed to creating the best Customer experience possible." No you are not. You are trying to squeeze every nickle you can out of me. "With regard to your concern, please be advised that we cannot import blocked senders in to you e-mail servers." Maybe I should apply for a job to write those ten complicated lines of code... Maybe I should question my choice of vendors, because if they truly "cannot" then they are to stupid to have my business. It is both amusing and sad. I'll be posting this in every forum I am a member of.

    Read the article

  • What Counts for A DBA - Logic

    - by drsql
    "There are 10 kinds of people in the world. Those who will always wonder why there are only two items in my list and those who will figured it out the first time they saw this very old joke."  Those readers who will give up immediately and get frustrated with me for not explaining it to them are not likely going to be great technical professionals of any sort, much less a programmer or administrator who will be constantly dealing with the common failures that make up a DBA's day.  Many of these people will stare at this like a dog staring at a traffic signal and still have no more idea of how to decipher the riddle. Without explanation they will give up, call the joke "stupid" and, feeling quite superior, walk away indignantly to their job likely flipping patties of meat-by-product. As a data professional or any programmer who has strayed  to this very data-oriented blog, you would, if you are worth your weight in air, either have recognized immediately what was going on, or felt a bit ignorant.  Your friends are chuckling over the joke, but why is it funny? Unfortunately you left your smartphone at home on the dresser because you were up late last night programming and were running late to work (again), so you will either have to fake a laugh or figure it out.  Digging through the joke, you figure out that the word "two" is the most important part, since initially the joke mentioned 10. Hmm, why did they spell out two, but not ten? Maybe 10 could be interpreted a different way?  As a DBA, this sort of logic comes into play every day, and sometimes it doesn't involve nerdy riddles or Star Wars folklore.  When you turn on your computer and get the dreaded blue screen of death, you don't immediately cry to the help desk and sit on your thumbs and whine about not being able to work. Do that and your co-workers will question your nerd-hood; I know I certainly would. You figure out the problem, and when you have it narrowed down, you call the help desk and tell them what the problem is, usually having to explain that yes, you did in fact try to reboot before calling.  Of course, sometimes humility does come in to play when you reach the end of your abilities, but the ‘end of abilities’ is not something any of us recognize readily. It is handy to have the ability to use logic to solve uncommon problems: It becomes especially useful when you are trying to solve a data-related problem such as a query performance issue, and the way that you approach things will tell your coworkers a great deal about your abilities.  The novice is likely to immediately take the approach of  trying to add more indexes or blaming the hardware. As you become more and more experienced, it becomes increasingly obvious that performance issues are a very complex topic. A query may be slow for a myriad of reasons, from concurrency issues, a poor query plan because of a parameter value (like parameter sniffing,) poor coding standards, or just because it is a complex query that is going to be slow sometimes. Some queries that you will deal with may have twenty joins and hundreds of search criteria, and it can take a lot of thought to determine what is going on.  You can usually figure out the problem to almost any query by using basic knowledge of how joins and queries work, together with the help of such things as the query plan, profiler or monitoring tools.  It is not unlikely that it can take a full day’s work to understand some queries, breaking them down into smaller queries to find a very tiny problem. Not every time will you actually find the problem, and it is part of the process to occasionally admit that the problem is random, and everything works fine now.  Sometimes, it is necessary to realize that a problem is outside of your current knowledge, and admit temporary defeat: You can, at least, narrow down the source of the problem by looking logically at all of the possible solutions. By doing this, you can satisfy your curiosity and learn more about what the actual problem was. For example, in the joke, had you never been exposed to the concept of binary numbers, there is no way you could have known that binary - 10 = decimal - 2, but you could have logically come to the conclusion that 10 must not mean ten in the context of the joke, and at that point you are that much closer to getting the joke and at least won't feel so ignorant.

    Read the article

  • Append to a file in Java. Is it a joke?

    - by Roman
    I need to append some data to existing file. I started to browse Internet to find out how to do it. And I found this mini (as they say) application to do that: http://www.devdaily.com/java/edu/qanda/pjqa00009.shtml Well I was already annoyed by the fact how complicated are things in Java (in comparison with Python, for example). But this is too much! I just want to add to a file! It should be one line! Not 50! Or do I get something wrong?

    Read the article

  • Parsing error when using getSearchResultsForQuery of MGTwitterEngine

    - by deep8981
    Hi everyone I am doing a search using getSearchResultsForQuery method and i get searchresult too but when i try to print the parsed data i dont get text of all the tweets i am doing this [twitterEngine getSearchResultsForQuery:@"#joke" sinceID:twitterUserId startingAtPage:1 count:5]; and below is the result in console and it shows that i do get data properly but after parsing it does not parse properly.I have not done any change in parsing can anyone say why i am getting this? {"results":[{"profile_image_url":"http://a1.twimg.com/profile_images/580724970/pro_normal.jpg","created_at":"Wed, 21 Apr 2010 19:06:52 +0000","from_user":"Kousani","metadata":{"result_type":"recent"},"to_user_id":null,"text":"#ipl3 has hit hard all other General Entertainment Channels. If this continues every year, may be I will learn play cricket! :D #joke","id":12592706500,"from_user_id":13391246,"geo":null,"iso_language_code":"en","source":"<a href="http://www.tweetdeck.com" rel="nofollow">TweetDeck</a>"},{"profile_image_url":"http://a3.twimg.com/profile_images/815058343/iphone_1_059_normal.JPG","created_at":"Wed, 21 Apr 2010 19:00:59 +0000","from_user":"anamou","metadata":{"result_type":"recent"},"to_user_id":null,"text":"comedyclipsblog: Recent research has shown that six out of seven dwarves aren't happy #joke","id":12592456010,"from_user_id":7635571,"geo":null,"iso_language_code":"en","source":"<a href="http://echofon.com/" rel="nofollow">Echofon</a>"},{"profile_image_url":"http://a1.twimg.com/profile_images/636112472/Jane_New_normal.jpg","created_at":"Wed, 21 Apr 2010 18:55:49 +0000","from_user":"janeprinsep","metadata":{"result_type":"recent"},"to_user_id":20741695,"text":"@grahamtcousins DON'T DOOOOOOO ITTTTT!!!!! #joke","id":12592234721,"from_user_id":74969091,"to_user":"grahamtcousins","geo":null,"iso_language_code":"en","source":"<a href="http://www.tweetdeck.com" rel="nofollow">TweetDeck</a>"},{"profile_image_url":"http://a1.twimg.com/profile_images/779334170/sander_normal.jpg","created_at":"Wed, 21 Apr 2010 18:53:55 +0000","from_user":"SndR22","metadata":{"result_type":"recent"},"to_user_id":null,"text":"RT @MocroDeluxe: Willen jullie lachen?- kom met een #joke dan!","id":12592155790,"from_user_id":85863646,"geo":null,"iso_language_code":"nl","source":"<a href="http://ubertwitter.com" rel="nofollow">UberTwitter</a>"},{"profile_image_url":"http://a1.twimg.com/profile_images/513318990/1257454275_package_toys_normal.png","created_at":"Wed, 21 Apr 2010 18:53:33 +0000","from_user":"Fun_Jokes_Video","metadata":{"result_type":"recent"},"to_user_id":null,"text":"#joke What's Clintons new nick name?: Q. What's Clintons new nick name?\nA. Drippy Dick http://bit.ly/bZWSlJ","id":12592141067,"from_user_id":76430125,"geo":null,"iso_language_code":"en","source":"<a href="http://twitterfeed.com" rel="nofollow">twitterfeed</a>"}],"max_id":12592706500,"since_id":47543983,"refresh_url":"?since_id=12592706500&q=%23joke","next_page":"?page=2&max_id=12592706500&rpp=5&q=%23joke","results_per_page":5,"page":1,"completed_in":0.039389,"warning":"since_id removed for pagination.","query":"%23joke"} 2010-04-22 00:45:53.319 Twitter-Facebook[2090:20b] Got search results for FF1D610A-499C-41B6-B0BA-5D94989F9CF0: ( { "created_at" = 1271876812; "from_user" = Kousani; "profile_image_url" = "http://a1.twimg.com/profile_images/580724970/pro_normal.jpg"; "result_type" = recent; "source_api_request_type" = 35; }, { "created_at" = 1271876459; "from_user" = anamou; "profile_image_url" = "http://a3.twimg.com/profile_images/815058343/iphone_1_059_normal.JPG"; "result_type" = recent; "source_api_request_type" = 35; }, { "created_at" = 1271876149; "from_user" = janeprinsep; "profile_image_url" = "http://a1.twimg.com/profile_images/636112472/Jane_New_normal.jpg"; "result_type" = recent; "source_api_request_type" = 35; }, { "created_at" = 1271876035; "from_user" = SndR22; "profile_image_url" = "http://a1.twimg.com/profile_images/779334170/sander_normal.jpg"; "result_type" = recent; "source_api_request_type" = 35; }, { "created_at" = 1271876013; "from_user" = "Fun_Jokes_Video"; "profile_image_url" = "http://a1.twimg.com/profile_images/513318990/1257454275_package_toys_normal.png"; "result_type" = recent; "source_api_request_type" = 35; }, { "completed_in" = 0; "from_user_id" = 76430125; geo = ; id = 12592141067; "iso_language_code" = en; "max_id" = 12592706500; "next_page" = "?page=2&max_id=12592706500&rpp=5&q=%23joke"; page = 1; query = "%23joke"; "refresh_url" = "?since_id=12592706500&q=%23joke"; "results_per_page" = 5; "since_id" = 47543983; source = "twitterfeed"; "source_api_request_type" = 35; text = "#joke What's Clintons new nick name?: Q. What's Clintons new nick name?\nA. Drippy Dick http://bit.ly/bZWSlJ"; "to_user" = grahamtcousins; "to_user_id" = ; warning = "since_id removed for pagination."; } ) 2010-04-22 00:45:53.320 Twitter-Facebook[2090:20b] TEXT is #joke What's Clintons new nick name?: Q. What's Clintons new nick name? A. Drippy Dick http://bit.ly/bZWSlJ

    Read the article

  • Best SEO Services Provider

    People who decided in time to become an SEO services provider are having the time of their life. They are having 6 digit incomes without having too much fuss about it. All they do is to post some text here and there on the internet and then they let that text do the job for them. You must be saying that it is some kind of a joke, but no my friend. It is not a joke.

    Read the article

  • How do I show TextView's in LinearLayout that layed on other Layout?

    - by gelassen
    Good day. I have three layouts: first is the root, second and third lie in first. I try add TextView object in third layout and objects had been added in third layout (I saw it in debage mode) but this objects didn't showed on screen. May be someone know where is the problem? <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/addJokeButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/app_name" /> <EditText android:id="@+id/newJokeEditText" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> </LinearLayout> </LinearLayout> protected void initLayout() { setContentView(R.layout.advanced); LinearLayout linearLayout = (LinearLayout) getLayoutInflater().inflate( R.layout.advanced, null); m_vwJokeEditText = (EditText) findViewById(R.id.newJokeEditText); m_vwJokeButton = (Button) findViewById(R.id.addJokeButton); m_vwJokeLayout = (LinearLayout) linearLayout.getChildAt(1); } protected void addJoke(Joke joke) { m_arrJokeList.add(joke); LayoutParams lparams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); TextView textView = new TextView(this); setColor(textView); textView.setLayoutParams(lparams); textView.setText(joke.getJoke()); m_vwJokeLayout.addView(textView); }

    Read the article

  • CFSocketConnectToAddress and unrecognized selector sent to instance

    - by madmik3
    Hello, I am somewhat new to iPhone dev and I have been getting unrecognized selector when I call CFSocketConnectToAddress in this code. I think it might be something basic that I am doing wrong. Any idea? this is the complete error I get. NSInvalidArgumentException unrecognized selector sent to instance 0x3922170 0x3922170 is the calling class. - (BOOL)connect { CFSocketRef mySocket = CFSocketCreate(kCFAllocatorDefault, PF_INET, SOCK_DGRAM,IPPROTO_UDP, 0, socketCallback, NULL); @try { CFDataRef data = (CFDataRef)[_netService addresses]; CFSocketConnectToAddress(mySocket, data, 500); } @catch (NSException * e) { NSLog([e name]); NSLog([e reason]); } //char joke[] = "Why did the chicken cross the road?"; //CFSocketError err = CFSocketSendData(mySocket, joke, (strlen(joke)+1), 10); return true; } void socketCallback ( CFSocketRef s, CFSocketCallBackType callbackType, CFDataRef address, const void *data, void *info) { }

    Read the article

  • Getting random objects from an array, and if the objects are the same, get a new object.

    - by XcodeDev
    Hi, I have made a jokes application, where the user generates a joke and the joke will display in a UILabel. However I am trying to randomise the jokes show, but I do not want to show the same joke twice. Please could you tell me how I could do this. I am using the code below to try and do that, but it seems that it is not working. - (IBAction)generateNewJoke { if (i < [jokeArray count]) { i++; [userDefaults setInteger:[userDefaults integerForKey:kNewIndex] forKey:kOldIndex]; int oldnumber = [userDefaults integerForKey:kOldIndex]; int newnumber = [userDefaults integerForKey:kNewIndex]; [answerLabel setText:@""]; [userDefaults setInteger:i forKey:kNewIndex]; if (oldnumber == newnumber) { NSLog(@"they are the same"); [userDefaults setInteger:arc4random()%[jokeArray count] forKey:kNewIndex]; } [jokeLabel setText:[jokeArray objectAtIndex:[userDefaults integerForKey:kNewIndex]]]; } }

    Read the article

  • Has RFC2324 been implemented?

    - by anthony-arnold
    I know RFC2324 was an April Fools joke. However, it seems pretty well thought out, and after reading it I figured it wouldn't be out of the question to design an automated coffee machine that used this extension to HTTP. We programmers love to reference this RFC when arguing web standards ("418 I'm a Teapot lolz!") but the joke's kind of on us. Ubiquitous computing research assumes that network-connected coffee machines are probably going to be quite common in the future, along with Internet-connected fruit and just about everything else. Has anyone actually implemented a coffee machine that is controlled via HTCPCP? Not necessarily commercial, but hacked together in a garage, maybe? I'm not talking about just a web server that responds to HTCPCP requests; I mean a real coffee machine that actually makes coffee. I haven't seen an example of that.

    Read the article

1 2 3 4 5 6 7 8  | Next Page >