I am looking for an algorithm that could find the two most distant elements in a binary tree, not looking for any special language, just for the algorithm.
Thanks.
Hi,
I have two files nodes_to_delete and nodes_to_keep. Each file has a many lines with numeric ids.
I want to have the list of numeric ids that are in nodes_to_delete but NOT in nodes_to_keep.
Adam
Hi i am using tcpdf in my application and i have two question about that.I am able to get pdf output of a html page when i click specified button.
My first question is:How can i download that html's pdf output when i click that button?($pdf-lastPage() didn'work).
My second question is:How can i set character encoding for Trkish?(I am using dejavusans but some turkish characters appears as question mark)
Thank for advance...
Is there an easy way to get the relative complement of two sets? Perhaps using LINQ?
I have to find the relative compliment of a set A relative to B. Both A and B are of type HashSet<T> but I think the algorithm could be made more general (IEnumerable<T> or even ISet<T>)?
I could use a solution in either VB.NET or C#.
Hi,
I need some help with a query.
i want to select from a table, some values, but the values depend on the value of an other cell. after i select i need to sort them.
Can i use ELECT column FROM table WHERE one=two ORDER BY ...?
thanks,
Sebastian
I have two fields
start_time
end_time - can be null
Now, depending on this I needs to differentiate between three states
Scheduled in future,
Currently running
Completed in past
Since mysql IF operator can not be nested, (Or I cant find an easy way to nest them), I cant find how to get the three state status.
I was looking at some jQuery UI code, a found a weird behavior there:
jQuery.ui||(function(a){ /*... */ })(jQuery);;
The logical OR is clear for me, the function wrapper (still searching the correct name for it), too, but why two semicolons?
Thanks in advance
Vincent
Hi,
Say I have two 2D vectors, one for an objects current position and one for that objects previous position. How can I work out the direction of travel?
This image might help understand what I'm after:
Thanks
-James
I have two Perl one liners:
perl -pe "s/\b$a\b/$b/g if m/param1 /" test
and
perl -pe "s/\b$a\b/$b/g unless /^#/" test
How can I combine theif m/somthing/ and the unless /something/, like:
[root@localhost tmp]# perl -pe "s/\b$a\b/$b/g if m/param1/ unless /^#/" test
syntax error at -e line 1, near "m/param1/ unless"
Is there a kind of "between" check I can use in an if-statement that verifies whether a given float value is between two others?
Can I write something like
if (floatConstA <= checkFloatValue < foatConstB) {
or must I do this using AND/OR constructs?
Hey, I'm just wondering if it's possible to have a form in html do two things on submit, have the action go to a url like normal (for a search) but also run a mysql command.
Thanks!
I want count the same elements of two lists. Lists can have duplicate elements, so I can't convert this to sets and use & operator.
a=[2,2,1,1]
b=[1,1,3,3]
set(a) & set(b) work
a & b don't work
It is possible to do it withoud set and dictonary?
I have a user control that contains a border somewhere in it. I am able to edit both the User Control Width and the Border Width from binding to two textboxes. I need to include validation when I create the binding in code so that the Border Width can't be higher than the User Control Width.
How can i format a Double to String in c# so as to have only two decimal digits?
If I use String.Format("{0:0.00}%", myDoubleValue) the number is rounded, and i want a simple truncate without rounding. Also, I want the conversion to String to be culture sensitive.
Hey Guys,
This seems like a basic problem with an easy answer but I simply cannot figure it out no matter how much I try.
I am trying to create a line graph based on two lists. For my x-axis, I want my list to be a set of strings.
x_axis_list = ["Jan-06","Jul-06","Jan-07","Jul-07","Jan-08"]
y_axis_list = [5,7,6,8,9]
Any suggestions on how to best graph these items?
Hi
I want to use two struts taglib in each other, something like this:
< s:properties value="url-< s:properties value="number"/"/
or
< s:properties value="url-${number}"/
but I got the following error in the second one:
According to TLD or attribute directive in tag file, attribute values does not accept any expressions.
Anybody has a solution ?
Thanks
hey Guys,
I wanted to know if there's a way I can bind an Asp.net Ajax event to two different JS functions ?
eg.
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (!prm.get_isInAsyncPostBack())
{
prm.add_initializeRequest(InitializeRequest);
prm.add_initializeRequest(InitializeRequest2);
}
function InitalizeRequest() { ... }
function InitalizeRequest2() { ... }
I am trying to use maven profiles and filtering in order to produce two different versions of a given web archive (war):
A first one for local deployment to my local machine on localhost
A second one for remote deployment to cloudfoundry
There are a number of properties that differ according to whether the app is deployed to my local machine or to cloudfoundry.
Of course the difficult bit is that I am trying to do all this from STS/Eclipse and deploy from Eclipse to my local tomcat and to cloudfoundry...
Can anyone please provide advice, tips or suggestions?
How would you obtain the min and max of a two-dimensional array using LINQ? And to be clear, I mean the min/max of the all items in the array (not the min/max of a particular dimension).
Or am I just going to have to loop through the old fashioned way?
Hello;
I need to write an application which is to calculate the estimated driving distance between two UK addresses; I think I can use Google as following:
http://maps.google.com/maps/nav?q=from:London%20to:Dover
However, anyone knows what is the daily/monthly limit of querying the database from a single IP address?
I need to implement in a commercial application (freight services), is there any reliable alternative?
Development language/platform: C#, .NET
Regards,
Hi,
When I run my seam application I get the following error
Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.IllegalStateException: Two components with the same name and precedence - component name: wizardController, component classes: package.WizardController, package.WizardController
at org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:543)
at org.jboss.seam.init.Initialization.installScannedComponentAndRoles(Initialization.java:809)
at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:756)
at org.jboss.seam.init.Initialization.init(Initialization.java:629)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)
I am not able to resolve this problem.
Hi,
I'm attempting to find the euclidean distance in meters between two points on an MKMapView using iPhone OS 3.2. The problem is that I have these coordinates in terms of latitude and longitude, which, mathematically provides me enough data to find the distance, but it's going to take some tricky trigonometry. Is there any simpler solution?
Thanks!
Hello,
sorry for my bad title (and noob question), but how can I add two numbers like 7 and 6 and the result should be 76. Is there a operation symbol in objective-c?
Thanks and sorry for my bad English.
here's my code:
DateTime date1 = new DateTime(byear, bmonth, bday, 0, 0, 0);
DateTime datenow = DateTime.Now;
DateTime date2 = datenow - date1
on the last line i am getting Error 1 Cannot implicitly convert type 'System.TimeSpan' to 'System.DateTime'
ow do i subtract two dates?