Search Results

Search found 2312 results on 93 pages for 'whats your favourite'.

Page 65/93 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • networkstream always empty!

    - by ALEX
    hey I'm writing on an Server-Client program but when my client sends something, it never reaches my server! I'm sending like this: public void Send(string s) { char[] chars = s.ToCharArray(); byte[] bytes = chars.CharToByte(); nstream.Write(bytes, 0, bytes.Length); nstream.Flush(); } and Receiving in a background thread like this void CheckIncoming(object dd) { RecievedDelegate d = (RecievedDelegate)dd; try { while (true) { List<byte> bytelist = new List<byte>(); System.Threading.Thread.Sleep(1000); int ssss; ssss = nstream.ReadByte(); if (ssss > 1) { System.Diagnostics.Debugger.Break(); } if (bytelist.Count != 0) { d.Invoke(bytelist.ToArray()); } } } catch (Exception exp) { MSGBOX("ERROR:\n" + exp.Message); } } the ssss int is never 1 whats happening here???

    Read the article

  • jQuery, wont change value but will change any othere attribute...

    - by Phil Jackson
    function send_mail( token, loader ) { $(".send_mail").bind( "click", function() { try{ var to = $(this).attr('ref'); var mail_form = $("#mail_form"); mail_form.find("li:eq(0) input").val("sdsds"); //mail_form.find("li:eq(0) input").attr("ref", "sdsds"); //mail_form.find("li:eq(0) input").attr("value", "sdsds"); $.fancybox(mail_form.html(), { 'autoDimensions' : false, 'width' : 360, 'height' : 200, 'transitionIn' : 'none', 'transitionOut' : 'none', 'scrolling' : 'no', 'showCloseButton' : false }); return false; }catch(err){alert(err);} }); } My problem being that the above will not work yet if I use //mail_form.find("li:eq(0) input").attr("ref", "sdsds"); it will change the ref and even //mail_form.find("li:eq(0) input").attr("value", "sdsds"); will not work... Any ideas whats happening here?

    Read the article

  • linq .net with dynamically generated controls

    - by Stuart
    This is a very strange problem and i really dont have a clue whats causing it. What is supposed to happen is that a call to the BLL then DAL returns some data via a linq SPROC call. The retunred IMultipleResults object is processed and all results stored in a hashtable. The hashtable is stored in session and then the UI layer uses these results to dynamically generate some gridviews. Easy you would think. But if i run the code i dont get any gridviews. If i take out the call to the BLL and DAL the gridviews appear but with nothing in them? Why is it the page renders correctly when i take out the call to get the data? Thanks.

    Read the article

  • NSInvalidArgumentException when updating WebView from AppDelegate

    - by H.Protagonist
    I had to do an update in my WebView from the Appdelegate.m I try it like this: [self performSelectorOnMainThread:@selector(loadWebViewWithContent:) withObject:requestObj waitUntilDone:NO]; The loadWebViewWithContent Method works great from ViewController.m, but not from the Appdelegate. I allready wrote this in my Appdelegate.h: -(void)loadWebViewWithContent:(NSURLRequest *)requestObj; Whats wrong? Please help me. I´m still a big Noob in IOS. Error: -[AppDelegate loadWebViewWithContent]: unrecognized selector sent to instance 0x1f86a5e0*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppDelegate loadWebViewWithContent]: unrecognized selector sent to instance 0x1f86a5e0'

    Read the article

  • NodeJS + Express: res.redirect('back'); with params

    - by Ilya Rusanen
    I have register form on every page of my website. During registration some error may occur. After cathing error, I have to return user to previous page, showing some error tips. The problem is I dont know from which page user performs registration. That's why I use res.redirect('back');. However, I cant just redirect user back, I have to show him whats wrong. Thats why I have to pass some parameter. But res.redirect('back', (reg_error:'username')}) can not be used directly 'cause res.redirect() doesn't support parameters. How can I render prevous page with some parameter? Thanks!

    Read the article

  • Rename INDEX Column

    - by Lee
    Hey All I have a database with around 40 tables and need to rename every index column. IE USER a table has a bunch of fields like user_id | user_username | user_password | etc... I want to rename the ID columns just to id ie id | user_username | user_password | etc... But I keep getting mysql errors on the alter table command ie. ALTER TABLE database RENAME COLUMN user_id to id; Plus many different variations. Whats the best way to do this ? Hope you can advise

    Read the article

  • Drupal - db_fetch_array returns NULL for every row

    - by darudude
    I'm using Drupal's db_fetch_array to fetch rows from my db_query. However, every row returned is equal to NULL. Typing the query into PHP myadmin works, so I have no idea whats going on. db_num_rows returns the number of rows as well. Here is the code: if(count($rebuild_ids)) { $ids=implode(",",$rebuild_ids); $type_stmt = "SELECT * from {" . ItemType::$type_table_name . "} where id IN ($ids)"; $new_items=db_query($type_stmt); if(!$new_items || db_num_rows($new_items) == 0) { return; } while($row = db_fetch_array($new_items)); { if ($row!=NULL) { echo "I work!" $game_items[] = $row['id']; ItemInstance::$nid_to_item_type_code[$row['nid']] = $row['id']; } } } However, it never gets into the third if statement (i.e. never echos "I work!") Any ideas?

    Read the article

  • How do I extract info from a block of URLs in php?

    - by Jack
    I have a list of urls, which can come in any format. One per line, separated by commas, have random text in between them, etc. the URLs are all from 2 different sites, and have a similar structure For this example, lets say it looks like this Random Text - http://www.domain2.com/variable-value Random Text 2 - http://www.domain1.com/variable-value, http://www.domain1.com/variable-value, http://www.domain1.com/variable-value http://www.domain1.com/variable-value http://www.domain2.com/variable-value http://www.domain1.com/variable-value http://www.domain2.com/variable-value http://www.domain1.com/variable-value I need to extract 2 pieces of information. Check to see if its domain1 or domain2 and the value that follows "variable-" So it should create a multi-dimensional array, which would have 2 items: domain + value. Whats the best way of doing that?

    Read the article

  • Class or interface expected error (java)

    - by David
    When i try to compile this: public static int compareCardhl (Card c1, Card c2) } if (c1.suit > c2.suit) return 1 ; if (c1.suit < c2.suit) return -1 ; if (c1.rank > c2.rank) return 1 ; if (c1.rank < c2.rank) return -1 ; return 0; } i get a lot of class or intereface expected errors. They all point at the if's. i also get a ; expected error at the end of Card c2). whats going wrong here?

    Read the article

  • More swing design & actions

    - by takoi
    Im pretty new to gui programming so i've been reading through every post on this site about swing and design. Whats been answered over and over again is that one should have a class which handles all the action. Like this: (GUI being some JFrame) Now, this works great for one-way actions, like OpenDialog. But the actions for buttons in DialogA and B will have to have access to all the components (there will be many) in its dialog, and the controller. This is where im stuck. The only sane way i can see is to put it in DialogA/B but i would then need to pass the controller all the way down, through classes that dont even need it, and it'll get all spaghetti. Really dont want that. Someone must have encountered this problem before. So where should i put this Action? Or should i just drop the whole design?

    Read the article

  • Delphi Memory Management

    - by nomad311
    I haven't been able to find the answers to a couple of my Delphi memory management questions. I could test different scenarios (which I did to find out what breaks the FreeAndNil method), but its takes too long and its hard! But seriously, I would also like to know how you all (Delphi developers) handle these memory management issues. My Questions (Feel free to pose your own I'm sure the answers to them will help me too): Does FreeAndNil work for COM objects? My thoughts are I don't need it, but if all I need to do is set it to nil than why not stay consistent in my finally block and use FreeAndNil for everything? Whats the proper way to clean up static arrays (myArr : Array[0..5] of TObject). I can't FreeAndNil it, so is it good enough to just set it to nil (do I need to do that after I've FreeAnNil'd each object?)? Thanks Guys!

    Read the article

  • PHP MySQL Insert Data

    - by happyCoding25
    Hello, Im trying to insert data into a table in MySQL. I found/modified some code from w3Schools and still couldn't get it working. Heres what I have so far: <?php $rusername=$_POST['username']; $rname=$_POST['name']; $remail=$_POST['emailadr']; $rpassword=$_POST['pass']; $rconfirmpassword=$_POST['cpass']; if ($rpassword==$rconfirmpassword) { $con = mysql_connect("host","user","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydbname ", $con); } mysql_query("INSERT INTO members (id, username, password) VALUES ('4', $rusername, $rpassword)"); ?> Did I mistype something? To my understanding "members" is the name of the table. If anyone knows whats wrong I appreciate the help. Thanks

    Read the article

  • submit button on html to output result on same page

    - by amateur
    Hi, Although this seems like something very basic, but no matter what I tried I couldn't get my head around it. Basically I want a html form where a user types in their ID number in an input text box and when they hit the submit button it displays their email address which is their company ID number @ company.com, such as below <form action=""> ID Number: <input type="text" name="idnumber" /><br/> <input type="submit" value="Whats my email address" /> </form> <p>Your email address is 'idnumber'@email.com</p> Can this even be done using html or would I need to use Javascript or PHP for it? Thanks

    Read the article

  • Last element not getting insert in Tree

    - by rdk1992
    So I was asked to make a Binary Tree in Haskell taking as input a list of Integers. Below is my code. My problem is that the last element of the list is not getting inserted in the Tree. For example [1,2,3,4] it only inserts to the tree until "3" and 4 is not inserted in the Tree. data ArbolBinario a = Node a (ArbolBinario a) (ArbolBinario a) | EmptyNode deriving(Show) insert(x) EmptyNode= insert(tail x) (Node (head x) EmptyNode EmptyNode) insert(x) (Node e izq der) |x == [] = EmptyNode --I added this line to fix the Prelude.Head Empty List error, after I added this line the last element started to be ignored and not inserted in the tree |head x == e = (Node e izq der) |head x < e = (Node e (insert x izq) der) |head x > e = (Node e izq (insert x der)) Any ideas on whats going on here? Help is much appreciated

    Read the article

  • what's the name of this language that description another language syntax?

    - by Boolean
    for example: <SELECT statement> ::= [WITH <common_table_expression> [,...n]] <query_expression> [ ORDER BY { order_by_expression | column_position [ ASC | DESC ] } [ ,...n ] ] [ COMPUTE { { AVG | COUNT | MAX | MIN | SUM } ( expression ) } [ ,...n ] [ BY expression [ ,...n ] ] ] [ <FOR Clause>] [ OPTION ( <query_hint> [ ,...n ] ) ] <query_expression> ::= { <query_specification> | ( <query_expression> ) } [ { UNION [ ALL ] | EXCEPT | INTERSECT } <query_specification> | ( <query_expression> ) [...n ] ] <query_specification> ::= SELECT [ ALL | DISTINCT ] [TOP expression [PERCENT] [ WITH TIES ] ] < select_list > [ INTO new_table ] [ FROM { <table_source> } [ ,...n ] ] [ WHERE <search_condition> ] [ <GROUP BY> ] [ HAVING < search_condition > ] whats the language called?

    Read the article

  • hasOwnProperty in javascript

    - by Thiyaneshwaran S
    function Shape() { this.name = "Generic"; this.draw = function() { return "Drawing " + this.name + " Shape"; }; } function welcomeMessage() { var shape1 = new Shape(); //alert(shape1.draw()); alert(shape1.hasOwnProperty(name)); //this is returning false } "welcomeMessage" called on the body.onload event. I expected shape1.hasOwnProperty(name) to return true. But its returning false. Whats the correct behavior?

    Read the article

  • Need help with jquery sorting

    - by Klerk
    I have a column within which are multiple 'records' (each a div). Each record has a bunch of fields (each a span whose id is the fieldname). I want to allow the user to sort all the records based on a field. I also want, the field that has been sorted to be moved to the beginning of the record. So I came up with this. But its really slow for a large sets. Not sure whats the best way to do this. Any ideas? $(".col1 div").sort( function (a,b) { if($(a).children("."+field).text() > $(b).children("."+field).text()) return -1; else return 1; }).appendTo(".col1");

    Read the article

  • Secure way to run other people code (sandbox) on my server?

    - by amikazmi
    I want to make a web service that run other people code locally... Naturally, I want to limit their code access to certain "sandbox" directory, and that they wont be able to connect to other parts of my server (DB, main webserver, etc) Whats the best way to do it? Run VMware/Virtualbox: (+) I guess it's as secure as it gets.. even if someone manage to "hack".. they only hack the guest machine (+) can limit the cpu & memory the process uses (+) easy to setup.. just create the VM (-) harder to "connect" the sandbox directory from the host to the guest (-) wasting extra memory and cpu for managing the VM Run underprivileged user: (+) doesnt waste extra resources (+) sandbox directory is just a plain directory (?) cant limit cpu and memory? (?) dont know if it's secure enough... Any other way? Server running Fedora Core 8, the "other" codes written in Java & C++

    Read the article

  • Delphi and mysql - Unable to connent to server..maybe custom connection reqd

    - by Steve
    I am coding an application for my company wherein i want to parse the results of a mysql query and display them in my application but i am facing a problem conecting to the database. the ip address of the server is : 172.30.192.20 and before i can ping it i have to add route on my pc something like this route add 172.30.192.0 mask 255.255.255.0 172.30.192.56 where 172.30.192.56 is the gateway Now whenever i try to connect 172.30.192.20 which is where the sql server is running my appplication instead connects to 172.30.192.56 i am coding the application in delphi and have used TmySQL After this didnt workout i tried an application called SQLwave. I just entered the server ip address and was able to connect to the database without any problems. it seems sqlwave uses mydac which is why even i tried using it but using the default connection options and setting i was still not able to connect. it seems sqlwave uses a custom connection using mydac i just want to know whats going wrong with my connection

    Read the article

  • syntax problem crating a method that returns an object (java)

    - by David
    I'm trying to create a method that will sum two timeO objects and return a new TimeO object called sum. Here is the relevant code snippet: public static TimeO add (TimeO t1, TimeO t2) { TimeO sum = new TimeO ; ... } When i try to compile it i get this error message: TimeO.java:15: '(' or '[' expected TimeO sum = new TimeO ; ^ 1 error i cant think of any reason why it would want me to open a set of parenthasies or brackets here but its possible that i dont' quite understand the syntax. Whats going wrong here?

    Read the article

  • C++ Vector of vectors

    - by xbonez
    I have a class header file called Grid.h that contains the following 2 private data object: vector<int> column; vector<vector<int>> row; And a public method whose prototype in Grid.h is such: int getElement (unsigned int& col, unsigned int& row); The definition of above mentioned function is defined as such in Grid.cpp: int getElement (unsigned int& col, unsigned int& row) { return row[row][col] ; } When I run the program, I get this error: error C2109: subscript requires array or pointer type Whats going wrong?

    Read the article

  • Storing information in the DOM?

    - by John
    Im making a small private message application in the form of a phone. Ten messages are shown at the time. And the list of messages are scrolled up/down by hiding them. Just how bad is it to use the DOM to store information in this way. My main goal for doing this is to reduce calls to the database. And instead of making a new call all the time, it only checks if any new messages has arrived and ads the new message(s). Whats the alternative, cookies anyone? Thank you for the time

    Read the article

  • Three customer addresses in one table or in separate tables?

    - by DR
    In my application I have a Customer class and an Address class. The Customer class has three instances of the Address class: customerAddress, deliveryAddress, invoiceAddress. Whats the best way to reflect this structure in a database? The straightforward way would be a customer table and a separate address table. A more denormalized way would be just a customer table with columns for every address (Example for "street": customer_street, delivery_street, invoice_street) What are your experiences with that? Are there any advantages and disadvantages of these approaches?

    Read the article

  • Add Many-to-Many Entity Framework

    - by tomcamara
    I've got a question: I have 3 tables: Users Menu UserMenu UserMenu contains IdMenu and IdUser. In My DataModel Entity Framework 4.0, I'm filling my User Model and filling User.Menu (Menu is Navigation Properties) with an existing Menu of my table Menu. I have to save User and Save each related menu item in UserMenu table. I get the following exception: The ObjectStateManager does not contain an ObjectStateEntry with a reference to an object of type 'SGGED.Model.Menu'. Code Users objUser = new Users(); objUser.name = itemUsers.name.Trim(); objUser.email = itemUsers.email.Trim(); objUser.password = Util.HashString("12345"); objUser.effdt = DateTime.Now; objData.Users.AddObject(objUser); foreach (var itemMenu in itemUsers.Menu) { objData.ObjectStateManager.ChangeObjectState(itemMenu, EntityState.Unchanged); } affRows = objData.SaveChanges(); Whats the way to handle this issue? Best Regards, Miltom Camara

    Read the article

  • Ruby: Parse Excel 95-2003 files?

    - by Larry K
    Is there a way to read Excel 97-2003 files from Ruby? Background I'm currently using the Ruby Gem parseexcel -- http://raa.ruby-lang.org/project/parseexcel/ But it is an old port of the perl module. It works fine, but the latest format it parses is Excel 95. And guess what? Excel 2007 will not produce the Excel 95 format. John McNamara has taken over duties as the maintainer for the Perl Excel parser, see http://search.cpan.org/~jmcnamara/Spreadsheet-ParseExcel-0.55/lib/Spreadsheet/ParseExcel.pm The current version will parse Excel 95-2003 files. But is there a port to Ruby? My other thought is to build some Ruby to Perl glue code to enable use of the Perl library itself from Ruby. Eg, see http://stackoverflow.com/questions/451636/whats-the-best-way-to-export-utf8-data-into-excel/620612#620612 (I think it would be much faster to write the glue code than to port the parser.) Thanks, Larry

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >