Search Results

Search found 1138 results on 46 pages for 'venerable garbage collector'.

Page 33/46 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • What happens to an instance of ServerSocket blocked inside accept(), when I drop all references to i

    - by Hanno Fietz
    In a multithreaded Java application, I just tracked down a strange-looking bug, realizing that what seemed to be happening was this: one of my objects was storing a reference to an instance of ServerSocket on startup, one thread would, in its main loop in run(), call accept() on the socket while the socket was still waiting for a connection, another thread would try to restart the component under some conditions, the restart process missed the cleanup sequence before it reached the initialization sequence as a result, the reference to the socket was overwritten with a new instance, which then wasn't able to bind() anymore the socket which was blocking inside the accept() wasn't accessible anymore, leaving a complete shutdown and restart of the application as the only way to get rid of it. Which leaves me wondering: with no references left to the ServerSocket instance, what would free the socket for a new connection? At what point would the ServerSocket become garbage collected? In general, what are good practices I can follow to avoid this type of bug?

    Read the article

  • Is it so bad to have heaps of elements in your DOM?

    - by alex
    I am making a real estate non interactive display for their shop window. I have kicked jCarousel into doing what I want: Add panels per AJAX Towards the end of the current set, go and AJAX some new panels and insert them This works fine, but it appears calling jQuery's remove() on the prior elements cause an ugly bump. I'm not sure if calling hide() will free up any resources, as the element will still exist (and the element will be off screen anyway). I've seen this, and tried carousel.reset() from within a callback. It just clears out all the elements. This will be running on Google Chrome on Windows XP, and will solely by displaying on LCD televisions. I am wondering, if I can't find a reasonable solution to remove the extra DOM elements, will it bring my application to a crawl, or will Chrome do some clever garbage collecting? Or, how would you solve this problem? Thanks

    Read the article

  • Writing a script to bypass college login page

    - by gtredcvb
    My college has a silly login page that requires you to download a whole bunch of garbage that a lot of us don't need (Norton Anti-virus, Antispyware software, etc.). We have to have them running to get on the internet on campus. Though, if you are on Linux, or at least set your user-agent to linux, the requirements are gone. We could easily use Firefox with the useragent switcher to bypass this, but it'd be nice to create a script that automates this. How would this be possible? I figure this could be written in python, and could grab the webpage with curl specifying a user agent? How would I go about posting the data back to the servers? Thanks

    Read the article

  • "Reloading" Bindings in Ninject2?

    - by Michael Stum
    I'm using Ninject2 for DI and I have a Module that loads data from a config file. I wonder if there is a way to tell the Kernel or the Module to reload the config? (I can trigger that through code if needed) What worries me is the lifetime of existing objects. Say I have ITest bound to TestImpl1 in Singleton Scope and I change the config to bind ITest to TestImpl2 instead. All new requests should get TestImpl2, but the classes that already requested TestImpl1 before obviously keep it. However, what if all users of TestImpl1 are gone - will TestImpl1 be properly garbage collected and disposed in case it implements IDisposable? Or will it just be orphaned? Do I have to loop through each type and call Unbind/Bind on it? Or can I just unload the entire Module and reload it while still managing any existing object?

    Read the article

  • How do I remove specific numbers from a string?

    - by user1666900
    I have this string in PHP Hopelessly Incredible |SPG:M| 766 STEAM_0:1:20130600 " banned "A Blatantly Obvious Hacker 740 STEAM_0:1:55386073 " (minutes "0") (reason "Multi-Hack") The Format of the string is: Name1 Number(0-3 digits) Steam_0:x:xxxx offense (banned/kicked/mute etc) Name2 Number(0-3 digits) Steam_0:x:xxxx time reason My goal is to remove the values 766 and 740 because it is just garbage. Those values can have single, double, and triple digits. The next step would be to strip STEAM_0:1:20130600 and STEAM_0:1:55386073 out of the string and capture it in a new variable. The only constant is STEAM_0: the rest can change. I am still learning regex but I fear this is a bit complicated for me to do. Some guidance would be most appreciative.

    Read the article

  • Japanese character stored in SQL Server DB using ASP page that assumed it as ISO-8859-1 encoding

    - by Vishal Seth
    We have a legacy ASP based product that allowed the UI and Data languages of user groups to be configured according to their locations. CodePage and CharSet in ASP pages collecting data was set accordingly. I've noticed few instances in the SQL Server DB where users posted Japanese characters in the ASP page that assumes the oncoming stream to be of ISO-8859-1/Western and as a result, the data in the SQL table has gobbled up. While upgrading the client to our new product, I want to back-convert those "garbage" Japanese (in some instances Chinese) characters back to their actual form. Can I create some utility ASP page that would go through such data values and "fix" the wrongly-encoded strings and store everything back as utf-8 strings? In any case, I don't want to affect my French/Spanish/English characters that might be there as well.

    Read the article

  • What are 3 C++ language features you expect AFTER C++0x?

    - by Vicente Botet Escriba
    If I have understood well C++0x is now on a phase to resolve pending issues, so no new features will be added. What I want to know is what new features you want to have in C++ after C++0x is released. Just to give you an idea, I have added major existing proposal that could be included after C++0x: Concepts, Contract Programming, Garbage Collection, Macro scopes, Modules, Multimethods, Reflection Answer with your favorite feature if not already in an answer and up-vote them if already present. Be free to add other features not included on this list. Please don't include here libraries. Only core language features.

    Read the article

  • Highly efficient filesystem APIs for certain kinds of operations

    - by romkyns
    I occasionally find myself needing certain filesystem APIs which could be implemented very efficiently if supported by the filesystem, but I've never heard of them. For example: Truncate file from the beginning, on an allocation unit boundary Split file into two on an allocation unit boundary Insert or remove a chunk from the middle of the file, again, on an allocation unit boundary The only way that I know of to do things like these is to rewrite the data into a new file. This has the benefit that the allocation unit is no longer relevant, but is extremely slow in comparison to some low-level filesystem magic. I understand that the alignment requirements mean that the methods aren't always applicable, but I think they can still be useful. For example, a file archiver may be able to trim down the archive very efficiently after the user deletes a file from the archive, even if that leaves a small amount of garbage either side for alignment reasons. Is it really the case that such APIs don't exist, or am I simply not aware of them? I am mostly interested in NTFS, but hearing about other filesystems will be interesting too.

    Read the article

  • Localizing a JSF 1.2 application with UTF-8 resources

    - by Filini
    (WARNING: this is my first java application, coming from .NET, so don't bash me if I write too much garbage) I'm developing a simple JSF 1.2 web application which should support Russian, Chinese, and other languages outside ISO 8859-1, which is automatically used in Properties.load(). Is there a way to use the Properties loaded from XML files, with Properties.loadFromXml(), inside JSF, without writing too much code? I know there are alternative ways to do so (writing my own loader, escaping the characters...), but I'd really love to find a simple solution, and I don't see it in all the forums I checked. Thanks in advance for any help

    Read the article

  • What new features do you want to have in C++ after C++0x is released?

    - by Vicente Botet Escriba
    If I have understood well C++0x is now on a phase to resolve pending issues, so no new features will be added. What I want to know is what new features you want to have in C++ after C++0x is released. Just to give you an idea, I have added major existing proposal that could be included after C++0x: Concepts, Contract Programming, Garbage Collection, Macro scopes, Modules, Multimethods, Reflection Answer with your favorite feature if not already in an answer and up-vote them if already present. Be free to add other features not included on this list. Please don't include here libraries. Only core language features.

    Read the article

  • What weird encoding is movistar Venezuela sms on blackberry using?

    - by cjp
    Send an sms using the normal GSM TextMessage API on the BlackBerry, get back garbage. It's not unicode, phone is set to 7-bit send. Byte size is only off by one. Is there some default crypto thing, or some weird encoding they use? This code works most everywhere else in the world; this definitely seems like a movistar problem. The string that comes back is random 7-bit ascii except for a few high order bytes. Needless to say the source input text is totally 7 bit chars, which should work in sms, ISO-8859 and look the same in UTF charsets. Anybody seen this or got sms working in code on movistar VZ blackberries?

    Read the article

  • C++: is it safe to read an integer variable that's being concurrently modified without locking?

    - by Hongli
    Suppose that I have an integer variable in a class, and this variable may be concurrently modified by other threads. Writes are protected by a mutex. Do I need to protect reads too? I've heard that there are some hardware architectures on which, if one thread modifies a variable, and another thread reads it, then the read result will be garbage; in this case I do need to protect reads. I've never seen such architectures though. This question assumes that a single transaction only consists of updating a single integer variable so I'm not worried about the states of any other variables that might also be involved in a transaction.

    Read the article

  • How can I count existing and non-existing values with MySQL?

    - by jaya malladi
    I am new to MySQL. I have a table with answer ids. Answers can look like this:a1, a2, a3 ..., but due to some problems some are NULL, some are blank, and some are others like 1 a etc. Now I want to calculate the count of ids with a1 a2 a3 distinctly. But how is it possible to do this leaving others like NULL, blanks and garbage. The output should look like this atype count a1 45 a2 0 a3 56 If there is no row entry for a particular answer, the count should be 0.

    Read the article

  • Need to convert a ZIP file to a random text file.

    - by Arsheep
    As title says need to convert a Zip file to text file , no matter the size and no matter if it will make sense or not.But i need to reconvert it to that zip file again (Lose less). The main problem i am having is how to find a alternative text/number version of a character. The Ascii wont work clearly ,So need help what can be a alternative text for a character specially that garbage looking binary chars in zip , when you see in a editor. I am not a native English speaker , so i hope the above will make a sense to you guys :)

    Read the article

  • How to do something after effect animation ends in Flex?

    - by Chobicus
    I'm a beginner in Flex so there must be more elegant way of doing this. //move effect private var m:Move = new Move(); //this function creates labels with some text and starts move effect on them public function moveText(i:int):void { var myLabel:Label = new Label(); myLabel.text = "some text"; m.target = myLabel; ... m.play(); } Method moveText is called in a loop so I guess that labels don't get "garbage collected". What I want to do is to remove Labels created in moveText method after play animation ends. Another way of doing this is maybe creating some kind of "pool" of labels which I would use to move arround text. I don't know how would I return labels in to "pool". The question is how to do something after effect animation ends?

    Read the article

  • Difficulty understanding behavior of free()

    - by Rasmi Ranjan Nayak
    int main() { int *ptr, **ptr1; ptr = (int*)malloc(sizeof(int)); ptr1 = (int**)malloc(sizeof(int)); free(ptr); *ptr = 12345; ptr1 = &ptr; //free(ptr); //**ptr1 = 23456; printf("%d \n", **ptr1); system("pause"); return 0; } How does *ptr store the value 12345, when the memory has already been freed? So, now ptr should be pointing to garbage. Why is this happening?

    Read the article

  • Commiting broken code to the repository for the purpose of backing it up

    - by Tim Merrifield
    I was just talking to another developer (more senior than I) and trying to convince him that we should implement continuous integration via Cruise Control. He told me that this will not work because he commits code that does not compile to the repository all the time for the purposes of backing it up. And that automated builds notifying us of failures would be just noise. Committing garbage to the repo sounds bad to me. But I was at a loss of words and didn't know what to say. What is the alternative? What's the best practice for backing up your code on another machine without adding a bunch of pointless revisions? BTW, our version control system is SVN and that probably won't change any time soon.

    Read the article

  • Visual C++ CreateThread Parameter Problem

    - by Vanwaril
    I have a class that contains a function that calls create thread, and needs to pass itself (this) as a parameter: DWORD threadId; HANDLE h = CreateThread( NULL, 0, runThread, this, 0, &threadId); My runThread definition is as follows: DWORD WINAPI runThread(LPVOID args) { Obj *t = (Obj*)args; t->funct(); return 0; } Unfortunately, the object t that I get in runThread() gets garbage. My Obj class has a function pointer attribute. Could that be the problem? class Obj{ void(*funct)(); and in the constructor: Obj(void(*f)()) { funct = f; } where is my mistake? The function pointer, the createThread itself, or type-casting? I tried whatever I could think of.

    Read the article

  • what to use in place of std::map::emplace?

    - by kfmfe04
    For containers such as std::map< std::string, std::unique_ptr< Foo >>, it looks like emplace() has yet to be implemented in stdc++ as of gcc 4.7.2. Unfortunately, I can't store Foo directly by value as it is an abstract super-class. As a simple, but inefficient, place-holder, I've just been using std::map< std::string, Foo* > in conjunction with a std::vector< std::unique_ptr< Foo >> for garbage collection. Do you have a interim solution that is more efficient and more easily replaced once emplace() is available?

    Read the article

  • .Htaccess & Wildcard Subdomains — Can't get other variables to work!

    - by Justin Scheetz
    It would be absolutely awesome if someone could help me out here. I have a domain, let's call it "example.com". I have wildcard subdomains setup and working great. The only problem is I can't get htaccess to see anything else like subdomain.example.com/profile/some_name/some_id_number/. In fact, I can type any garbage after the domain and it will still just show me the home screen. Here's what's in my htaccess file now: Options +FollowSymLinks Options +Indexes Options -Multiviews RewriteEngine On RewriteCond %{REQUEST_URI} !^/app/index.php RewriteCond %{HTTP_HOST} !^www\.example\.com RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com RewriteRule (.*) /app/index.php?user%1 [L] I can see why that wouldn't work yet, but I wanted to add something similar to the following: RewriteRule ^profile/([^/]+)/([^/]+) /app/index.php?page=profile&username=$1&user_id=$2 [nc] But it's not working at all. The server doesn't even really show signs that it's even seeing it there. Any ideas?

    Read the article

  • EXC_BAD_ACCESS when returning a CGRect in iPhone

    - by pabloruiz55
    I have a class which must return a CGRect from one of its methods: -(CGRect)myRect { CGRect rect = CGRectMake(self.mySprite.position.x,self.mySprite.position.y,self.mySprite.textureRect.size.width, self.mySprite.textureRect.size.height); return rect; } I get an exc_bad_access as soon as i try to access the mySprite ivar. Thing is if i call it, the instance variable mySprite is full of garbage. BUT if i change the function to return void, self.mySprite does contain the correct data. -(void)myRect { CGRect rect = CGRectMake(self.mySprite.position.x,self.mySprite.position.y,self.mySprite.textureRect.size.width, self.mySprite.textureRect.size.height); return rect; } that does not crash when accessing mySprite...

    Read the article

  • A temporary disagreement

    - by Tony Davis
    Last month, Phil Factor caused a furore amongst some MVPs with an article that attempted to offer simple advice to developers regarding the use of table variables, versus local and global temporary tables, in their code. Phil makes clear that the table variables do come with some fairly major limitations.no distribution statistics, no parallel query plans for queries that modify table variables.but goes on to suggest that for reasonably small-scale strategic uses, and with a bit of due care and testing, table variables are a "good thing". Not everyone shares his opinion; in fact, I imagine he was rather aghast to learn that there were those felt his article was akin to pulling the pin out of a grenade and tossing it into the database; table variables should be avoided in almost all cases, according to their advice, in favour of temp tables. In other words, a fairly major feature of SQL Server should be more-or-less 'off limits' to developers. The problem with temp tables is that, because they are scoped either in the procedure or the connection, it is easy to allow them to hang around for too long, eating up precious memory and bulking up the shared tempdb database. Unless they are explicitly dropped, global temporary tables, and local temporary tables created within a connection rather than within a stored procedure, will persist until the connection is closed or, with connection pooling, until the connection is reused. It's also quite common with ASP.NET applications to have connection leaks, as Bill Vaughn explains in his chapter in the "SQL Server Deep Dives" book, meaning that the web page exits without closing the connection object, maybe due to an error condition. This will then hang around in the heap for what might be hours before picked up by the garbage collector. Table variables are much safer in this regard, since they are batch-scoped and so are cleaned up automatically once the batch is complete, which also means that they are intuitive to use for the developer because they conform to scoping rules that are closer to those in procedural code. On the surface then, an ideal way to deal with issues related to tempdb memory hogging. So why did Phil qualify his recommendation to use Table Variables? This is another of those cases where, like scalar UDFs and table-valued multi-statement UDFs, developers can sometimes get into trouble with a relatively benign-looking feature, due to way it's been implemented in SQL Server. Once again the biggest problem is how they are handled internally, by the SQL Server query optimizer, which can make very poor choices for JOIN orders and so on, in the absence of statistics, especially when joining to tables with highly-skewed data. The resulting execution plans can be horrible, as will be the resulting performance. If the JOIN is to a large table, that will hurt. Ideally, Microsoft would simply fix this issue so that developers can't get burned in this way; they've been around since SQL Server 2000, so Microsoft has had a bit of time to get it right. As I commented in regard to UDFs, when developers discover issues like with such standard features, the database becomes an alien planet to them, where death lurks around each corner, and they continue to avoid these "killer" features years after the problems have been eventually resolved. In the meantime, what is the right approach? Is it to say "hammers can kill, don't ever use hammers", or is it to try to explain, as Phil's article and follow-up blog post have tried to do, what the feature was intended for, why care must be applied in its use, and so enable developers to make properly-informed decisions, without requiring them to delve deep into the inner workings of SQL Server? Cheers, Tony.

    Read the article

  • ??GoldenGate?LAG???

    - by Liu Maclean(???)
    GGSCI????LAG?? ????????????????Oracle?redo????online redo logfile? ? Replicat????????????????? ???????? ????,?????????????????LAG; ????????????????REPLICAT??apply???????????? OGG????RANGE??????????,????????REPLICATE??APPLY? OGG??MAXTRANSOPS???????? LAG?????????: ?Extract?????redolog????TRAIL?REMOTE HOST ????datapump???extract trail????????????REMOTE HOST ?collector?????????????????LOCAL TRAIL ?REPLICAT??LOCAL TRAIL???????? ?????????GGSCI?INFO?STATUS??????LAG,???SEND ???,LAG?????LAG?????: INFO??????LAG???SEND??????????? INFO?????LAG???MANAGER????????checkpoint SEND <OBJECT>, lag???LAG???<OBJECT>???????????? LAG?????????????????Kilobytes??? ????LAG??? ????????????? ? EXTRACT/PUMP/REPLICAT???????? ?2?????????, ???? LAG???EXTRACT??????? ??EXTRACT/PUMP/REPLICAT??????????????? REAL TIME,???LAG????? ?????????????? ????????REDO LOG?????????,?LAG???ER???????,?????????????? ??????,STOP EXTRACT?????????????????LAG,????EXTRACT?????,??EXTRACT????????? ????REDO LOG???? ?EXTRACT??????????????????? GGSCI (XIANGBLI-CN) 27> stop load2 Sending STOP request to EXTRACT LOAD2 … Request processed. GGSCI (XIANGBLI-CN) 28> start load2 Sending START request to MANAGER … EXTRACT LOAD2 starting GGSCI (XIANGBLI-CN) 31> info load2 EXTRACT    LOAD2     Last Started 2012-09-18 20:26   Status RUNNING Checkpoint Lag       00:04:34 (updated 00:00:08 ago) Log Read Checkpoint  Oracle Redo Logs 2012-09-18 20:21:32  Seqno 44, RBA 13750272 SCN 0.1845479 (1845479) GGSCI (XIANGBLI-CN) 35> lag load2 Sending GETLAG request to EXTRACT LOAD2 … Last record lag: 130 seconds. At EOF, no more records to process. GGSCI (XIANGBLI-CN) 36> info load2 EXTRACT    LOAD2     Last Started 2012-09-18 20:26   Status RUNNING Checkpoint Lag       00:00:00 (updated 00:00:02 ago) Log Read Checkpoint  Oracle Redo Logs 2012-09-18 20:27:33  Seqno 44, RBA 13817856 SCN 0.1845671 (1845671) ?????? Last record lag ? Checkpoint Lag ???? EXTRACT/PUMP/REPLICAT ?????????????(catch up), ???? ?????????????GB?redo???,??????EXTRACT/PUMP/REPLICAT ????????? ???INFO?LAG???checkpoint?,????????????Long Running Transactions (LRTs),??????????COMMIT? ????????????????????????COMMIT?????? ????EXTRACT/PUMP/REPLICAT???????????????????????commit????? ??REPLICAT????MAXTRANSOPS ?????LAG?

    Read the article

  • How to dispose a Writeable Bitmap? (WPF)

    - by Mario
    Some time ago i posted a question related to a WriteableBitmap memory leak, and though I received wonderful tips related to the problem, I still think there is a serious bug / (mistake made by me) / (Confusion) / (some other thing) here. So, here is my problem again: Suppose we have a WPF application with an Image and a button. The image's source is a really big bitmap (3600 * 4800 px), when it's shown at runtime the applicaton consumes ~90 MB. Now suppose i wish to instantiate a WriteableBitmap from the source of the image (the really big Image), when this happens the applications consumes ~220 MB. Now comes the tricky part, when the modifications to the image (through the WriteableBitmap) end, and all the references to the WriteableBitmap (at least those that I'm aware of) are destroyed (at the end of a method or by setting them to null) the memory used by the writeableBitmap should be freed and the application consumption should return to ~90 MB. The problem is that sometimes it returns, sometimes it does not. Here is a sample code: // The Image's source whas set previous to this event private void buttonTest_Click(object sender, RoutedEventArgs e) { if (image.Source != null) { WriteableBitmap bitmap = new WriteableBitmap((BitmapSource)image.Source); bitmap.Lock(); bitmap.Unlock(); //image.Source = null; bitmap = null; } } As you can see the reference is local and the memory should be released at the end of the method (Or when the Garbage collector decides to do so). However, the app could consume ~224 MB until the end of the universe. Any help would be great.

    Read the article

  • Use of SAX parser in Android - OutOfMemory Issue

    - by Sephy
    Hi everybody, I have been using a SAX parser for a while now to get data from various XML, but today i'm banging my head on a new problem with a hudge XML (compared to the previous ones . here around 12k lines) with a lot of repetitive items in it. Most of the time, the items are part of a block : <content> <item lbl="blabla"> <item lbl="blabla"/> <item lbl="blabla"/> </item> <item lbl="blabla"> <item lbl="blabla"/> <item lbl="blabla"/> <item lbl="blabla"/> <item lbl="blabla"/> <item lbl="blabla"/> <item lbl="blabla"/> </item> </content> The blabla part is of course changing...But, I would like to keep the structure of items (they are titles and subtitles). And for that, I append each blabla with a starting and ending tag blabla, where x is the position in the tree of items (1, 2, 3 or 4). The slightly problematic part is that with that, I'm creating thousands of useless objects and the garbage collector doesn't have time to clean after the parser, and the inevitable OutOfMemory comes in my face... I have no idea of how to deal with it; The best technique would be if I could take the whole content of , but i'm not sure that this is possible with a SAX parser. Any help is welcome and any solution deeply thanked...

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >