Search Results

Search found 45 results on 2 pages for 'malfist'.

Page 2/2 | < Previous Page | 1 2 

  • Flash type casting gone wrong

    - by Malfist
    Sorry, I'm new to flash I have this line of code: BaseEntry( _entryList[i] ).topTeamName = ((Team)(teamList.getNameAtIndex( i*2 ))).Name; and I get the error: TypeError: Error #1034: Type Coercion failed: cannot convert "[object Team]" to ncaa.Data.Team. What do I need to do to fix it?

    Read the article

  • a multi-component truth table for assembly

    - by Malfist
    Can someone help me convert this C if statement into something assembly can understand? if((plain>='a' && plain<='x') || (plain>='A' && plain <='X')){ code = plain+2; } plain is a char, which for assembly is stored in the al register. Any help would be appreciated.

    Read the article

  • Help me understand WebDAV and Autoversioning

    - by Malfist
    I just read the WebDAV Appendex in the O'Reilly Subversion book. I don't quite understand it. It talked about users being able to "mount" WebDAV directories (trees) and manipulate the files like they would normally and on saves the server would automagically create a new revision. The way it explained it, it sounded like it would work for any program, but then at the end of the appendix, it listed a series of programs that worked with WebDAV servers, which leads me to think that maybe it doesn't work like it originally described it. My question is this: How exactly do you interact with a WebDAV repository? Can I do this for example: Copy a file locally via ftp, edit it with notepad++, and then upload it via ftp to the server and have the server do a commit and create a new revision with the file I just edited and uploaded. Also, if that is possible, what happens if two people edit the file locally (on their machines) and uploaded two reversions to the server? With webDAV will I be able to replace Dreamweaver's "Oops, someone edited this before you" with simple ftp uploads and subversion conflict resolutions?

    Read the article

  • Subversion freaking out on me!

    - by Malfist
    I have two copies of a site, one is the production copy, and the other is the development copy. I recently added everything in the production to a subversion repository hosted on our linux backup server. I created a tag of the current version and I was done. I then copied the development copy overtop of the production copy (on my local machine where I have everything checked out). There are only 10-20 files changed, however, when I use tortoise SVN to do a commit, it says every file has changed. The diff file generated shows subversion removing everything, and replacing it with the new version (which is the exact same). What is going on? How do I fix it? An example diff: Index: C:/Users/jhollon/Documents/Visual Studio 2008/Projects/saloon/trunk/components/index.html =================================================================== --- C:/Users/jhollon/Documents/Visual Studio 2008/Projects/saloon/trunk/components/index.html (revision 5) +++ C:/Users/jhollon/Documents/Visual Studio 2008/Projects/saloon/trunk/components/index.html (working copy) @@ -1,4 +1,4 @@ -<html> -<body bgcolor="#FFFFFF"> -</body> +<html> +<body bgcolor="#FFFFFF"> +</body> </html> \ No newline at end of file

    Read the article

  • DBConcurrencyException happening on second delete

    - by Malfist
    My code keeps throwing a DBConcurrencyException ("Concurrency violation: the DeleteCommand affected 0 of the expected 1 records.) when I make a second update to the data table. The problem actually happens on a table that is linked to a parent table. The two tables, CashReceipts and CashReceiptsApplyTo are displayed on the same winform, and when I delete two cash receipts the update on cash receipt apply to's table fails with the dbconcurrencyexception (the table is updated everytime the binding source [linked to a binding navigator] changes position). Here is my code: protected override void saveToDatabase() { tblCashReceiptsBindingSource.EndEdit(); tblCashReceiptsTableAdapter.Update(rentalEaseDataSet.tblCashReceipts); //update the datatable foreach (DataGridViewRow viewRow in viewApplications.Rows) { if (viewRow.Cells[colAppID.Index].Value == null || viewRow.Cells[colApplyTo.Index].Value == null) { continue; } else if ((int)viewRow.Cells[colAppID.Index].Value == -1) { insertNewRow(viewRow); } else { updateRow(viewRow); } } try { tblCashReceiptsApplyToTableAdapter.Update(rentalEaseDataSet.tblCashReceiptsApplyTo); //tblCashReceiptsApplyToTableAdapter.Fill(rentalEaseDataSet.tblCashReceiptsApplyTo); ); } catch (Exception e) { Bitmap bitmap = new Bitmap(this.Width, this.Height); this.DrawToBitmap(bitmap, new Rectangle(0, 0, this.Width, this.Height)); saveScreenshot(this.GetType().FullName, e.Message, bitmap); MessageBox.Show("There was an error saving your changes. This means that you should close the form, and re-enter the last Receipt you entered.\n\nPlease report this."); } } The insertNewRow, and updateRow are simple: private void updateRow(DataGridViewRow viewRow) { //be forgiving if ((int)viewRow.Cells[colAppID.Index].Value == -1) { insertNewRow(viewRow); return; } //find row in table, if it's not there, crash and burn RentalEaseDataSet.tblCashReceiptsApplyToRow updateRow = rentalEaseDataSet.tblCashReceiptsApplyTo.Select("ID = " + viewRow.Cells[colAppID.Index].Value.ToString())[0] as RentalEaseDataSet.tblCashReceiptsApplyToRow; updateRow.BeginEdit(); updateRow.CashReceiptsID = (int)viewRow.Cells[colCashReceipt.Index].Value; updateRow.ApplyTo = (int)viewRow.Cells[colApplyTo.Index].Value; updateRow.Paid = CurrencyToDecimal(viewRow.Cells[colPaid.Index].Value); if (viewRow.Cells[colMemo.Index].Value != null) { updateRow.Memo = viewRow.Cells[colMemo.Index].Value.ToString(); } else { updateRow.SetMemoNull(); } updateRow.EndEdit(); } private void insertNewRow(DataGridViewRow viewRow) { //be forgiving if ((int)viewRow.Cells[colAppID.Index].Value != -1) { updateRow(viewRow); return; } RentalEaseDataSet.tblCashReceiptsApplyToRow newRow = rentalEaseDataSet.tblCashReceiptsApplyTo.NewRow() as RentalEaseDataSet.tblCashReceiptsApplyToRow; newRow.CashReceiptsID = (int) viewRow.Cells[colCashReceipt.Index].Value; newRow.ApplyTo = (int) viewRow.Cells[colApplyTo.Index].Value; newRow.Paid = CurrencyToDecimal(viewRow.Cells[colPaid.Index].Value); if (viewRow.Cells[colMemo.Index].Value != null) { newRow.Memo = viewRow.Cells[colMemo.Index].Value.ToString(); } rentalEaseDataSet.tblCashReceiptsApplyTo.Rows.Add(newRow); //update the ID viewRow.Cells[colAppID.Index].Value = newRow.ID; } Any idea why it would throw that error on the second delete?

    Read the article

  • Reading and writing in parallel

    - by Malfist
    I want to be able to read and write a large file in parallel, or if not in parallel, at least in blocks so that I don't use up so much memory. This is my current code: // Define memory stream which will be used to hold encrypted data. MemoryStream memoryStream = new MemoryStream(); // Define cryptographic stream (always use Write mode for encryption). CryptoStream cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write); //start encrypting using (BinaryReader reader = new BinaryReader(File.Open(fileIn, FileMode.Open))) { byte[] buffer = new byte[1024 * 1024]; int read = 0; do { read = reader.Read(buffer, 0, buffer.Length); cryptoStream.Write(buffer, 0, read); } while (read == buffer.Length); } // Finish encrypting. cryptoStream.FlushFinalBlock(); // Convert our encrypted data from a memory stream into a byte array. //byte[] cipherTextBytes = memoryStream.ToArray(); //write our memory stream to a file memoryStream.Position = 0; using (BinaryWriter writer = new BinaryWriter(File.Open(fileOut, FileMode.Create))) { byte[] buffer = new byte[1024 * 1024]; int read = 0; do { read = memoryStream.Read(buffer, 0, buffer.Length); writer.Write(buffer, 0, read); } while (read == buffer.Length); } // Close both streams. memoryStream.Close(); cryptoStream.Close(); As you can see, it reads the entire file into memory, encrypts it, then writes it out. If I happen to be encrypting files that are very large (2GB+) it tends not to work, or at the very least, consumes ~97% of my memory. How could I do it in a more effective manner?

    Read the article

  • Selecting text and focusing on a textbox

    - by Malfist
    I'm trying to programmatically select the text in a textbox, and focus on it too, so that when the form is launch the user only has to start typing and it will replace what is already there. I've been using the code: stage.focus = _finalScoreTF; _finalScoreTF.setSelection(0, _finalScoreTF.text.length - 1); but it doesn't work...any ideas?

    Read the article

  • Generating Color Gradient

    - by Malfist
    I want to display to my user how many (percent wise) of their forms are compliant with the new standard. The way I want to let them know visually is the percent amount will be colored. It will be 0xFF0000 (pure red) for 0% and 0x00FF00 (pure green) at 100%. What is the best way to calculate the color for each step along the way?

    Read the article

  • How to prevent leaving an Icon in System Tray on exit?

    - by Malfist
    My program puts an icon in the system tray because the user may minimize to it. However, if the application crashes, or I stop the app from running in VS it leaves the icon in it until I hover over it with the mouse. Sometimes I'll look down there and there will be 10 or so icons. I can I make sure the icon goes away?

    Read the article

  • Why not use HTTPS for everything?

    - by Malfist
    If I was setting up a server, and had the SSL certificate(s), why wouldn't I use HTTPS for the entire site instead of just for purchases/logins? I would think it would make more sense just to encrypt the entire site, and protect the user entirely. It would prevent problems such as deciding what has to be secured because everything would be, and it's not really an inconvenience to the user. If I was already using an HTTPS for part of the site, why wouldn't I want to use it for the entire site?

    Read the article

  • Object Events, how do are they implemented

    - by Malfist
    Events are really awesome, and I wouldn't know what I would do without them, but they're a mystery to me. I'm talking about events in a sense, a function(s) is called if a property, or value, a special event happens. I have only the vaguest idea how these actually work. I know it's an observer pattern, but I don't truly know how it works and/or how to implement it. Can someone explain that to me?

    Read the article

  • Best way to store this data?

    - by Malfist
    I have just been assigned to renovate an old website, and I get to move it from some old archaic system to drupal. The only problem is that it's a real-estate system and a lot of data is stored. Currently all the information is stored in a single table, an id represents the house and then everything else is key/value pairs. There are a possible 243 keys per estate, there are 23840 estates in the system. As you can imagine the system is slow and difficult to query. I don't think a table with 243 rows would be a very good idea, and probably worse than the current situation. I've done some investigating and here's what I've found out: Missing data does not indicate a 0 value, data is merged from two, unique sources/formats. Some guessing is involved. I have no control over the source of the data. There are 4 keys that are common to all estates, all values look like something that is commonly searched for and could be indexed There are 10 keys that are in the [90-100)% range 8 of these are information like who's selling it, and it's address. The other two seem to belong with the below range There are 80 keys that are in the [80-90)% range This range seems to mostly just list room types and how many the house has (e.g. bedrooms_possible, bathrooms, family_room_3rd, etc) This range also includes some minor information like school districts, one or two more pieces of data on the address. The 179 keys that are in the [0-80)% range include all sorts of miscellaneous information about the estate My best idea was a hybrid approach, create a table that stores important, common information and keep a smaller key/value table. How would you store this information?

    Read the article

  • Question about custom events

    - by Malfist
    I'm making custom events for C# and sometimes it isn't working. This is how I'm making the event happen: private bool isDoorOpen; public bool IsDoorOpen { get { return isDoorOpen;} private set { isDoorOpen = value; DoorsChangeState(this, null);} } And these are the event declarations: //events public delegate void ChangedEventHandler(Elevator sender, EventArgs e); public event ChangedEventHandler PositionChanged; public event ChangedEventHandler DirectionChanged; public event ChangedEventHandler BreaksChangeState; public event ChangedEventHandler DoorsChangeState; This works as long as there are methods attached to the events, but if there isn't, it throws a null ref exception. What am I doing wrong?

    Read the article

  • Trying all permutations

    - by Malfist
    For my program, I am trying to assist the user, and reduce his or her work load. There are four input numbers. There is also an indeterminate amount of numbers they can be applied too. For example, they four input numbers could be {4,7,3,2} and the numbers they can be applied to are {4,9,23} The result should be: 4 (input) was applied to 4, leaving the sets looking like: {0,7,3,2} and then 7,2 (input) are applied to 9 leaving the sets looking like: {0,0,3,0} and {0,0,23} and because 3 or any other permutation including 3 does not match 23, 3 remains. How would I do this?

    Read the article

  • Rsync module path needs to be a home directory

    - by Malfist
    I'm trying to use rsync to backup windows servers to an rsync server. I'm having problems with rsync on the linux side though, it doesn't like symlinks. Currently I'm trying to use the module path of ~/backup, but rsync says that the chroot failed. I looked up what to do and saw that I needed to add the option use chroot = no and munge symlinks = no. That fixed the @ERROR: chroot failed but now it's telling me @ERROR: chdir failed and the log files say that there is no ~/backup directory. I know the user I'm authenticating with has a backup folder in his directory. How can I fix this? For reference I'm using a .NET port of rsync called NetSync and tunneling it over a port forwarded SSH connection generated with granados.

    Read the article

< Previous Page | 1 2