Search Results

Search found 17945 results on 718 pages for 'last fm'.

Page 29/718 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Read an object from compressed file generated from ActionScript 3

    - by Last Chance
    I have made a simple game Map Editor and I want to save a array that contain map tile info to a file, as below: var arr:Array = [.....2d tile info in it...]; var ba:ByteArray = new ByteArray(); ba.writeObject(arr); ba.compress(); var file:File = new File(); file.save(ba); I had successfully saved a compressed object to a file. Now the problem is my server side need to read this file and decompress the array out from the file, then convert it to a Python list. Is that possible?

    Read the article

  • How it was detected if last ACK lost in TCP connection termination procedure?

    - by sonali
    In TCP Connection Termination, when client enters in TIME_WAIT state means the client waits for a period of time equal to double the maximum segment life (MSL) time, to ensure the ACK it sent was received. (I read above from a book computer networking by kurose and also given in following URL http://www.tcpipguide.com/free/t_TCPConnectionTermination-2.htm ) But how it was detected if last ACK(send by client as a response to server FIN) lost?

    Read the article

  • Is there a more elegant way to act on the first and last items in a foreach enumeration than count++

    - by Edward Tanguay
    Is there a more elegant way to act on the first and last items when iterating through a foreach loop than incrementing a separate counter and checking it each time? For instance, the following code outputs: >>> [line1], [line2], [line3], [line4] <<< which requires knowing when you are acting on the first and last item. Is there a more elegant way to do this now in C# 3 / C# 4? It seems like I could use .Last() or .First() or something like that. using System; using System.Collections.Generic; using System.Text; namespace TestForNext29343 { class Program { static void Main(string[] args) { StringBuilder sb = new StringBuilder(); List<string> lines = new List<string> { "line1", "line2", "line3", "line4" }; int index = 0; foreach (var line in lines) { if (index == 0) sb.Append(">>> "); sb.Append("[" + line + "]"); if (index < lines.Count - 1) sb.Append(", "); else sb.Append(" <<<"); index++; } Console.WriteLine(sb.ToString()); Console.ReadLine(); } } }

    Read the article

  • How can I determine when an InnoDB table was last changed?

    - by David M
    I've had success in the past storing the (heavily) processed results of a database query in memcached, using the last update time of the underlying tables(s) as part of the cache key. For MyISAM tables, that last changed time is available in SHOW TABLE STATUS. Unfortunately, that's usually NULL for InnoDB tables. In MySQL 4.1, the ctime for an InnoDB in its SHOW TABLE STATUS line was usually its actual last update time, but that doesn't seem to be true for MySQL 5.1. There is a DATETIME field in the table, but it only shows when a row has been modified - it cannot show the deletion time of a row that's not there anymore! So, I really cannot use MAX(update_time). Here's the really tricky part. I have a number of replicas that I do reads from. Can I figure out the state of the table that doesn't rely on when the changes have actually been applied? My conclusion after working on this for a while is that it's not going to be possible to get this information as cheaply as I'd like. I'm probably going to cache data until the time that I expect the table to change (it's updated once a day), and let the query cache help out where it can.

    Read the article

  • Howto open a file and remove the last line?

    - by sologhost
    I am looking to open up a file, grab the last line in the file where the line = "?", which is the closing tag for a php document. Than I am wanting to append data into it and add back in the "?" to the very last line. I've been trying a few approaches, but I'm not having any luck. Here's what I got so far, as I am reading from a zip file. Though I know this is all wrong, just needing some help with this please... // Open for reading is all we can do with zips and is all we need. if (zip_entry_open($zipOpen, $zipFile, "r")) { $fstream = zip_entry_read($zipFile, zip_entry_filesize($zipFile)); $fp = fopen($curr_lang_file, 'r+b'); while (!feof($fp)) { $output = fgets($fp, 16384); if (trim($output) == '?>') break; fwrite($fp, $output); } fclose($fp); file_put_contents($curr_lang_file, $fstream, FILE_APPEND); } $curr_lang_file is a filepath string to the actual file that needs to have the fstream appended to it, but after we remove the last line that equals '?'

    Read the article

  • git: How to move last N commits made to master, into own branch?

    - by amn
    Hi all, I have a repository where I had been working on master branch having last committed some 10 or so commits which I now wish were in another branch, as they describe work that I now consider experimental (i am still learning good git practices). Basically I would like to have these last 10 commits starting from a point in master to form another branch instead, so that I can have my master in a release state (which is what I strive for.) So, this is what I have (rightmost X is the last commit good for release): b--b (feature B) / X--X--X--Z--Z--Z--Z--Z--Z (master) \ a--a--a (feature A) You can see that both X and Z are on master, while I want commits marked by Z (my feature Z work) to lie on their own feature branch, and so that rightmost X is at the tip of master forming a good master branch tip. I guess this is what I want: b--b (feature B) / X--X--X (master) \ \ \ Z--Z--Z--Z--Z--Z (feature Z - the branch I want Z on) a--a--a (feature A) That way I will have my master always ready for release, and merge A, B and Z features when the time comes. Hope I am making sense here...

    Read the article

  • How to open a file and remove the last line?

    - by sologhost
    I am looking to open up a file, grab the last line in the file where the line = "?", which is the closing tag for a php document. Than I am wanting to append data into it and add back in the "?" to the very last line. I've been trying a few approaches, but I'm not having any luck. Here's what I got so far, as I am reading from a zip file. Though I know this is all wrong, just needing some help with this please... // Open for reading is all we can do with zips and is all we need. if (zip_entry_open($zipOpen, $zipFile, "r")) { $fstream = zip_entry_read($zipFile, zip_entry_filesize($zipFile)); $fp = fopen($curr_lang_file, 'r+b'); while (!feof($fp)) { $output = fgets($fp, 16384); if (trim($output) == '?>') break; fwrite($fp, $output); } fclose($fp); file_put_contents($curr_lang_file, $fstream, FILE_APPEND); } $curr_lang_file is a filepath string to the actual file that needs to have the fstream appended to it, but after we remove the last line that equals '?'

    Read the article

  • Windows 7 login screen show only last user and "Other User" icons after profile problem.

    - by Mike Thompson
    I recently had a profile problem with my Windows 7 PC. My original profile in the registry had ".bak" appended to it and a new profile was created. I was unable to login with the new profile. I fixed this immediate problem by logging on in safe mode. This enabled me to restore my original profile. However, since that moment the login screen now operates differently. Instead of showing icons for all the users with accounts on the PC, it now only shows two icons. The first icon is the last user who logged on and the second icon always shows "Other User". I have tried several different solutions recommended by other people with similar problems, but none of them have fixed the problem. I think the person who started this thread has the same problem, but none of the proposed solutions helped him either. Any help much appreciated.

    Read the article

  • On Windows 7, the last access date is not changed even after reading the file?

    - by Jian Lin
    I have some files on Windows 7, and want to see what time it was that I read it this morning (February 27 morning), but when I right click on the file and choose Properties, I see Accessed: Yesterday, Feb 26, 2011, 2:12:37PM so I open the file to read the content again, and then open up the Properties again, and still the Accessed (date) is the same (Feb 26). Even if I add a column to the folder for "Date Accessed", it still shows Feb 26. But today is Feb 27 and clearly I have "accessed" it... so how can I see the true last accessed date?

    Read the article

  • Is it possible to open Adobe Illustrator files from last close?

    - by ksy
    Say you have three files open in Adobe Illustrator, but you exit out of the program. Is there a way that you can have those three files opened back up when you open up Illustrator again? Similar to how most text editor programs are set up -- so when you open up the program again all your last stayed-open files are there. Also, does anyone know what the terminology for this saving-behavior is? State-saving? Googling to find the answer is difficult within the sea of Illustrator 'saving files' questions.

    Read the article

  • How can I remove the ssh last login info?

    - by Gnijuohz
    Whenever I log into a server using ssh. The prompt gives me "last login" information. I was wondering where this information comes from. How can I remove this record so when someone else log into the same server, the person would see my login info with my ip in it? So how can I do this? For the record, I am not hacking someone's computer and the server runs Ubuntu 12.04. EDIT: which file logs this kind of information? If I find the file, then I can do anything to it as root. Thanks.

    Read the article

  • VIM: How do you get the last ex command you used?

    - by TrevorBoydSmith
    I find that sometimes I write a really long ex mode command that do lots of stuff. They are sort of "mini-scripts" that I write in the text editor then I start ex mode and copy them into the ex line and execute. But then I always end up editing in the ex mode and then I find it difficult to get the changes i did in ex mode back to my text editing session. Using the keyboard, how do you copy the last ex command you used and paste it into your text editor? (Note: This is sort of the opposite of this question "how do I copy/paste in vim ex mode" where the user asks "how do you copy from the text editor and paste INTO the ex mode?". My question is the opposite because I wish to copy from the ex mode and paste into my text editor.)

    Read the article

  • logrotate> removing delaycompress function: should I compress the last log myself?

    - by user120006
    I'm removing the delaycompress function from my logrotating script. Before running logrotate again, should I compress the last log myself ? This is the actual situation: -rw-r----- 1 root adm 4,7M 5 mag 18:38 access.log -rw-r----- 1 root adm 5,2M 29 apr 05:44 access.log.1 -rw-r----- 1 root adm 473K 22 apr 05:45 access.log.2.gz -rw-r----- 1 root adm 605K 15 apr 05:44 access.log.3.gz -rw-r----- 1 root adm 588K 8 apr 05:44 access.log.4.gz The question is: Should I compress "access.log.1" and THEN launch logrotate ? Or logrotate will understand I removed the "delaycompress" option and fix things himself ?

    Read the article

  • How do I restore a SQL Server database from last night's full backup and the active transaction log file?

    - by Dylan Beattie
    I have been told that it's good practise to keep your SQL Server data files and log files on physically separate disks, because it'll allow you to recover your data to the point of failure if the data drive fails. So... let's say that mydata.mdf is on drive D:, and my mydata_log.ldf is on drive E:, and it's 16:45, and drive D: has just died horribly. So - I have last night's full backup (mydata.bak). I have hourly transaction-log backups that will bring the data back up to 16:00... but that means I'll lose 45 minutes worth of updates. I still have mydata_log.ldf on the E: drive, which should contain EVERY transaction that was committed right up to the point where the drive failed. How do I go about recreating the database and restoring data from the backup file and the live transaction log, so I don't lose any updates? Is this possible?

    Read the article

  • Change windows default path or last used path for saving files? Is that possible?

    - by Mark
    I'm trying to change the default saving path to my specfied path for example if the file is picture (.jpg .gif etc..) and using google chrome I save an image the path can be anything from default or last used so I want it to be mine specfied for example I choose "C:\SaveHerePics" I don't know how you can change it maybe Registry? Dll? I would like to create vb.net program with textbox you choose the new location to be located every time for example "C:\SaveHerePics" and it should not have anything to do with this program even if you close the program the default location for pictures saved via any program or source saved to "C:\SaveHerePics" Thanks a lot for your help!

    Read the article

  • WIndows 7: would like recursively check a directory for changes to files and folders since my last visit

    - by user1026169
    I have found varieties of this question. Most of them fall under monitoring and others are said to be buggy. A continuously monitoring program won't help me and neither will a list of the most recently modified files. I would like to check if the directory, its sub folders and files have changed since my last visit. It seems to me that I'd likely need a program that maintains and index of that directory and compares it with its condition when I tell it to. Then that program could output to a log for my use. This is on Windows 7 over a shared network, the folder(s) I'd like to check have 4-50GB of data. I did find this, however I am still learning how to program. I think it describes what I want: http://www.rgagnon.com/javadetails/java-0490.html Thanks for considering.

    Read the article

  • jQuery, get table cell at specific index

    - by Jarek Waliszko
    Hello, I know that I can get first or last table cell (ex for last row) using jquery expression like below: first cell: $('#table tr:last td:first') or last cell: $('#table tr:last td:last') Can I get cell at specific index, for example index 2, using similliar expression: ex: $('#table tr:last td:[2]')... Regards.

    Read the article

  • In C, is it possible do free only an array first ou last position?

    - by user354959
    Hi there! I've an array, but I don't need its first (or last) position. So I point a new variable to the rest of the array, but I should free the array first/last position. For instance: p = read_csv_file(); q = p + 1; // I don't need the first CSV file field // Here I'd like to free only the first position of p return q; Otherwise I've to memcpy the array to other variable, excluding the first position, and then free the original array. Like this: p = read_csv_file(); q = (int*) malloc(sizeof(int) * (SOME_SIZE - 1)); memcpy(q, p+1, sizeof(int) * (SOME_SIZE - 1)); free(p); return q; But then I'll have the overhead of copying all the array. Is this possible to only free a single position of an array?

    Read the article

  • Learning Python and trying to get first two letters and last two letters of a string.

    - by Sergio Tapia
    Here's my code: # B. both_ends # Given a string s, return a string made of the first 2 # and the last 2 chars of the original string, # so 'spring' yields 'spng'. However, if the string length # is less than 2, return instead the empty string. def both_ends(s): if len(s) <= 2: return "" else: return s[0] + s[1] + s[len(s)-2] + s[len(s-1)] # +++your code here+++ return Unfortunately my program doesn't run. :( I'm sure I'm overlooking something since I'm a newbie with Python. Here's the error: > Traceback (most recent call last): File "C:\Users\Sergio\Desktop\google-python-exercises\google-python-exercises\basic\string1.py", line 120, in <module> main() File "C:\Users\Sergio\Desktop\google-python-exercises\google-python-exercises\basic\string1.py", line 97, in main test(both_ends('spring'), 'spng') File "C:\Users\Sergio\Desktop\google-python-exercises\google-python-exercises\basic\string1.py", line 44, in both_ends return s[0] + s[1] + s[len(s)-2] + s[len(s-1)] TypeError: unsupported operand type(s) for -: 'str' and 'int' Thanks for the help guys. :D

    Read the article

  • editing a file with vim that has no EOL marker on the last line but has CRLF line endings

    - by rmeador
    I often have to edit script files, the interpreter for which treats files that have an EOL marker on the last line of the file as an error (i.e. the file is treating CRLF as "newlines", not as "line endings"). Currently, I open these files in Vim using binary mode (-b on the command line). It autodetects the lack of EOL on the final line and sets the "noeol" option appropriately, which prevents it from writing an EOL on the last line. Because the file has CRLF line endings, I get lots of ^Ms at the end of my lines (because it interprets only Unix-style line endings in binary mode, it seems). I can't open it in text mode because the "noeol" option is ignored for non-binary files. This is very annoying, and I always have to remember to manually type the ^M at the end of each line! Is there some way I can force it to accept DOS-style line endings in binary mode, or force it to listen to the EOL option in text mode?

    Read the article

  • How to add file revision (not the last changed revision) to Subclipse "Label decorations"?

    - by mlvljr
    Firstly, please beware I'm new to SVN. Then, my question has much in common with Get current revision number in Subclipse?. The (seeming) problem is (I use Ecpilse v3.5.0 (build id I20090611-1540)): My freshly installed Subclipse plugin offers "revision - last revision loaded into workspace" label under "Windows > Preferences > Team > SVN > Label decorations" That seems to correspond to "Last changed revision" under "File > Properties > Subversion" (and not the "Revision" there). Hence, the question.

    Read the article

  • How can I split a Perl string only on the last occurrence of the separator?

    - by kiruthika
    Hi All, my $str="1:2:3:4:5"; my ($a,$b)=split(':',$str,2); In the above code I have used limit as 2 ,so $a will contain 1 and remaining elements will be in $b. Like this I want the last element should be in one variable and the elements prior to the last element should be in another variable. Example $str = "1:2:3:4:5" ; # $a should have "1:2:3:4" and $b should have "5" $str = "2:3:4:5:3:2:5:5:3:2" # $a should have "2:3:4:5:3:2:5:5:3" and $b should have "2"

    Read the article

  • How to match the last url in a line containing multiple urls, using regular expressions?

    - by Mert Nuhoglu
    I want to write a regex that matches a url that ends with ".mp4" given that there are multiple urls in a line. For example, for the following line: "http://www.link.org/1610.jpg","Debt","http://www.archive.org/610_.mp4","66196517" Using the following pattern matches from the first http until mp4. (http:\/\/[^"].*?\.mp4)[",].*? How can I make it match only the last url only? Note that, the lines may contain any number of urls and anything in between. But only the last url contains .mp4 ending.

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >