Omgili - forum search, search forums  
  

Discussions about "a better way"

Displaying 1 - 10 out of 69,729 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
Which is a better way to force GC on ThreadLocal instance?
Started by on , 3 posts by 3 people.  
With exit! The simple and ugly answer: System.gc(); This does not guarantee garbage collection of a specific object, but it will... .
Well, in fact you can.
Some may posts tricks but all in all you simply can't .
Simple answer: you can't force the GC in java.
The () seems silly. is there a better way? For example: ExternalId.IfNotNullDo(()=>ExternalId=ExternalId.Trim());
Started by on , 5 posts by 5 people.  
For a lambda....
Whether there ever will be one or not is a different matter .
I know that the C# team feels your pain, and have tried to find an alternative .
Lambda expressions are optimised (in terms of syntax) for the single parameter case .
No, there isn't.
Is there a better way to develop Java Swing applications? SWIXML? JavaFX? Anything else that developers out here have liked and recommend?
Started by on , 6 posts by 5 people.  
better way" is through the use of a better Layout Manager: MigLayout : an extremely flexible and easy.
Ask your Facebook Friends
Is there a better way to profile code then: $start1 = microtime(TRUE); for($i=0;$i<count($array);$i++) { //do something } $time1 = microtime(TRUE) - $start1;
Started by on , 4 posts by 4 people.  
Http://www.xdebug.org/ http://www.zend.com/en/community....
Their profiler will time everything for you without any modification of your code .
Try this: http://www.xdebug.org/docs/profiler Xdebug or Zend Debugger if you have some difficulty to install Xdebug .
Here's my code: $quizId = ''; foreach ($module['QuizListing'] as $quizListing) { if ($quizListing['id']) { $quizId = $quizListing['id']; break; } } Is there a better way of doing this?
Started by on , 6 posts by 6 people.  
If you want the first quiz listing then do this: $listing = reset($module[... .
I assume from your question that one of both of these is not true .
What you're doing is reasonable assuming that: multiple quiz listings appear; and not all of them have an ID .
Quick one, but thought I'd ask. Is there a better way of getting the column values from a model's column than something like this? Item.count(:all, :group => 'status').reject! { |i, e| i.blank? }.collect { |i,e| i}
Started by on , 3 posts by 3 people.  
Status is blank? count is blank? Item.find(:all, :select....
But then could you please specify more criteria you want? i.e .
Maybe not ..
Is it the same thing as the following code? Item.count(:all, :group => "status", :conditions => "status != ''"} . .
What is the better way of getting the IP address in PHP: getenv('REMOTE_ADDR'); or, $_SERVER['REMOTE_ADDR']; please tell me the difference, if any, between the two.
Started by on , 6 posts by 6 people.  
The common approach is to use....
Getenv() can be used to access any environment variables (PHP simply registers REMOTE_ADDR as an environment variable for the script), while with $_SERVER you obviously only access the contents of the $_SERVER superglobal .
Is there a better way to do this jQuery selection: $("p.DynFieldWrapper :input:not(:text):not(textarea)").focus(HideDynamicFormError).click(HideDynamicFormError); $("p.DynFieldWrapper :text,p.DynFieldWrapper textarea").blur(HideDynamicFormError); I am...
Started by on , 5 posts by 5 people.  
I'd be tempted to do this: $("p.DynFieldWrapper :input").each(function() { if ($(this).is(":text") || $(this).is("textarea"))... .
The first one can be a little simpler: $("p.DynFieldWrapper :input:not(:text,textarea)") Other than that, you're doing fine .
This is related to my question asked here today on SO. Is there a better way to build a packet to send over serial rather than doing this: unsigned char buff[255]; buff[0] = 0x02 buff[1] = 0x01 buff[2] = 0x03 WriteFile(.., buff,3, &dwBytesWrite,..); Note...
Started by on , 7 posts by 7 people.  
There is a much better way, which is using structs to set.
:-) Is there a better way to build a packet than concerns like this can help reuse.
This is left as an exercise for the reader.
On a PHP file, I receives more than 20 variables coming from the client(submitted via a web form) and I have to apply mysql_real_escape_string() more than 20 times, it is quite troublesome, is there a better way to do this job?
Started by on , 5 posts by 5 people.  
They're a little bit wordy.
); is there a better way to do this job? Certainly: parameterised queries .
Page: 1   2   3   4   5   6   7   8   9   10  
Related Searches
a better way    pepsi 'there's a better way'    "a better way" "    "a better way"   
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost