Search Results

Search found 27946 results on 1118 pages for 'output buffer empty'.

Page 61/1118 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Standard Place for an Empty String Array in the JDK

    - by Simon B
    Hi is there a standard place for accessing empty array constants in the JDK 1.5. When I want to do a conversion from a String Collection (e.g. ArrayList)to a String Array I find myself using my own which is defined in my own Constants class: public static final String[] EMPTY_STRING_ARRAY = new String[0]; And then in my client code something like: String[] retVal = myStringList.toArray(Constants.EMPTY_STRING_ARRAY); return retVal; I was wondering if this is the "idiomatic" of doing it or if I'm missing something I get the impression from the brief search I did that this kind of thing is prevalent in many people's code. Any ideas, answers, comment (aside from that I shouldn't really use String Arrays) greatly appreciated, Cheers Simon

    Read the article

  • UITableView gives empty table, does not load data

    - by Alex L
    Hi, Everything works fine when the view that holds my table is the main (first) view. However, when it's not the first view and I switch into that view, my table does not load data and I get an empty table. Using NSLog I can tell that the program is not invoking numberOfRowsInSection and cellForRowAtIndexPath. I have <UITableViewDataSource, UITableViewDelegate>, IBOutlet UITableview *tableView all declared. They are also connected in the InterfaceBuilder. I tried using viewWillAppear and [tableView reloadData] but that did not help. I'm new to iPhone development and your help is appreciated!

    Read the article

  • Getting an empty response when calling CouchDB over ajax

    - by swilliams
    I'm new to CouchDB, so please bear with me. I have an instance of CouchDB running on a VM. I can access it just fine through the browser via futon or directly at: http://192.168.62.128:5984/articles/hot_dog Calling that URL in a browser returns the proper JSON. But, when I try to call that exact same URL via ajax, I get nothing: var ajaxUrl = 'http://192.168.62.128:5984/articles/hot_dog'; $.getJSON(ajaxUrl, null, function(data) { alert(data); }); Looking at the response header with Firebug shows me that the HTTP response was 200 and the content-length is the right size. Even the Etag matches with what is in CouchDB. But the response itself is empty! The URL is absolutely right; I've triple checked, and copy/pasted it directly (and besides it wouldn't give a 200 response if it weren't). I'm using jQuery 1.4.2, and CouchDB 0.8 What's going on?

    Read the article

  • php POST and non-english language chars passes empty

    - by haim evgi
    I'm trying to program a Hebrew site with a search option. (old site and the charset of this site is windows-1255) I am using php 5.2 with Apache 2.2, on a Debian 5 (Lenny) with appropriate code pages enabled. I am using _POST to pass arguments to a script. If I pass English word to the script everything works, but when I use Hebrew nothing is passed through the POST function. When I use ECHO to show _POST, the variable is empty. What might be the problem? P.S. this is old site that worked fine on PHP 4 with debian 4, and the problem arised only after we upgrade to PHP5+debian5.

    Read the article

  • Type-safe, generic, empty Collections with static generics

    - by Droo
    I return empty collections vs. null whenever possible. I switch between two methods for doing so using java.util.Collections: return Collections.EMPTY_LIST; return Collections.emptyList(); where emptyList() is supposed to be type-safe. But I recently discovered: return Collections.<ComplexObject> emptyList(); return Collections.<ComplexObject> singletonList(new ComplexObject()); etc. I see this method in Eclipse Package Explorer: <clinit> () : void but I don't see how this is done in the source code (1.5). How is this magic tomfoolerie happening!!

    Read the article

  • Java String.indexOf and empty Strings

    - by tmeisenh
    I'm curious why the String.indexOf is returning a 0 (instead of -1) when asking for the index of an empty string within a string. The Javadocs only say this method returns the index in this String of the specified string, -1 if the string isn't found. System.out.println("FOO".indexOf("")); // outputs 0 wtf!!! System.out.println("FOO".indexOf("bar")); // outputs -1 as expected System.out.println("FOO".indexOf("F")); // outputs 0 as expected System.out.println("".indexOf("")); // outputs 0 as expected, I think

    Read the article

  • How to check for empty values on two fields then prompt user of error using javascript

    - by Matthew
    Hello guys, I hope I can explain this right I have two input fields that require a price to be entered into them in order for donation to go through and submit. The problem that I am having is that I would like the validation process check to see if one of the two fields has a value if so then proceed to submit. If both fields are empty then alert. This is what I have in place now: function validate_required(field,alerttxt) { with (field) { if (value==null||value=="") {alert(alerttxt);return false;} else {return true} } } function validate_form(thisform) { with (thisform) { if (validate_required(input1,"Need a donation amount to continue")==false) {input1.focus();return false;} else if (validate_required(input2,"Need a donation amount to continue")==false) {input2.focus();return false;} } } I would like to ultimately like to get this over to Jquery as well Thanks guys any help would do Matt

    Read the article

  • Can't Reorder a UITableViewCell into _some_ empty sections of a UITableView

    - by Jeremy Lightsmith
    If I have a UITableView in edit mode, w/ reordering turned on, it seems I can't move some (but not all) cells into some (but not all) empty sections. For example, if I have this layout : Section 1 apple banana Section 2 doberman Section 3 Section 4 Then I can move 'doberman' into any slot in section 1 (except after 'banana'), but I can't move it into section 3 or 4 at all. On the other hand, I can move 'apple' & 'banana' into section section 2 (except after 'doberman'), and I CAN move it into section 3, but NOT into section 4. What gives? this seems like buggy behavior. How do people work around it? Is apple aware of this bug?

    Read the article

  • Empty namespace using Linq Xml

    - by porum
    I'm trying to create a sitemap using Linq to Xml, but am getting an empty namespace attribute, which I would like to get rid of. e.g. XNamespace ns = "http://www.sitemaps.org/schemas/sitemap/0.9"; XDocument xdoc = new XDocument(new XDeclaration("1.0", "utf-8", "true"), new XElement(ns + "urlset", new XElement("url", new XElement("loc", "http://www.example.com/page"), new XElement("lastmod", "2008-09-14")))); The result is ... <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url xmlns=""> <loc>http://www.example.com/page</loc> <lastmod>2008-09-14</lastmod> </url> </urlset> I would rather not have the xmlns="" on the url element. I can strip it out using Replace on the final xdoc.ToString(), but is there a more correct way?

    Read the article

  • Function returning dictionary, not seen by calling function

    - by twiga
    Hi There, I have an interesting problem, which is a function that returns a Dictionary<String,HashSet<String>>. The function converts some primitive structs to a Dictionary Class. The function is called as follows: Dictionary<String, HashSet<String>> Myset = new Dictionary<String,HashSet<String>>(); Myset = CacheConverter.MakeDictionary(_myList); Upon execution of the two lines above, Myset is non-existent to the debugger. Adding a watch results in: "The name 'Myset' does not exist in the current context" public Dictionary<String, HashSet<String>> MakeDictionary(LightWeightFetchListCollection _FetchList) { Dictionary<String, HashSet<String>> _temp = new Dictionary<String, HashSet<String>>(); // populate the Dictionary // return return _temp; } The Dictionary _temp is correctly populated by the called function and _temp contains all the expected values. The problem seems to be with the dictionary not being returned at all. Examples I could find on the web of functions returning primitive Dictionary<string,string> work as expected.

    Read the article

  • create an empty branch

    - by robUK
    Hello, Subversion 1.6 Ubuntu 10.4 I have a project with the following repository layout. proj/trunk proj/branches/new_feature1/ proj/branches/new_feature2/ proj/tags However, I would like to create a small test app, that isn't a new feature. Just just testing a small aspect of the project. I would like to create this test_app on a new branch. However, I don't want to have to copy from trunk to branch. I just want to create a new empty branch so that I can develop this test_app. Is there any way to do this? Many thanks for any suggestions,

    Read the article

  • mysqldump generating an empty file

    - by chupinette
    Hello all! Im trying to use mysqldump like below: mysqldump -hlocalhost -uadmin -padmin shop> D:\b2\shop3.sql When i execute it in command prompt, the file shop3 is generated with all the tables from the shop database. But, when I use it in my php file like below, it generates an empty file. $cmd = 'mysqldump -hlocalhost -uadmin -padmin shop > D:\b2\shop3.sql'; system($cmd); Can anyone help me find my error please? Thanks

    Read the article

  • Empty page instead of custom tomcat error page

    - by Alexander
    My setting: Apache 2.2 + Tomcat 6.0 @ Windows 2008 R2 64bit static webpages: / servlet: /foo tomcat and apache are connected by mod_jk 404.jsp is placed in tomcat\webapps\ROOT tomcat\conf\web.xml: <error-page> <error-code>404</error-code> <location>/404.jsp</location> </error-page> apache\conf\extra\httpd-ssl.conf: JkMount /foo/* worker1 JkMount /404.jsp worker1 When I open https://...../404.jsp my custom error page is displayed. But when I open https://...../foo/nonexisting.html an empty page is displayed. If I remove the <error-page>...</error-page> code from web.xml and open https://...../foo/nonexisting.html then tomcats own 404 is displayed. Any hints?

    Read the article

  • Reducing size of a character array in Numpy

    - by Morgoth
    Given a character array: In [21]: x = np.array(['a ','bb ','cccc ']) One can remove the whitespace using: In [22]: np.char.strip(x) Out[22]: array(['a', 'bb', 'cccc'], dtype='|S8') but is there a way to also shrink the width of the column to the minimum required size, in the above case |S4?

    Read the article

  • JQuery.ajax success function returns empty

    - by viatropos
    I have a very basic AJAX function in JQuery: $.ajax({ url: "http://www.google.com", dataType: "html", success: function(data) { alert(data); } }); But the data is always an empty string, no matter what url I go to... Why is that? I am running this locally at http://localhost:3000, and am using JQuery 1.4.2. If I make a local response, however, like this: $.ajax({ url: "http://localhost:3000/test", dataType: "html", success: function(data) { alert(data); } }); ...it returns the html page at that address. What am I missing here?

    Read the article

  • Test for empty jQuery selection result

    - by fsb
    Say I do var s = $('#something'); and next I want to test if jQuery found #something, i.e. I want to test if s is empty. I could use my trusty isempty() on it: function isempty(o) { for ( var i in o ) return false; return true; } Or since jQuery objects are arrays, I suppose I could test s.length. But neither seem quite in the idiom of jQuery, not very jQueryesque. What do you suggest?

    Read the article

  • Jquery Check if Paragraph is empty

    - by Gidiyo
    Hi, I would like to check if my paragraph tag is empty using Jquery. Meaning without content. $(function() { $("#popupdialog").dialog(); }); HTML <div id="popupdialog"> <p></p> </div> Separate Instants. <div id="popupdialog" title="Basic dialog"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> If the popupdialog is without content. I would like the dialog box to set as autoOpen: false. How should I do it?

    Read the article

  • pysvn client.log() returning empty dictionary

    - by nashr rafeeg
    i have the following script that i am using to get the log messages from svn import pysvn class svncheck(): def __init__(self, svn_root="http://10.11.25.3/svn/Moodle/modules", svn_user=None, svn_password=None): self.user = svn_user self.password = svn_password self.root = svn_root def diffrence(self): client = pysvn.Client() client.commit_info_style = 1 client.callback_notify = self.notify client.callback_get_login = self.credentials log = client.log( self.root, revision_start=pysvn.Revision( pysvn.opt_revision_kind.number, 0), revision_end=pysvn.Revision( pysvn.opt_revision_kind.number, 5829), discover_changed_paths=True, strict_node_history=True, limit=0, include_merged_revisions=False, ) print log def notify( event_dict ): print event_dict return def credentials(realm, username, may_save): return True, self.user, self.password, True s = svncheck() s.diffrence() when i run this script its returning a empty dictionary object [<PysvnLog ''>, <PysvnLog ''>, <PysvnLog ''>,.. any idea what i am doing wrong here ? i am using pysvn version 1.7.2 built again svn version 1.6.5 cheers Nash

    Read the article

  • ASP.NET MVC 2 - ViewData empty after POST

    - by Alex
    I don't really know where to look for an error... the situation: I have an ASPX view which contains a form and a few input's, and when I click the submit button everything is POST'ed to one of my ASP.NET MVC actions. When I set a breakpoint there, it is hit correctly. When I use FireBug to see what is sent to the action, I correctly see data1=abc&data2=something&data3=1234. However, nothing is arriving in my action method. ViewData is empty, there is no ViewData["data1"] or anything else that would show that data arrived. How can this be? Where can I start looking for the error?

    Read the article

  • Why no ArgumentEmptyException in .NET ?

    - by Andrei Rinea
    I am beginning to think I am doing something wrong. I mean they did place System.String.IsNullOrWhitespace finally but no ArgumentEmptyException class. public FilterItem(string name, IEnumerable<string> extensions) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException("name"); } if (extensions == null) { throw new ArgumentNullException("extensions"); } if (extensions.Count() == 0) { throw new ArgumentOutOfRangeException("extensions"); } this.Name = name; this.Extensions = extensions; } throwing an ArgumentOutOfRangeException feels unnatural. Also an instance of ArgumentException is too general in my opinion. It's easy to me to create a new exception class call it this way and have it over with. What bugs me is that it's not in the BCL/FCL and I am beginning to think there's a good reason not to have it. Should there be one?

    Read the article

  • How to mark empty in a single element in a float array

    - by Vineeth Mohan
    I have a large float (primitive) array and not every element in the array is filled. How can i mark a particular element as EMPTY. I understand this can be achieved by some special symbols but still i would like to know the standard way. Even if i am using some special symbol , how will i handle a situation where the actual data item is the value of special symbol. In short my question is how to implement the NULL feature in a primitive type array in java. PS - The reason why i am not using Float object is to achieve a high memory and speed performance. Thanks Vineeth

    Read the article

  • Speeding up jQuery empty() or replaceWith() Functions When Dealing with Large DOM Elements

    - by Levi Hackwith
    Let me start off by apologizing for not giving a code snippet. The project I'm working on is proprietary and I'm afraid I can't show exactly what I'm working on. However, I'll do my best to be descriptive. Here's a breakdown of what goes on in my application: User clicks a button Server retrieves a list of images in the form of a data-table Each row in the table contains 8 data-cells that in turn each contain one hyperlink Each request by the user can contain up to 50 rows (I can change this number if need be) That means the table contains upwards of 800 individual DOM elements My analysis shows that jQuery("#dataTable").empty() and jQuery("#dataTable).replaceWith(tableCloneObject) take up 97% of my overall processing time and take on average 4 - 6 seconds to complete. I'm looking for a way to speed up either of the above mentioned jQuery functions when dealing with massive DOM elements that need to be removed / replaced. I hope my explanation helps.

    Read the article

  • Python module seeing a full list as empty in another module

    - by Nick
    I'm working on a pygame project and have the main engine layed out. The problem is I hit a bug that I just can not seem to figure out. What happens is one module can't read a variable from another module. It's not that the variable can't be read, it just sees an empty list instead of what it really is. Instead of posting the entire source code I reproduced the bug in two small snippets that hopefully a skillful python-ist can interpret in his\her head. Code: main.py (This is the file that gets run) import screen screens = [] #A stack for all the game screens def current_screen(): #return a reference to the current screen return screens[-1] def play(): print'play called' current_screen().update() if __name__=='__main__': screens.append(screen.Screen()) play() screen.py import main class Screen: def __init__(self): print'screen made' def update(self): print main.screens #Should have a reference to itself in there Thanks!

    Read the article

  • Cursor returns zero rows from query to table

    - by brockoli
    I've created an SQLiteDatabase in my app and populated it with some data. I can connect to my AVD with a terminal and when I issue select * from articles; I get a list of all the rows in my table and everything looks fine. However, in my code when I query my table, I get a cursor back that has my tables columns, but zero rows of data. Here is my code.. mDbHelper.open(); Cursor articles = mDbHelper.fetchAllArticles(); startManagingCursor(articles); Cursor feeds = mDbHelper.fetchAllFeeds(); startManagingCursor(feeds); mDbHelper.close(); int titleColumn = articles.getColumnIndex("title"); int feedIdColumn = articles.getColumnIndex("feed_id"); int feedTitleColumn = feeds.getColumnIndex("title"); /* Check if our result was valid. */ if (articles != null) { int count = articles.getCount(); /* Check if at least one Result was returned. */ if (articles.moveToFirst()) { In the above code, my Cursor articles returns with my 4 columns, but when I call getCount() it returns zero, even though I can see hundreds of rows of data in that table from command line. Any idea what I might be doing wrong here? Also.. here is my code for fetchAllArticles.. public Cursor fetchAllArticles() { return mDb.query(ARTICLES_TABLE, new String[] {ARTICLE_KEY_ROWID, ARTICLE_KEY_FEED_ID, ARTICLE_KEY_TITLE, ARTICLE_KEY_URL}, null, null, null, null, null); } Rob W.

    Read the article

  • Passing an empty IEnumerable argument to a method

    - by avance70
    I have this method (simplified): void DoSomething(IEnumerable<int> numbers); And I invoke it like this: DoSomething(condition==true?results:new List<int>()); The variable results is formed with a LINQ select condition (IEnumerable). I was wondering is this List<int>() the best way (the fastest?) to pass an empty collection, or is new int[0] better? Or, something else would be faster, a Collection, etc.? In my example null wouldn't be ok.

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >