Daily Archives

Articles indexed Sunday April 18 2010

Page 6/77 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • implement bank using python programming

    - by prajakta
    Write software for a bank. The program should be menu driven with the facility for bank employees to perform various operations. It should be written using all concepts of Object Oriented programming. You should be able to save your data in a file and read it back (because the bank people will shut down their computers when they go home :p ) Guidelines: The program may select to implement classes like Bank, Account, Savings Account, Fixed Deposit account, Customer, Depositor, Borrower, Transaction, etc.

    Read the article

  • What are the best practices for avoid xss attacks in a PHP site

    - by rikh
    I have PHP configured so that magic quotes are on and register globals are off. I do my best to always call htmlentities() for anything I am outputing that is derived from user input. I also occasionally seach my database for common things used in xss attached such as... <script What else should I be doing and how can I make sure that the things I am trying to do are always done.

    Read the article

  • How to be a verified publisher ?

    - by Frank
    I wrote an app and I want to sell it online, so I uploaded it to my website and tried to download and run it as a test, but a window appeared, it said : "The publisher could not be verified. Are you sure you want to run this software ?", and it also said : "Publisher : Unknown Publisher". It's actually a self-signed Java jar file wrapped into an exe file, I self-signed it with Netbeans6.7. I wonder what should I do to be a "known" publisher ? Frank

    Read the article

  • DataGridView lags for a second with large data updates

    - by alexD
    I have a DataGridView with about 400 rows and 10 columns. When the user first displays this table, it receives all of the data from the server and populates the table. The DGV uses a DataTable as it's data source, and when updating the DataTable I use row.BeginEdit/EndEdit and acceptChanges, but when the View itself is updated it lags for a second while all of the DGV is being updated. I am wondering if there is a way to make this smooth, so that for example, if the user is scrolling through the data and it updates, it won't interrupt the scrolling. Or if the user is moving the display around the screen and it updates, it won't interrupt. Is there an easy way to do this? If not, is there away to prevent the DGV from updating the view until all events have ended so it won't be repainted until the user stops scrolling, dragging, etc ?

    Read the article

  • My schtasks don't schedule anything. :(

    - by Waffles
    I'm trying to make a scheduled task, and its just not working for me. This is the command I type in CMD: schtasks /create /sc minute /mo 1 /tn test /tr calc.exe /st 19:17:00 /sd 12/14/2009 I'm trying to tell the computer to run calculator every minute starting at 7:09 PM. Although I get a success message after I type this in and hit enter, nothing happens at 7:09. What gives? Thanks in advance.

    Read the article

  • Using Array Controllers to restrict the view in one popup depending on the selection in another. Not

    - by mjohnh
    I am working on an app that is not core data based - the data feed is a series of web services. Two arrays are created from the data feed. The first holds season data, each array object being an NSDictionary. Two of the NSDictionary entries hold the data to be displayed in the popup ('seasonName') and an id ('seasonID') that acts as a pointer (in an external table) by matches defined for that season. The second array is also a collection of NSDictionaries. Two of the entries hold the data to be displayed in the popup ('matchDescription') and the id ('matchSeasonId') that points to the seasonId defined in the NSDictionaries in first array. I have two NSPopUps. I want the first to display the season names and the second to display the matches defined for that season, depending on the selection in the first. I'm new at bindings, so excuse me if I've missed something obvious. I've tried using ArrayControllers as follows: SeasonsArrayController: content bound to appDelegate seasonsPopUpArrayData. seasonsPopup: content bound to SeasonsArrayController.arrangedObjects; content value bound to SeasonsArrayController.arrangedObjects.seasonName I see the season names fine. I can obviously follow a similar route to see the matches, but I then see them all, instead of restricting the list to the matches for the season highlighted. All the tutorials I can find seem to revolve around core data and utilise the relationships defined therein. I don't have that luxury here. Any help very gratefully received.

    Read the article

  • Android - How to Use SQLiteDatabase.open?

    - by Edwin Lee
    Hi all, i'm trying to use SQLiteDatabase.openDatabase( "/data/data/edwin11.myapp/databases/myapp.db", null, (SQLiteDatabase.CREATE_IF_NECESSARY | SQLiteDatabase.NO_LOCALIZED_COLLATORS)); to create/open a database instead of making use of the SQLiteOpenHelper (because i want to pass in the flag SQLiteDatabase.NO_LOCALIZED_COLLATORS. However, i am getting this exception for that line of code: 04-18 09:50:03.585: ERROR/Database(3471): sqlite3_open_v2("/data/data/edwin11.myapp/databases/myapp.db", &handle, 6, NULL) failed 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): java.lang.RuntimeException: An error occured while executing doInBackground() 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at android.os.AsyncTask$3.done(AsyncTask.java:200) 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:234) 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:258) 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at java.util.concurrent.FutureTask.run(FutureTask.java:122) 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:648) 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:673) 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at java.lang.Thread.run(Thread.java:1060) 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): Caused by: android.database.sqlite.SQLiteException: unable to open database file 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at android.database.sqlite.SQLiteDatabase.dbopen(Native Method) 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1584) 04-18 09:50:03.665: ERROR/AndroidRuntime(3471): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:638) ... Doing some testing just before that line of code (using File.isExists) shows that the file /data/data/edwin11.myapp/databases/myapp.db does not exist. Would that be the cause of the error? (Or am i just using SQLiteDatabase.openDatabase the wrong way?) Would it help if i create the file beforehand? (Shouldn't that be taken care of by the SQLiteDatabase.CREATE_IF_NECESSARY flag that i passed in?) If creating the file manually is the way to go, is it just an empty file, or do i have to write something to it? Thanks and Regards.

    Read the article

  • pdftotext can't find any of the files to convert when called within a python script

    - by hatorade
    i have a python script which keeps crashing on: subprocess.call(["pdftotext", pdf_filename]) the error being: OSError: [Errno 2] No such file or directory the absolute path to the filename (which i am storing in a log file as i debug) is fine; on the command line, if i type pdftotext <pdf_filename_goes_here> it works for any of the alledgedly bad file names. but when called using subprocess in python i keep getting that error. what is going on???

    Read the article

  • Issue with dynamic array Queue data structure with void pointer

    - by Nazgulled
    Hi, Maybe there's no way to solve this the way I'd like it but I don't know everything so I better ask... I've implemented a simple Queue with a dynamic array so the user can initialize with whatever number of items it wants. I'm also trying to use a void pointer as to allow any data type, but that's the problem. Here's my code: typedef void * QueueValue; typedef struct sQueueItem { QueueValue value; } QueueItem; typedef struct sQueue { QueueItem *items; int first; int last; int size; int count; } Queue; void queueInitialize(Queue **queue, size_t size) { *queue = xmalloc(sizeof(Queue)); QueueItem *items = xmalloc(sizeof(QueueItem) * size); (*queue)->items = items; (*queue)->first = 0; (*queue)->last = 0; (*queue)->size = size; (*queue)->count = 0; } Bool queuePush(Queue * const queue, QueueValue value, size_t val_sz) { if(isNull(queue) || isFull(queue)) return FALSE; queue->items[queue->last].value = xmalloc(val_sz); memcpy(queue->items[queue->last].value, value, val_sz); queue->last = (queue->last+1) % queue->size; queue->count += 1; return TRUE; } Bool queuePop(Queue * const queue, QueueValue *value) { if(isEmpty(queue)) return FALSE; *value = queue->items[queue->first].value; free(queue->items[queue->first].value); queue->first = (queue->first+1) % queue->size; queue->count -= 1; return TRUE; } The problem lies on the queuePop function. When I call it, I lose the value because I free it right away. I can't seem to solve this dilemma. I want my library to be generic and modular. The user should not care about allocating and freeing memory, that's the library's job. How can the user still get the value from queuePop and let the library handle all memory allocs/frees?

    Read the article

  • Simple subclass mappable class in lift

    - by coubeatczech
    Hi, is there any way how to easy subclass a Mapped class in lift framework? class One extends LongKeyedMapper[One] with IdPK{ object sharedField extend MappedString(this) } class Two extends One[*]{ ... } *and now I can't hint the compiler because One is not defined generic. So this doesn't work, what is the right way?

    Read the article

  • Why doesn't my cursor change to an Hourglass in my FindDialog in Delphi?

    - by lkessler
    I am simply opening my FindDialog with: FindDialog.Execute; In my FindDialog.OnFind event, I want to change the cursor to an hourglass for searches through large files, which may take a few seconds. So in the OnFind event I do this: Screen.Cursor := crHourglass; (code that searches for the text and displays it) ... Screen.Cursor := crDefault; What happens is while searching for the text, the cursor properly changes to the hourglass (or rotating circle in Vista) and then back to the pointer when the search is completed. However, this only happens on the main form. It does not happen on the FindDialog itself. The default cursor remains on the FindDialog during the search. While the search is happening if I move the cursor over the FindDialog it changes to the default, and if I move it off and over the main form it becomes the hourglass. This does not seem like what is supposed to happen. Am I doing something wrong or does something special need to be done to get the cursor to be the hourglass on all forms? For reference, I'm using Delphi 2009.

    Read the article

  • Rails choking on the content of this request because of protect_from_forgery

    - by randombits
    I'm trying to simply test my RESTful API with cURL. Using the following invocation: curl -d "name=jimmy" -H "Content-Type: application/x-www-form-urlencoded" http://127.0.0.1:3000/people.xml -i Rails is dying though: ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): :8:in `synchronize' Looks like it's running this through a protect_from_forgery filter. I thought protect_from_forgery is excluded for non-HTML HTTP POST/PUT/DELETE type requests? This is clearly targeting the XML format. If I pass actual XML content, it works. But my users will be submitting POST data as URL encoded parameters. I know all the various ways I can disable protect_from_forgery but what's the proper way of handling this? I want to leave it on so that when I do have HTML based forms and handle format.html, I don't forget to re-enable it for then. I want users to be able to make HTTP POST requests to my XML-based API though and not get bombarded with this.

    Read the article

  • Can't start my Windows XP Virtual Machine: Insufficient Disk Space

    - by Rob
    Okay, I currently have a server with two virtual machines installed on it, a CentOS5.4 and a Windows XP. I was remote desktopping the Windows XP chatting on IRC, and all of a sudden I lost connection. I checked with my HyperVisor and tried to restart it, and it won't start at all. It's giving me this error: Message from server0297.serverpool.gnet.ba: Failed to extend swap file (fileHandle 16414) from 0 KB to 524288 KB: No space left on device. Could not power on VM : No space left on device. Failed to power on VM info 4/17/2010 9:49:20 PM root Basically I bought the set up from a host, he installed the HyperVisor and the VirtualMachines, and honestly I don't really know what I'm doing. I've looked at some of the settings, and I can't figure it out. If you need any additional information, I'll try to provide it. The CentOS5.4 is still starting and working flawlessly, if that's relevant.

    Read the article

  • How do you name your servers?

    - by awells527
    How do you decide what you name your servers? Do you keep it simple/boring like svr-01, svr-02; make it descriptive like citrix-01, share-01; or do you make it creative like the names of the planets, peanuts characters, etc?

    Read the article

  • How can I restore my original IME Romaji input settings?

    - by JOhn K
    the this one, Japanese IME on Windows: switch back to romaji input method (3) did not help. The problem seems the same. My Vista home premium version PC, I had been using Microsoft IME to use English and Japanese input using romaji henkan for a long time. One day, all of a sudden, first when I started up the PC, it has cap lock indicator ON. So, I press SHIFT key, CAP lock indicator is off!(This I have to do every morning.) Now when I want to type romaji input to change to Japanese, I switch EN English (United States) to "JP Japanese (Japan) and select input to hiragana input. It worked until that day. But now when I set to input romaji for hiragana as I used to do and start typing, then it shows Japanese hiragana directly on the display just as keyboard setting as Japanese ???109???????? as shown in Wikipedia JIS keyboard. And I cannot show hiragana as I wanted ( I can convert to Kanji OK) etc. by hitting space key. But its key board arrangement is what I never learned. Other thing I found is when I hit "`" key, it switches between hiragana and alphabet. When I see Control panel setting it is the same setting as I have seen. Please suggest me a solution to get the original setting for IME input mode as I used to do. John K.

    Read the article

  • Debugging of JavaScript

    - by Rachel
    I come from Java Background and so used to Debugging using Eclipse but have recently started on JavaScript(jQuery in particular) and am having really hard time debugging JavaScript Code so my question is What are the best ways of Debugging JavaScript ? I have tried using Firebug and it is good, but wanted to know If we have any other useful tools or stratergies for Debugging JavaScript ?

    Read the article

  • Oracle Coding Standards Feature Implementation

    - by Mike Hofer
    Okay, I have reached a sort of an impasse. In my open source project, a .NET-based Oracle database browser, I've implemented a bunch of refactoring tools. So far, so good. The one feature I was really hoping to implement was a big "Global Reformat" that would make the code (scripts, functions, procedures, packages, views, etc.) standards compliant. (I've always been saddened by the lack of decent SQL refactoring tools, and wanted to do something about it.) Unfortunatey, I am discovering, much to my chagrin, that there doesn't seem to be any one widely-used or even "generally accepted" standard for PL-SQL. That kind of puts a crimp on my implementation plans. My search has been fairly exhaustive. I've found lots of conflicting documents, threads and articles and the opinions are fairly diverse. (Comma placement, of all things, seems to generate quite a bit of debate.) So I'm faced with a couple of options: Add a feature that lets the user customize the standard and then reformat the code according to that standard. —OR— Add a feature that lets the user customize the standard and simply generate a violations list like StyleCop does, leaving the SQL untouched. In my mind, the first option saves the end-users a lot of work, but runs the risk of modifying SQL in potentially unwanted ways. The second option runs the risk of generating lots of warnings and doing no work whatsoever. (It'd just be generally annoying.) In either scenario, I still have no standard to go by. What I'd need to know from you guys is kind of poll-ish, but kind of not. If you were going to use a tool of this nature, what parts of your SQL code would you want it to warn you about or fix? Again, I'm just at a loss due to a lack of a cohesive standard. And given that there isn't anything out there that's officially published by Oracle, I think this is something the community could weigh in on. Also, given the way that voting works on SO, the votes would help to establish the popularity of a given "refactoring." P.S. The engine parses SQL into an expression tree so it can robustly analyze the SQL and reformat it. There should be quite a bit that we can do to correct the format of the SQL. But I am thinking that for the first release of the thing, layout is the primary concern. Though it is worth noting that the thing already has refactorings for converting keywords to upper case, and identifiers to lower case.

    Read the article

  • How to iterate over all the page breaks in an Excel 2003 worksheet via COM

    - by Martin
    I've been trying to retrieve the locations of all the page breaks on a given Excel 2003 worksheet over COM. Here's an example of the kind of thing I'm trying to do: Excel::HPageBreaksPtr pHPageBreaks = pSheet->GetHPageBreaks(); long count = pHPageBreaks->Count; for (long i=0; i < count; ++i) { Excel::HPageBreakPtr pHPageBreak = pHPageBreaks->GetItem(i+1); Excel::RangePtr pLocation = pHPageBreak->GetLocation(); printf("Page break at row %d\n", pLocation->Row); pLocation.Release(); pHPageBreak.Release(); } pHPageBreaks.Release(); I expect this to print out the row numbers of each of the horizontal page breaks in pSheet. The problem I'm having is that although count correctly indicates the number of page breaks in the worksheet, I can only ever seem to retrieve the first one. On the second run through the loop, calling pHPageBreaks->GetItem(i) throws an exception, with error number 0x8002000b, "invalid index". Attempting to use pHPageBreaks->Get_NewEnum() to get an enumerator to iterate over the collection also fails with the same error, immediately on the call to Get_NewEnum(). I've looked around for a solution, and the closest thing I've found so far is http://support.microsoft.com/kb/210663/en-us. I have tried activating various cells beyond the page breaks, including the cells just beyond the range to be printed, as well as the lower-right cell (IV65536), but it didn't help. If somebody can tell me how to get Excel to return the locations of all of the page breaks in a sheet, that would be awesome! Thank you. @Joel: Yes, I have tried displaying the user interface, and then setting ScreenUpdating to true - it produced the same results. Also, I have since tried combinations of setting pSheet->PrintArea to the entire worksheet and/or calling pSheet->ResetAllPageBreaks() before my call to get the HPageBreaks collection, which didn't help either. @Joel: I've used pSheet->UsedRange to determine the row to scroll past, and Excel does scroll past all the horizontal breaks, but I'm still having the same issue when I try to access the second one. Unfortunately, switching to Excel 2007 did not help either.

    Read the article

  • virtualbox - debian with no-ip

    - by JohnWong
    Hi. I have VB on my XP SP3. I am running one guest OS, Debian. I installed it using the 150MB, and everything seems to work fine. I am using 3.1.6 VB The purpose of this server is running php, mysql and django project. So I need access both locally and externally. I usually do it with my no-ip. I have experience with Ubuntu server, and using noip2 was a cake. I had this "domain" xxx.no-ip.org. I need this to be use on my debian server, so that I can type xxx.no-ip.org into the firefox (on my xp). I checked ifconfig, pstree. They showed that debian grabbed the right ip (it matched with my ip), and pstree showed noip2 has already been activated (under init.d) But I can't access to xxx.no-ip.org from my windows in firefox how come? back in the days when I used ubuntu as its own installation (instead of VM), noip2 worked like a cake without any twist. Any thoughts? Thank you!

    Read the article

  • java generics covariance

    - by soocracy42
    I am having trouble understanding the following article: http://www.ibm.com/developerworks/java/library/j-jtp01255.html Under, Generics are not covariant the author states, Because ln is a List, adding a Float to it seems perfectly legal. But if ln were aliased with li, then it would break the type-safety promise implicit in the definition of li -- that it is a list of integers, which is why generic types cannot be covariant. I can't understand the part where it says "if ln were aliased with li". What does the author means by alias?(reference?). The code snippet above the quoted line seems to illustrate WHAT is illegal in java and not WHY. It would be very helpful to me if somebody could explain with an example. Thanks in advance.

    Read the article

  • Free and Simple Hosting Solution with DB Support?

    - by darren
    Hi everyone I have compiled an sqlite database that I would like to make public. I want to provide a very simple webpage that has a few form elements which are used to query the database. Does anybody know of a free hosting solution that would provide me with free web and database functionality? I am familiar with Google App Engine and that would work but I don't want to spend time using their custom storage scheme. I'm looking for something free that I can put together very quickly. Thanks for any suggestions.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >