Daily Archives

Articles indexed Friday March 26 2010

Page 1/121 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Why is a DataGridView so row-centric.

    - by Spike
    Why is there a DataGridViewRow.Cells property, but not a DataGridViewColumn.Cells property? What's so important about rows that I'll never want to iterate down a column? I'm not saying that it makes it particularly difficult to do or anything, it just strikes me as oddly asymmetrical. I'm implementing a "fill down" type behaviour, and it'd be handy is all.

    Read the article

  • Dealing with huge SQL resultset

    - by Dave McClelland
    I am working with a rather large mysql database (several million rows) with a column storing blob images. The application attempts to grab a subset of the images and runs some processing algorithms on them. The problem I'm running into is that, due to the rather large dataset that I have, the dataset that my query is returning is too large to store in memory. For the time being, I have changed the query to not return the images. While iterating over the resultset, I run another select which grabs the individual image that relates to the current record. This works, but the tens of thousands of extra queries have resulted in a performance decrease that is unacceptable. My next idea is to limit the original query to 10,000 results or so, and then keep querying over spans of 10,000 rows. This seems like the middle of the road compromise between the two approaches. I feel that there is probably a better solution that I am not aware of. Is there another way to only have portions of a gigantic resultset in memory at a time? Cheers, Dave McClelland

    Read the article

  • PHP eval issue with PHP + HTML code

    - by i-CONICA
    Hi, I've got PHP and HTML code stored in a database table. When I get this data, I need to echo the HTML and process the PHP. I thought I could use eval() for this, which works, if I do this eval("echo 'dlsj'; ? EVALED "); I get dlsjEVALED printed out. The problem is, I get a fatal error when I run longer scripts. Things like: Parse error: syntax error, unexpected '<' in /home/content.php(18) : eval()'d code on line 1 Any advice = awesome. Thanks.

    Read the article

  • Sharepoint 2010 Managed Metadata - unable to get Term from TermSet

    - by Blakomen
    Hi guys, Having a really aggravating problem using Managed Metadata in SP2010 where I can get a Taxonomy Session, Term Store and Term set fine, but when I try to retrieve a term from the term set, I get a TermStoreOperationException which says that it "failed to read from or write to database". Does anyone have any idea as to why I can get the Term Set but not the terms? I can't quite understand why when they all reside in the same database I can get the set but not the terms within it. The code I'm using is below: TaxonomySession txSession = new TaxonomySession(site, true); TermStore termStore = txSession.DefaultSiteCollectionTermStore; TermSet termSet = termStore.GetTermSet(txField.TermSetId); TermCollection termCollection = termSet.GetTerms(xnField.InnerText.Trim(), true); //exception thrown on this line. Any ideas or insight or solutions would be really appreciated. Thanks heaps!

    Read the article

  • Django + FastCGI - randomly raising OperationalError

    - by ibz
    I'm running a Django application. Had it under Apache + mod_python before, and it was all OK. Switched to Lighttpd + FastCGI. Now I randomly get the following exception (neither the place nor the time where it appears seem to be predictable). Since it's random, and it appears only after switching to FastCGI, I assume it has something to do with some settings. Found a few results when googleing, but they seem to be related to setting maxrequests=1. However, I use the default, which is 0. Any ideas where to look for? PS. I'm using PostgreSQL. Might be related to that as well, since the exception appears when making a database query. Thanks. File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 140, in root if not self.has_permission(request): File "/usr/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 99, in has_permission return request.user.is_authenticated() and request.user.is_staff File "/usr/lib/python2.6/site-packages/django/contrib/auth/middleware.py", line 5, in __get__ request._cached_user = get_user(request) File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py", line 83, in get_user user_id = request.session[SESSION_KEY] File "/usr/lib/python2.6/site-packages/django/contrib/sessions/backends/base.py", line 46, in __getitem__ return self._session[key] File "/usr/lib/python2.6/site-packages/django/contrib/sessions/backends/base.py", line 172, in _get_session self._session_cache = self.load() File "/usr/lib/python2.6/site-packages/django/contrib/sessions/backends/db.py", line 16, in load expire_date__gt=datetime.datetime.now() File "/usr/lib/python2.6/site-packages/django/db/models/manager.py", line 93, in get return self.get_query_set().get(*args, **kwargs) File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 304, in get num = len(clone) File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 160, in __len__ self._result_cache = list(self.iterator()) File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 275, in iterator for row in self.query.results_iter(): File "/usr/lib/python2.6/site-packages/django/db/models/sql/query.py", line 206, in results_iter for rows in self.execute_sql(MULTI): File "/usr/lib/python2.6/site-packages/django/db/models/sql/query.py", line 1734, in execute_sql cursor.execute(sql, params) OperationalError: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

    Read the article

  • MySql - Get row number on select

    - by George
    Can I run a select statement and get the row number if the items are sorted? I have a table like this: mysql> describe orders; +-------------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+---------------------+------+-----+---------+----------------+ | orderID | bigint(20) unsigned | NO | PRI | NULL | auto_increment | | itemID | bigint(20) unsigned | NO | | NULL | | +-------------+---------------------+------+-----+---------+----------------+ I can then run this query to get the number of orders by ID: SELECT itemID, COUNT(*) as ordercount FROM orders GROUP BY itemID ORDER BY ordercount DESC; This gives me a count of each itemID in the table like this: +--------+------------+ | itemID | ordercount | +--------+------------+ | 388 | 3 | | 234 | 2 | | 3432 | 1 | | 693 | 1 | | 3459 | 1 | +--------+------------+ I want to get the row number as well, so I could tell that itemID 388 is the first row, 234 is second, etc (essentially the ranking of the orders, not just a raw count). I know I can do this in java when I get the result set back, but I was wondering if there was a way to handle it purely in SQL.

    Read the article

  • Embedded Jetty and SOAP

    - by EsbenP
    I am trying to run an embedded Jetty and would like to expose a soap webservice. The project is loaded as a WAR generated by netbeans. The webservice is generated from a WSDL. What is the simplest way to add SOAP support to embedded Jetty

    Read the article

  • Python OSError not reporting errors

    - by breathe
    Ive got this snippet that Im using to convert image files to tiff. I want to be informed when a file fails to convert. Imagemagick exits 0 when successfully run, so I figured the following snippet would report the issue. However no errors are being reported at all. def image(filePath,dirPath,fileUUID,shortFile): try: os.system("convert " + filePath + " +compress " + dirPath + "/" + shortFile + ".tif") except OSError, e: print sys.stderr, "image conversion failed: %s" % (e.errno, e.strerror) sys.exit(-1)

    Read the article

  • Another favicon not working in IE...

    - by morktron
    Hi, I've read through and tried all the favicon fixes already posted. Including: Refreshing the cache Using a different favicon that works on other websites Using a favicon generating website Using a Photoshop favicon plugin Using an absolute path Using a relative path It works fine in all the other browsers. I'm using IE8 in Vista via Parallels on a Mac. It's on a Moodle website and I have not altered the default Moodle code for the favicon: <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" /> The site is here: http://www.olvarwood.com.au/olvarwoodonline/ Favicon path is here: http://www.olvarwood.com.au/olvarwoodonline/theme/olvar-wood/favicon.ico Any ideas?

    Read the article

  • Pros and Cons of ASNA Visual RPG (AVR)

    - by mga911
    Have you had any experience with ASNA Visual RPG for Visual Studio 2005/2008? I'm looking for some feedback on this product. I'm especially curious as to how it compares to other methods of accessing files and programs on the IBM’s System i (formerly known as iSeries, AS/400) server. Thanks!

    Read the article

  • Set Proxy Credential in Web Browser Control

    - by rockacola
    I am working on a legacy code where an application uses AxSHDocVw.AxWebBrowser (NOT System.Windows.Forms.Control) to open up web pages and am extending it to take proxy into considerations. I have following example on http://www.pinvoke.net/default.aspx/wininet/internetsetoption.html to use InternetSetOption() to go through specified proxy and tested that it works. Now the hurdle is I tried everything but failed to pass username and password with following code: //-- Set Proxy Username bool resultF = InternetSetOption(IntPtr.Zero, INTERNET_OPTION_PROXY_USERNAME, username, username.Length+1); var errorF = Marshal.GetLastWin32Error(); //-- Set Proxy Password bool resultG = InternetSetOption(IntPtr.Zero, INTERNET_OPTION_PROXY_PASSWORD, password, password.Length+1); var errorG = Marshal.GetLastWin32Error(); Both resultF and resultG return true and has no errors but it still working. Any hint on what may be happening here? and what method do I have to debug this? Thanks in advance.

    Read the article

  • Ruby Regexp: + vs *. special behaviour?

    - by seb
    Using ruby regexp I get the following results: >> 'foobar'[/o+/] => "oo" >> 'foobar'[/o*/] => "" But: >> 'foobar'[/fo+/] => "foo" >> 'foobar'[/fo*/] => "foo" The documentation says: *: zero or more repetitions of the preceding +: one or more repetitions of the preceding So i expect that 'foobar'[/o*/] returns the same result as 'foobar'[/o+/] Does anybody have an explanation for that

    Read the article

  • Convert to list after Cast<T>

    - by Timmie Sarjanen
    Hi, I need to convert an IQueryable to List(is it possible to convert to IList?). There had not been an problem if it was not that i need to Cast because I have interfaces to my objects. I've tried most things but for some reason I must run Cast first and then ToList() which generates System.NullReferenceException. How do I solve this? public IQueryable GetPhrases() { return (from r in _repository.All<Phrase>() select r).Cast<IPhrase() }

    Read the article

  • which language to use for building web application?

    - by harshit
    Hi I already have experience in developing websites using java technologies ... Now i have a task to develop another website and i have the liberty to select technology to built. I dont want to built using Java/J2ee standard technology as i want to learn new language. The specification about website i can give is that: 1) its a real estate based site. 2) so it will have a db of real estate data around million records 3) website will have more than 1000 hits /day and will have various functionality like search, add , delete,generate reports etc. So i mean UI should be good and fast. Technologies i have in mind .NEt( i have already worked on it but it licensed so may not go for it) , Groovy, Ruby on rails ,Play, GWT etc ... I am a college student and the website is again of a student(non techie guy) so i have 5-6 mnths to bring the website up I have read about them but all have adv and disadv but would like to hear from people who have used it and can tell me what they felt about the languages and problems while developing it.. Please feel free to drop any opinion you feel . Thanks

    Read the article

  • Christian Beauclair on Azure

    - by guybarrette
    Microsoft Canada’s Christian Beauclair was interviewed for an IT in Canada article where he describes these Cloud patterns: Transparency Scale in multi tenancy Burst compute Elastic storage Read it here var addthis_pub="guybarrette";

    Read the article

  • Techie Land Silly Questions

    - by GeekAgilistMercenary
    Ok, it is time for an off the cuff, random, oddball, just for fun blog entry.  Two questions for the readers in Internet Land. Question #1:  If you did not have to work, had a few dollars stashed away so that you could live comfortably and do whatever you wanted, what would you do?  Would you still code?  Would you still create?  What would you create?  Would you be able to stay idle? Question #2:  Based on whatever you did with your free time, what would you title yourself?  Chief Potato Masher, Pencil Pushing Writer o’ Stories, or Coffee Endeavorer o’ Tastiness? There are a million possibilities, I would love to know what you would call yourself, so please do leave a comment or three. I will have my answers later in the week.  So stay tuned and help me out with some comments.  You can bet it will include something along the lines of what I already do, but I'll keep it a secret until then.  : )  Feel free to check out the original entry here to leave a comment.

    Read the article

  • low-cost RAID NAS for home use?

    - by gravyface
    Have a noisy, power-hungry Pentium 4 based Ubuntu server that I want to replace with a nice, low-power mini-ITX/Intel Atom-based machine to do my network services (DHCP, DNS, IPSec, Web/mail, FTP, etc.) and am thinking of a (hopefully) equally-low powered NAS using NFS over GbE with at least 1 TB space and a RAID 5 (preferred) or RAID 0 (likely) configuration for redundancy with a couple of spare disks I can swap in as needed down the road. Would I be better off getting a full sized ATX mobo/case and configuring the RAID internally? I really want to keep power consumption down as much as possible as I leave my home server up 24/7.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >