Search Results

Search found 3 results on 1 pages for 'dutchie432'.

Page 1/1 | 1 

  • C# Object Array CopyTo links both arrays' values?

    - by Dutchie432
    Okay, I have what I think is a simple question.. or just a case of me being a C# beginner. I have an array of custom objects (clsScriptItem) that I am populating from a database. Once the items are loaded, I want to back them up to "backup" array so I can revert the information back after changing the main array. However, when I use CopyTo to copy the array and then alter the original array, the backup array is also being altered... I though CopyTo merely copied values + structure from one array to another. private void backupItems() { lastSavedItems = new clsScriptItem[items.Length]; items.CopyTo(lastSavedItems, 0); //items[0].nexts[0] is 2 //lastSavedItems[0].nexts[0] is 2 items[0].nexts[0] = "-1"; //items[0].nexts[0] is -1 //lastSavedItems[0].nexts[0] is also -1 } How do I backup this data without having the two arrays be 'linked'??

    Read the article

  • Trying to call JS Code that is passed back from AJAX call....

    - by Dutchie432
    Okay, so I have an javascript function that retrieves some HTML... function updateQuestions(i){ var url = 'getQuestions.php?sys=' + i; if (receiveReq.readyState == 4 || receiveReq.readyState == 0) { receiveReq.open("GET", url, true); receiveReq.onreadystatechange = handleQuestionsUpdate; receiveReq.send(null); } } function handleQuestionsUpdate() { if (receiveReq.readyState == 4) { var a=receiveReq.responseText; document.getElementById('questions').innerHTML=a; checkSpeakers(); //Error Occurs Here, even though checkSpeakers() is a function in the returned HTML chunk. } } This HTML is not just HTML, but it is more specifically a form and a chunk of javascript. The javascript is hard-coded into the HTML and not referenced by <script src=".."> Is it normal that this retrieved JS code isn't recognized upon call-time? If so, what is my alternative if I need the JS to change every time the div is update? Now

    Read the article

  • PHP is truncating MSSQL Blob data (4096b), even after setting INI values. Am I missing one?

    - by Dutchie432
    I am writing a PHP script that goes through a table and extracts the varbinary(max) blob data from each record into an external file. The code is working perfectly, except when a file is over 4096b - the data is truncated at exactly 4096. I've modified the values for mssql.textlimit, mssql.textsize, and odbc.defaultlrl without any success. Am I missing something here? <?php ini_set("mssql.textlimit" , "2147483647"); ini_set("mssql.textsize" , "2147483647"); ini_set("odbc.defaultlrl", "0"); include_once('common.php'); $id=$_REQUEST['i']; $q = odbc_exec($connect, "Select id,filename,documentBin from Projectdocuments where id = $id"); if (odbc_fetch_row($q)){ echo "Trying $filename ... "; $fileName="projectPhotos/docs/".odbc_result($q,"filename"); if (file_exists($fileName)){ unlink($fileName); } if($fh = fopen($fileName, "wb")) { $binData=odbc_result($q,"documentBin"); fwrite($fh, $binData) ; fclose($fh); $size = filesize($fileName); echo ("$fileName<br />Done ($size)<br><br>"); }else { echo ("$fileName Failed<br>"); } } ?> OUTPUT Trying ... projectPhotos/docs/file1.pdf Done (4096) Trying ... projectPhotos/docs/file2.zip Done (4096) Trying ... projectPhotos/docsv3.pdf Done (4096) etc..

    Read the article

1