Search Results

Search found 31491 results on 1260 pages for 'simple talk'.

Page 48/1260 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • Simple network gaming, client-server architecture planning.

    - by michal
    Hi, I'm coding simple game which I plan to make multiplayer (over the network) as my university project. I'm considering two scenarios for client-server communication: The physics (they're trivial! I should call it "collision tests" in fact :) ) are processed on server machine only. Therefore the communication looks like Client1->Server: Pressed "UP" Server->Clients: here you go, Client1 position is now [X,Y] Client2->Server: Pressed "fire" Server->Clients: Client1 hit Client2, make Client2 disappear! server receives the event and broadcasts it to all the other clients. Client1->Server: Pressed "UP" Server->Clients: Client1 pressed "UP", recalculate his position!! [Client1 receives this one as well!] Which one is better? Or maybe none of them? :)

    Read the article

  • C++ networking simple send and receive

    - by Wallter
    I'm trying to link 10 computers together, the program i would like to write would have one 'control' computer. From what I've looked up this computer would take all the packets sent over the network and do a echo with them... right? The other computers would need to be able to send information (then echoed to the others) to the 'control' ... is there a easy! or simple way to do this? From what I've seen i want a non-blocking socket? I have looked into sockets and such but for an armature programmer like me, this seems like a daunting task :) I'm kind-of looking for an easy class implication that has a send() and an event driven recv(). I'm not going to be sending that much information over the network.

    Read the article

  • PHP Simple XML Parse Attributes

    - by jwzk
    I have an XML file with data stored like this: <myxml> <item name="column18">88744544</item> <item name="column11">47884994</item> <item name="column3">44788894</item> </myxml> I need to first check (and be sure that) column11 is defined (there is no particular order), and then get its value. Using simple XML is not seeming to work too well. I have the following, but the value is missing. <?php if (count($xml->myxml->item) > 0) { foreach ($xml->myxml->item as $item) { var_dump($item->attributes()); } } ?>

    Read the article

  • 3D line plane intersection, with simple plane

    - by clamp
    hello, i have two points in 3D space which have X-coordinates with different signum. so one of them lies definitely on one side of the X-plane and one on the other. now i want to find the intersection of this plane and the line made up by the two points in the most simple and optimized way. i know how to do general line plane intersection, but since in this case the plane is just the x-plane, i think there should be some shortcuts i can take. thanks!

    Read the article

  • Simple Counter issue

    - by TechyDude
    I want to make a very simple counter that increases the value when you click a button. When I click the add button the first time, the number doesn't increase, however I console log the value which increases the result everytime. Any ideas? The fiddle: http://jsfiddle.net/techydude/H63As/ $(function() { var //valueCount = $("counter").value(), counter = $("#counter"), addBtn = $("#add"), value = $("#counter").html(); addBtn.on("click", function() { counter.html(value ++); console.log(value); return }); });

    Read the article

  • Codeigniter: simple form function

    - by Kevin Brown
    I'm stuck writing a simple form...I feel dumb. Here's my controller: function welcome_message(){ //Update welcome message $id = $this->session->userdata('id'); $profile['welcome_message'] = $this->input->post('welcome_message'); $this->db->update('be_user_profiles',$profile, array('user_id' => $id)); } And the html: <?php print form_open('home/welcome_message')?> <input type="checkbox" value="0" checked="false">Don't show me this again</input> <p> <input class="button submit" type="submit" class="close-box" value="Close" /> </p> <?php print form_close()?> Edit I simply need it to submit to a private function and return to the home page (page submitted from).

    Read the article

  • Simple question about C# if else statement

    - by ilkdrl
    Iam doing a simple website and when i press button, i should see weight in label.. i see but if text.maxlenght 6, i should see ERROR message in same label but repeat see weight in label. How can i solve this problem? protected void Button1_Click(object sender, EventArgs e) { double sayi1, sayi2, sayi3, hesap, sonuc; sayi1 = Convert.ToDouble(Tb1.Text); sayi2 = Convert.ToDouble(Tb2.Text); sayi3 = Convert.ToDouble(Tb3.Text); if (Tb1.MaxLength > 6 || Tb2.MaxLength > 6) { lbl1.Text = "ERROR."; } else { hesap = (((sayi1 - ((sayi1 - sayi2) / 2)) * ((sayi1 - sayi2) / 2)) / 40); sonuc = (hesap * sayi3) / 100; lbl1.Text = sonuc.ToString() + "kg"; } }

    Read the article

  • simple putStrLn in Haskell/Yampa with arrows syntax

    - by sisif
    i'm using Haskell with the Yampa FRP library which uses the arrows language extension. how can i do a simple putStrLn in a SF? mySF = proc x -> do y <- identity -< x*x putStrLn "Hello World!" ++ show y returnA -< y the arrow syntax complains about the expression not bein an arrow (of course), but even with arrows i get no output output <- identity -< putStrLn "Hello World!"

    Read the article

  • Measuring the time to create and destroy a simple object

    - by portoalet
    From Effective Java 2nd Edition Item 7: Avoid Finalizers "Oh, and one more thing: there is a severe performance penalty for using finalizers. On my machine, the time to create and destroy a simple object is about 5.6 ns. Adding a finalizer increases the time to 2,400 ns. In other words, it is about 430 times slower to create and destroy objects with finalizers." How can one measure the time to create and destroy an object? Do you just do: long start = System.nanoTime(); SimpleObject simpleObj = new SimpleObject(); simpleObj.finalize(); long end = System.nanoTime(); long time = end - start;

    Read the article

  • Putting a simple if-then statement on one line

    - by Abizern
    I'm just getting into Python and I really like the terseness of the syntax. However; is there an easier way of writing an if-then statement so it fits on one line? For example; say I have the simple test: if count == N: count = 0 else: count = N + 1 is there a simpler way of writing this? I mean, in Objective-C I would write this as: count = count == N ? count = 0 : count = N + 1; Is there something similar for python? Edit I know that in this instance I can use count == count % N. I'm asking about the general syntax.

    Read the article

  • Simple explaination of Arraylists

    - by Jeremy
    I'm new to programming and I'm looking for a simple answer to build my foundation of understanding Arrays. I've used google and searched this site. After a bit of trial and error I get how to make and reference Arrays like thing[3] gets you the fourth thing in the thing array(since 0 is the first). which lets me do something like thing[3].getStupidNumber() to get the StupidNumber of the 4th thing in the thing array. Then I get to ArrayLists which seem to have much more utility but I cant make logical sense of them like Arrays. When i search I cant find this or word this correctly and thus far everything else I've learned clicked easily. so say I make an ArrayList thing with 5 things in it. how do i get to the .getStupidNumber() method inside the fourth thing, if possible? I think if I learn this I can learn the rest on my own. Thanks!

    Read the article

  • Simple Hide/Expand with Javascript

    - by user478419
    I have created a simple expand/hide test script: <html> <head> <script type="type/javascript"><!-- function showHide(elementid){ if (document.getElementById(elementid).style.display == 'none'){ document.getElementById(elementid).style.display = ''; } else { document.getElementById(elementid).style.display = 'none'; } } //--> </script> </head> <body> <div><a href="javascript:showHide('div_1035677');">more...</a></div> <div id="div_1035677" style="display:none"> HIDDEN CONTENT </div> </body> </html> I get an error message that I can't make any sense of (Object expected on line one). I don't see any errors in the above code. :-(

    Read the article

  • Could You Quickly Test a Web Page in Apples Safari 3 [Simple Pass:Fail]

    - by Jay
    I am not fortunate to have access to Apple Safari 3.0 [which has a WebKit version < 525]. Would someone kindly test a Web page for me, it will return your userAgent string and a simple pass:fail. In WebKit versions < 525.… [<= Apple Safari 3.0] it should fail and = 525.… [= Apple Safari 3.1] it should pass. I appreciate all your help, all you have to post is if the Web page, on the second line, says pass or fail, please. Kind regards! To test: http://80etc.com/test.html

    Read the article

  • jQuery: How to collect values from sliders into simple object with id as keys

    - by Svish
    I have several jQuery UI Sliders and I want to collect their values. Thought it would be a simple task, but when I was going to do it I got stuck and not quite sure what to do anymore :p The object I would like to end up with should look something like this: { a: 80, b: 90, c: 20, ... } I can do it manually like this: var values = { a: $('#a').slider('value'), b: $('#b').slider('value'), c: $('#c').slider('value'), ... }; But that's a bit tedious, especially if I need to add or remove or rename. Was hoping I could do something with the map or each function or something like that, but I can't figure it out. Anyone have some clever ideas?

    Read the article

  • Organization of simple project.

    - by Neir0
    Hi I want to create a simple mvc application. It's typical task and very simular with phpmyadmin. I have a table and a few operations delete, edit, create new row. Name Gender Age [delete] [edit] Alex Male 20 [delete] [edit] Elza Female 23 [New person] When edit or New person clicked by user application show the following page Name [........] Gender [........] Age [........] [Save] I'm very new in asp.net and mvc, can anyone suggest a right project organization or give links to simular applications?

    Read the article

  • Solution for distributing MANY simple network tasks?

    - by EmpireJones
    I would like to create some sort of a distributed setup for running a ton of small/simple REST web queries in a production environment. For each 5-10 related queries which are executed from a node, I will generate a very small amount of derived data, which will need to be stored in a standard relational database (such as PostgreSQL). What platforms are built for this type of problem set? The nature, data sizes, and quantities seem to contradict the mindset of Hadoop. There are also more grid based architectures such as Condor and Sun Grid Engine, which I have seen mentioned. I'm not sure if these platforms have any recovery from errors though (checking if a job succeeds). What I would really like is a FIFO type queue that I could add jobs to, with the end result of my database getting updated. Any suggestions on the best tool for the job?

    Read the article

  • Good simple C/C++ FTP and SFTP client library recommendation for embedded Linux

    - by Roman Nikitchenko
    Could anyone recommend FTP / SFTP client C/C++ library for Linux-based embedded system? I know about Curl library but I need something as simple as possible just to download files from FTP / SFTP servers. Is there any recommendation to look for? Yes, SFTP support is critical. Actually I can even sacrifice multi-threading because I need only one stream at a time. And I'd like it to be able to work through memory buffers but this should be not a problem. Thank you in advance.

    Read the article

  • Simple addition calculator in python

    - by Krysten
    I built a very simple addition calculator in python: #This program will add two numbers entered in by the user print "Welcome!" num1 = input("Please enter in the first number to be added.") num2 = input("Please enter in the second number to be added.") sum = num1 + num2 print "The sum of the two numbers entered is: ", sum I haven't setup python yet, so I'm using codepad.org (an online compiler). I get the following error: Welcome! Please enter in the first number to be addeded.Traceback (most recent call last): Line 5, in num1 = input("Please enter in the first number to be addeded.") EOFError

    Read the article

  • A simple string array Iteration in C# .NET doesn't work

    - by met.lord
    This is a simple code that should return true or false after comparing each element in a String array with a Session Variable. The thing is that even when the string array named 'plans' gets the right attributes, inside the foreach it keeps iterating only over the first element, so if the Session Variable matches other element different than the first one in the array it never returns true... You could say the problem is right there in the foreach cicle, but I cant see it... I've done this like a hundred times and I can't understand what am I doing wrong... Thank you protected bool ValidatePlans() { bool authorized = false; if (RequiredPlans.Length > 0) { string[] plans = RequiredPlans.Split(','); foreach (string plan in plans) { if (MySessionInfo.Plan == plan) authorized = true; } } return authorized; }

    Read the article

  • simple assignment not working for me: iphone sdk

    - by tak
    Hi all. Can someone please explain to me why this simple assignment doesn't work. Here is the code loanDetails.currency = myCurrency; NSLog(@" Value %@",myCurrency); NSLog(@" Value %@",loanDetails.currency); NSLog(@" Value %@",myCurrency); the output is:- 2010-05-05 23:00:44.394 ExpenseTracker[3576:207] Value AFA 2010-05-05 23:00:44.750 ExpenseTracker[3576:207] Value (null) 2010-05-05 23:00:45.095 ExpenseTracker[3576:207] Value AFA And the definition is as: @property (nonatomic,retain) NSString *currency;

    Read the article

  • How to add a clickable button to either parent or child of simple expandablelist in android

    - by Henna
    I have created an application for a simple expandablelist. In the code i am displaying some textviews in the child . I am able to add a button in the child of the expandable list. But the problem I am facing is with the onclick event of the button.Since I am creating the button inside onChildClick(), the button appears, but its onclick event dosent take place. I also tried adding the button with its onclick event in the group as well, but I am facing similar problem there also. If anyone could help , it would be greatly appreciated. Thanks in advance, HM

    Read the article

  • Laying out JPanels to make a simple GUI

    - by Elvis
    Hello, first of all, this is more or less my first GUI and ive learned Java for not more then a week, so it might contain some serious programming errors. What i have right now is: Buttons and labels are part of OptionPanel and are on the left, DrawingPanel is about 5x5 px in size and is on the right. What I am trying to do is a simple test, to get me more familiar with the GUI. The rectangle should be movable and re-sizeable by the user when clicking the respective buttons: http://www.upload.ee/image/612005/JFrame2.jpg Right now i have: JFrame MainFrame - Makes JFrame (Not using the setSize function. using .pack() instead. not sure about it) JPanel MergedPanel - FlowLayout - Adds JPanel OptionsPanel and JPanel DrawingPanel together and gets injected to JFrame MainFrame JPanel DrawPanel - This JPanel is responsible of drawing the rectangle. JPanel OptionPanel - FlowLayout - This JPanel is responsible of the buttons. Help please.

    Read the article

  • How to make simple mathematical operations and displaying the result in a textbox

    - by Audel
    Hi, I know is a rather simple question but I just can't find an appropriate example in google or anywhere. I've got this piece int numberOfPlays = int.Parse(textBox2.Text); numberOfPlays = (numberOfPlays++); textBox2.Text = (numberOfPlays.ToString()); MessageBox.Show(numberOfPlays.ToString()); So basically what I want to do is to get the value of the textBox2, make it an integer and then add 1 to it. I can't think of any more details right now, so if i'm not clear enough please ask Thanks in advance

    Read the article

  • Approximate photo of a simple drawing using lines

    - by user3704596
    As an input I have a photo of a simple symbol, e.g.: https://www.dropbox.com/s/nrmsvfd0le0bkke/symbol.jpg I would like to detect the straight lines in it, like points of start and ends of the lines. In this case, assuming the top left of the symbol is (0,0), the lines would be defined like this: start end (coordinates of beginning and end of a line) 1. (0,0); (0,10) (vertical line) 2. (0,10); (15, 15) 3. (15,15); (0, 20) 4. (0,20); (0,30) How can I do it (pereferably using OpenCV)? I though about Hough lines, but they seem to be good for perfect thin straight lines, which is not the case in a drawing. I'll probably work on binarized image, too.

    Read the article

  • Some Simple Questions for knowledge?

    - by dhaliwaljee
    Before Some days my friend ask me some simple questions, but I have no answer. Please tell me about these questions. How many computer programming languages are used all in the world ? I want to create a language like 'java or c#'. What is the procedure for creating a language and how it will create? Which language is used for manipulate Window operating system? What is the procedure of create Operating System like Windows/Linux/Mac and in which language it should create? What is the procedure of create open source framework project in javascript and php?

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >