Daily Archives

Articles indexed Tuesday April 27 2010

Page 19/121 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • NullPointerException when thying to add an object to a PriorityQueue

    - by meagan
    i keep getting a null pointer exception when trying to add an object to a priority queue i initialize the queue: private PriorityQueue<NodeObject> nodes; and here i try to add to it: NodeObject childNode = new NodeObject(child, 1); nodes.add(childNode); why doesn't this work? i know my NodeObject is not null because i create it right before i add it.

    Read the article

  • multiple validation errors showing up for single property

    - by Dave K
    i'm often getting multiple errors showing up for an individual property, when I'd like them to be prioritized, as in, if Required is satisfied, check StringLength, but if Required fails, show that message only. I'm getting inconsistent behavior here, and I'm curious as to how the framework determines this priority? has anyone else had problems with this? Thanks!

    Read the article

  • MVC: models interacts with the view?

    - by fayer
    i know that everything is going through the controller. but i often read articles that says something like this: user interacts with the view controller asks the model to change its state model notifies the view when its sate has changed i dont get the 3rd one. why saying that the model notifies the view, when it actually is notifying the controller and the controller is notifying the view?

    Read the article

  • Exception in NHunspell

    - by Nikhil K
    I have used the following code for spelling checking.While i am running that i am getting an exception--" The code is: using (Hunspell hunspell = new Hunspell("en_us.aff", "en_us.dic")) { bool correct = hunspell.Spell("Recommendation"); var suggestions = hunspell.Suggest("Recommendatio"); foreach (string suggestion in suggestions) { Console.WriteLine("Suggestion is: " + suggestion); } } // Hyphen using (Hyphen hyphen = new Hyphen("hyph_en_us.dic")) { var hyphenated = hyphen.Hyphenate("Recommendation"); } using (MyThes thes = new MyThes("th_en_us_new.idx", "th_en_us_new.dat")) { using (Hunspell hunspell = new Hunspell("en_us.aff", "en_us.dic")) { ThesResult tr = thes.Lookup("cars", hunspell); foreach (ThesMeaning meaning in tr.Meanings) { Console.WriteLine(" Meaning: " + meaning.Description); foreach (string synonym in meaning.Synonyms) { Console.WriteLine(" Synonym: " + synonym); } } }

    Read the article

  • Using a Function returning apointer as LValue

    - by Amrish
    Why cant I used a function returning a pointer as a lvalue? For example this one works int* function() { int* x; return x; } int main() { int* x = function(); x = new int(9); } but not this int* function() { int* x; return x; } int main() { int* x; function() = x; } While I can use a pointer variable as a lvalue, why can't I use a function returning a pointer as a lvalue? Also, when the function returns a refernce, instead of a pointer, then it becomes a valid lvalue.

    Read the article

  • Correct order of overrides for a composite control based on an abstract one

    - by mattdwen
    I'm writing a set of C# composite web server controls for displaying dialog boxes. I want to have one abstract class which handles the basic layout and things like titles of the control, then have a set of derived ones which render child controls at a specific point. I forsee three distincts methods: renderOpeningHtml handled by the abstract class, renderCustomControls as done by the derived class, and renderClosingHtml by the abstract class again, except I can't figure the life cycle of a CompositeControl and what methods to use when.

    Read the article

  • Get information form WebPage.

    - by william-hu
    I want to set up an app which can get the information from a particular web page. Then i display the value which got from that page to the iPhone user. Detail:In the webpage on server ,there is the schedule for bus time. If the user input origin and terminus then show the user the time information(list on webpage) in a label. That's all. What i have finished is : Open the iphone app, input two value(origin and terminus) to UITextField. Send the URL to server. Get the page, and show in UIWebView. What my problem next is how should i get the information form that page into another two labels to give the user about the bus time. I have store data in my Array receiveData: self.receivedData = data; I am not clear the data i received is XML or what? And how should i pick-up the value i want. (should i save the value to property list and the read the value?) Thank you so much!

    Read the article

  • Is CloudLinux considered to be a stable webserver

    - by Saif Bechan
    I am currently running several websites on a CentOS 5.4 system. I have the choice to switch to Cloudlinux. It is said to be better at handling several websites. Does anyone have any information to share on CloudLinux. This can be on security, stability and just overall performance of the system.

    Read the article

  • None of my bash commands work

    - by Kevin
    I have an Ubuntu 9.10 netbook. I has always run great. Two days ago, I was running as root for a while (~30), and when I moved back to my user account (only other account one this machine), all the commands in ~/bin stopped working. If I try ls, it comes up with "cannot execute binary file". Same with ln, mv, mkdir, clear, cp, etc. They all run as root(which makes sense, different files), but I have no idea why this happened. I don't want to stay as root to move around easily. Any idea?

    Read the article

  • How can I get reason of page unloading in javascript's onunload event, in IE?

    - by DM
    There may be different reasons of page unloading: 1 User closes the current window. 2 User navigates to another location. 3 Clicks the Back, Forward, Refresh, or Home button. 4 User submits a form, and then browser starts to unload current page and load page with results of form submitting. (Assuming that the current window is the form's target). 5 and so on... Can I somehow know in onunload handler that the reason of unloading is p.4, i.e. moving to page with results of form submitting? I could define some flag when submiting form, but this does not solve the problem. Because response (on form submit) from web server takes some time, browser doesn't unload the current page immediately and waits response from server. And during this waiting user may close window or navigate anywhere. And I need to know whether was it indeed moving to results page or something else...?

    Read the article

  • Business layer: Looking for a complete reference ?

    - by odiseh
    hi I'm studying business layer and need a complete reference which covers issues about "how to manage dependency between business layer and other layers", "how many ways are there to send data between layers" and most important for me "how to group business logic and make business component". do you know any reference?

    Read the article

  • Is there a alternative to DCOM on unix?

    - by comguy
    Hi All, Is there a COM implementation on UNIX platform. My requirements is that I have a COM client on windows , But I want the server on a AIX servers. I want to write COM clients and servers on unix platforms. Is there anyway to do this?. I tried looking for EntireX from software ag, but couldn't find it. also tried other commercial implementation of DCOM .like COMbridge , Java com bridge. But I need a open source production ready alternative. Am I asking for too much? Thanks all

    Read the article

  • PowerShell Advanced Function get current ParameterSetName

    - by spoon16
    In C# you can get the current ParameterSetName in the ProcessRecord override of a PowerShell Cmdlet with code like this: switch (ParameterSetName) { case FromUriParamSetName: loadFromUri(); break; case FromFileParamSetName: loadFromFile(); break; } I'm trying to figure out how I can get the value for ParameterSetName in a script cmdlet (Advanced Function).

    Read the article

  • Problems with Tomcat server and JSP web application

    - by CitadelCSCadet
    I am running a JSP/Servlet Web application and out of nowhere we experienced some random problems that don't make any sense. I checked the catalina.out file to check the log files, and I noticed it contained some of the following messages SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in opening zip file INFO: validateJarFile(/home/weremo/appservers/ apache-tomcat-6.0.26/webapps /WMA/WEB-INF/lib/ servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class I am aware of what this message means, but am in the dark as to what could have caused it, or what effects it could have on the application.

    Read the article

  • How to Broadcast to a shutdown system using java?

    - by pirates-iiita
    We use socket.send(packet) function in java to send a "packet" to a given port. My problem is that i have to send a packet to a shutdown system using UDP protocol. The problem with send() function is that first it verifies whether the host IP is multicast or not. Now my local area network is of broadcast type. So i am having problem is using this function. can anyone please give me a way ?

    Read the article

  • Get information from WebPage.

    - by william-hu
    I want to set up an app which can get the information from a particular web page. Then i display the value which got from that page to the iPhone user. Detail:In the webpage on server ,there is the schedule for bus time. If the user input origin and terminus then show the user the time information(list on webpage) in a label. That's all. What i have finished is : Open the iphone app, input two value(origin and terminus) to UITextField. Send the URL to server. Get the page, and show in UIWebView. What my problem next is how should i get the information form that page into another two labels to give the user about the bus time. I have store data in my Array receiveData: self.receivedData = data; I am not clear the data i received is XML or what? And how should i pick-up the value i want. (should i save the value to property list and the read the value?) Thank you so much!

    Read the article

  • Facebook Connect 'next' error

    - by Mark
    I am trying to experiment with the new facebook authentication system, and I can't getthe login to work. I'm getting the following error message: API Error Code: 100 API Error Description: Invalid parameter Error Message: next is not owned by the application. The url that is being sent to facebook is: http://www.facebook.com/connect/uiserver.php?app_id=444444444444444&next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&display=popup&channel=http%3A%2F%2Fwww.mysite.com%2Ffbtester.php&cancel=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df6095a98598be8%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&locale=en_US&return_session=1&session_version=3&fbconnect=1&canvas=0&legacy_return=1&method=permissions.request Note that the 'Next' variable in the url is: next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx Any ideas what could be going wrong? All I've done is copy and paste the facebook login demo code from facebook's website: <?php define('FACEBOOK_APP_ID', 'your application id'); define('FACEBOOK_SECRET', 'your application secret'); function get_facebook_cookie($app_id, $application_secret) { $args = array(); parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args); ksort($args); $payload = ''; foreach ($args as $key => $value) { if ($key != 'sig') { $payload .= $key . '=' . $value; } } if (md5($payload . $application_secret) != $args['sig']) { return null; } return $args; } $cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET); ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <body> <?php if ($cookie) { ?> Your user ID is <?= $cookie['uid'] ?> <?php } else { ?> <fb:login-button></fb:login-button> <?php } ?> <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({appId: '<?= FACEBOOK_APP_ID ?>', status: true, cookie: true, xfbml: true}); FB.Event.subscribe('auth.login', function(response) { window.location.reload(); }); </script> </body> </html> Thanks for the help!

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >