Given a harddrive with 120GB, 100 of which are filled with the strings of length 256 and 2 GB Ram how do I sort those strings in Java most efficiently?
How long will it take?
we have a situation that a stream (data from sensor or click stream data at server) is coming with sliding window algorithm we have to store the last (say) 500 samples of data in memory. These samples are then used to create histograms, aggregations & capture information about anomalies in the input data stream.
please tell me how to make such sliding window.
Hi
I am using jquery.datePicker.js js file to create a date picker
This is whati have in my view page
<input type="text" style="font-family: verdana; width: 80px;" id="txtArrivalDate" class="startDate" name="txtArrivalDate" value="<?php echo $_POST['txtArrivalDate'] ?>" />
when i click on the arrival date text box the year column starts on current year say 2010 but the years less than 2010 also available on the year select box how to get rid of the years below current year
what does navigationAsDateFormat do?
also, I have changeMonth and changeYear enabled, how can I make it so that when you change the month and year using those dropdowns, the input field is automatically updated (e.g., updates without having to click on a new day)
Hi, I can expose a DataGridComboBoxColumn on a grid, but the user must click it twice to show its drop-down list (the first is to gain focus and enter in edit-mode).
How can I force programatically to show the drop-down list?
I go to xcodepreferencesfile_types, change association for file type "xyz", click apply+ok, reopen xcodepreferencesfile_types, check association for file type "xyz", its set as I just edited it.
Not I quit xcode, start it again, xcodepreferencesfile_types, check association for file type "xyz", and its getting reset to its old value just like i never edited it.
This is so lame, kindly suggest something :(
I have very simple (in fact empty ) project which i have created by rails new MyProject command from command-line. So, i want to import it to NetBeans IDE. I click "new project" - "RoR" - "from existing source", select Ruby 1.9.2 (instead of embedded JRuby) in the wizard form. After that i have got errors [see the picture below]:
So.. i click OK. And then try to run the RoR application from NetBeans clicking on the run-button and i got the following error in the log-panel:
/home/ses/.rvm/rubies/ruby-1.9.2-p136/bin/ruby: No such file or directory -- script/server (LoadError)
So how to handle these two problems?
and, replying the comment to my question. yes, i performed following commands:
bundle install
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.3)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.7)
Using tzinfo (0.3.24)
Using actionpack (3.0.3)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.15)
Using actionmailer (3.0.3)
Using arel (2.0.7)
Using activerecord (3.0.3)
Using activeresource (3.0.3)
Using bundler (1.0.10)
Using mysql2 (0.2.6)
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
p.s. my application is working when i launch it from the console.
i use ruby-1.9.2 and RoR 3.0 and Netbeans 6.9.1 and Ubuntu 10.10
bundle pack
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.3)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.7)
Using tzinfo (0.3.24)
Using actionpack (3.0.3)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.15)
Using actionmailer (3.0.3)
Using arel (2.0.7)
Using activerecord (3.0.3)
Using activeresource (3.0.3)
Using bundler (1.0.10)
Using mysql2 (0.2.6)
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
Updating .gem files in vendor/cache
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Updating .gem files in vendor/cache
Hi,
I have a perl script running in mod_perl that needs to write a large amount of data to the client, possibly over a long period. The behavior that I observe is that once I print and flush something, the buffer memory is not reclaimed even though I rflush (I know this cant be reclaimed back by the OS).
Is that how mod_perl operates and is there a way that I can force it to periodically free the buffer memory, so that I can use that for new buffers instead of taking more from the OS?
Hello,
I'm planing to learn python this weekend. I have some programing skills and should not be difficult if I take the good path.
I'm a sysadmin and I've been looking at python scripts since long ago, but now I would like to make python my scripting language, so I'll do the effort and next monday I will start using it.
Any advice on how to trace my own path to good python skills?
thanks.
PS: I will use vim, ypython and http://diveintopython.org
I have a flex combobox as a datagrid itemrenderer.
However, after selecting an item in the combobox, its necessary to click out of the combo (i.e. into another cell or elsewhere in the app) for the value to be committed to the combo. Prior to this, the combo sits 'proud' of the datagrid and the value hasnt actually been committed.
Is there a way to force the value to be immediately committed after an item has been selected and for the combo to 'lose focus'?
I'm developing a website that publishes scientific articles, not as PDF but as HTML. As a input tool for the editorial team, we use TinyMCE for normal text plus a couple of custom plugins for footnotes and citations. But we are not really happy with TinyMCEs table controls. Everything but the most simple tables take way to long to write. Are there any specialized table editing tools for the browser out there?
I'm using Amazon cloud right now, and the biggest performance issue is horrible I/O performance. As long as something fits RAM it's fine - once it's too big it gets ridiculously slow (in many different scenarios). There are only so many ways one can avoid hitting disk - so the question is - does Amazon or some other cloud provide SSD option?
I pull product price from another page. Then I multiply it with quantity entered in the quantity input field. The problem is, if I forget to enter quantity value before I pull product price data or if I change the quantity field later, the final total price is not updated. I hope I clearly explained it.
javascript:
$('#AddProduct').click(function() {
var i = 0;
var adding = $(+(i++)+'<div class="row'+(i)+'"><div class="column width50"><input type="text" id="PRODUCTNAME" name="PRODUCTNAME'+(i)+'" value="" class="width98" /><input type="hidden" class="PRODUCTID" name="PRODUCTID" /><input type="hidden" class="UNITPRICE" name="UNITPRICE'+(i)+'" /><small>Search Products</small></div><div class="column width20"><input type="text" class="UNITQUANTITY" name="UNITQUANTITY'+(i)+'" value="" class="width98" /><small>Quantity</small></div><div class="column width30"><span class="prices">Unit Price:<span class="UNITPRICE"></span><br />Total Price:<span class="TOTALPRICE"></span><br /><a href="#" id="RemoveProduct(".row'+(i)+'");">Remove</a></span></div>');
$('#OrderProducts').append(adding);
adding.find("#PRODUCTNAME").autocomplete("orders.cs.asp?Process=ListProducts", {
selectFirst: false
}).result(function(event, data, formatted) {
if (data) {
adding.find(".UNITPRICE").html(data[1]);
adding.find(".PRODUCTID").val(data[2]);
adding.find(".TOTALPRICE").html(data[1] * $('.UNITQUANTITY').val());
}
});
return false;
});
$('#RemoveProduct').click(function() {
$().remove();
return false;
});
my html:
<fieldset>
<h2>Order Items</h2>
<div id="OrderProducts">
<a href="#" id="AddProduct"><img src="icons/add.png" alt="Add" /></a>
</div>
</fieldset>
edit
Now I totaly messed it up. Removing a row is not working anymore as well...
Test link:
http://refinethetaste.com/html/cp/?Section=orders&Process=AddOrder#
I'm looking for the smallest (in terms of filesize) transparent 1 pixel image.
Currently I have a gif of 49 bytes which seems to be the most popular.
But I remember many years ago having one which was less than 40 bytes. Could have been 32 bytes.
Can anyone do better? Graphics format is no concern as long as modern web browsers can display it and respect the transparency.
So say you have a three tier application with the tiers UI, Services, and Repository for a simple application, let's say saving addresses.
If AddressService has an interface IAddressService, where does that interface belong? I know that "in the address service" may seem like an obvious answer, but if it's in the address service it would seem to defeat the point of having the interface such that any service library could be swapped in as long as it implemented IAddressService.
(specifically this is in a .net problem space, but it's probably more general so it's tagged architecture)
I just can't give a good title to my question, sorry.
I have 3x3 picture boxes on a form, what I want to do is when the user double click on one of the 9 picture box, I want to make the clicked picture box take the whole area, kind like a zoom effect, any idea how to implement this effect?
Hi, I just need to be able to open a .NET app (click once) from within an ASP.NET web page, and pass 2 string parameter to the app.
How can I do this? Any example please, with any method to do it. Thank you in advance.
A View with expand and contract list where you show, for instance, Chats, Contacts, Groups. You click on of them and expands to a list of Chats and each element of the list is a Rectangular box with User defined image, name, status (offline, online, busy) as an image and status message.
How can i program a view as described?
thanks in advance
When I click on the hx:commandExButton the Javascript function should get called, but it is not getting called. The Javascript function is as follows:
function test() {
alert('ss');
return "true";
}
The hx:commandButton is as follows:
<hx:commandExButton
type="submit"
value="Search"
styleClass="action2" id="searchButton"
onclick="return test();"
action="#{pc_WorkInProgressUserGrid.doSearchButtonAction}"
immediate="true">
</hx:commandExButton>
Any suggestion would be helpful.
The .Focus() function will not work in Windows Server 2003. Is there any thing i can do to make it work?
WScript.Sleep 1000
.getElementByID("quickSearchMsisdn").value = "085729916"
WScript.Sleep 1000
.getElementByID("quickSearchMsisdn").value = "0857299167"
WScript.Sleep 1000
.getElementByID("quickSearchMsisdn").value = "0857299167"
.getElementByID("quickSearchMsisdn").Focus
WScript.Sleep 10000
.getElementByID("doSendSMS").click
It is to log into my online mobile account and send me an automated text. What ever way the page is designed the number field needs to be clicked into.
my code is written from http://stackoverflow.com/questions/1171433/jquery-xml-and-google-map
Now all marker icons can be displayed at current google map.
But now I want to add some function.
When getting description of item (it will map to opposite icon) ,if user click this description, a hint will display near the map icon at google.
I still can't how to start.I can get lat and lng of location.
PS:some of markers will map to same point.
Hi
I m having a ordered list having the structure
Test
another test
Add
I want to add a list item between sublist 2 and 3 using jquery
I used the code: -
$("ol#update li ol li:eq(1)").append("<li> test </li>");
But this appends inside the li "another test" and not after the 2 li
Here is the example page
On-click "sub-comment" adds a li inside li 2
Clicking on "comment" shows the structure of the sub lis
Please help
Thanks
Pradyut
There are a number of questions about this sort of thing but lets imagine we are targeting a generic Linux system with both getopt and getopts installed (not that we'll use either, but they seem popular)
How do I parse both long (--example | --example simple-option) and short argruments (-e | -esimple-example | -e simple-example)
Hi there,
I'm using this code to implement the like button
<fb:like layout="button_count" show_faces="false" width="450"></fb:like>
But when I try to click it the counter is increased for about 1 second and then it goes back to zero again. I can't see on my facebook profile that i've liked something either. Someone have a solution for this? I'm using the newest JavaScript SDk in an Google App engine/ Django environment.