Given a list of numbers how to find differences between every (i)-th and (i+1)-th of its elements? Should one better use lambda or maybe lists comprehension?
Is there any utility for deep cloning for java collections:
Arrays
Lists
Maps
NOTE: prefer some solution without usage of serialization, but with use of Object.clone() method. I can be sure that my custom object will implement clone() method and will use only java-standard classes that are cloneable...
Just what the title says.
Given a build file (.csproj or msbuild.xml or whatever), I'd like to run a msbuild command that lists all the available, defined targets.
Does that function exist?
I know I could do an Xpath search or something, on the build file, but that wouldn't get included files.
I want to know why we always use Sorting algorithm like (Insertion Sort or Merge Sort,...) just for lists and arrays? And why we do not use these algorithms for stack or queue?
Hi
How to protect files (documents, images..) that r being sold over internet.
Is it possible to Deny access to all except a particular php file that lists those documents.
for instance www.mysite.com/list
I have a table created long ago in postgreSQL. Now i want to look at the sql statement used to create it but cannot figure it out.
Also when i do the \dS+ tablename it says table not found, but \dt+ tablename is working fine. The \dS+ lists all the table names owned by the root postgres user and doesn't show up tables that i created with my user account.
Any help is greatly appreciated.
Thanks
I am writing a program that takes in an ArrayList and I need to calculate all possible permutations starting with a list of zeroes, up to the value in the corresponding input list.
Does anyone know how to iteratively calculate these values?
For example, given [ 1 2 ] as input, it should find and store the following lists:
[0 0],
[1 0],
[1 1],
[1 2],
[0 1],
[0 2]
Thanks!
What is the minimum set of primitives required such that a language is Turing complete and a lisp variant?
Seems like car, cdr and some flow control and something for REPL is enough. It be nice if there is such list.
Assume there are only 3 types of data, integers, symbols and lists.(like in picolisp)
I was wondering, since things like display lists are now deprecated, I'm thinking the GLU polygon tesselator is probably also deprecated. What is the new and correct way of creating concave or complex polygons and complying with the new GL 3 standard? Thanks.
Hi guys,
Whats the easiest method of hiding all buttons but not all inputs (say drop down lists, text input boxes) in CSS that works with IE6. The purpose of this CSS file is for printing (using the media="Print" tag in the HTML).
Apple lists (http://developer.apple.com/samplecode/AudioQueueTest/listing1.html) as a quick demonstration of playing an audio file.
Is there a way to play an audio file with many less lines of code?
Suppose I have this program, I want to compare 2 input lists. Assume array A and array B. How do I determine the best case and worst case of the function?
Here is my code in [php]:
foreach($array_1 as $k){
if(!in_array($k, $array_2)){
array_push($array_2, $k);
}
}
What is the best case and worst case of the for loop? Please include some explaination, thank you :)
Is there a list anywhere that lists all the variables I can use in file names for report subscriptions from within SQL Server Management Studio? I currently use @timestamp in my file names, but would like to use other options or even remove parts of the time stamp (for example, just use the date, not the time).
I have built an application in CakePHP that lists businesses. There are about 2000 entries, and the latitude and longitude coordinates for each business is in the DB.
I now am trying to tackle the search function.
There will be an input box where the user can put a street address, city, or zipcode, and then I would like it to return the 11 closest businesses as found from the database.
How would I go about doing this?
Sorry about the bad heading, but the question was not easy to compress into one sentence...
I have two lists of contigs (list1 and list2). They contain mostly unique contigs, but with some overlap. I want to compare list1 and list2 and then create a list3 that contains all contigs in list1 minus those also present in list2. Is this possible with a simple cat/paste/grep/sort/uniq kind of batch command?
Thanks!
All,
I am using the following command to retrieve the domain name of my server.
$_SERVER['HTTP_HOST']
This seems to return the IP address instead of domain name like www.example.com. I looked at PHPInfo and it also lists an IP address for HTTP_HOST instead of Domain name. What do I need to change to make the domain name appear instead of IP?
Thanks
What is the most painful programming mistake you have done and what lesson you have learn after?
I guess mine was making a release to production on the development code which was not tested yet.
The lesson-learned:
Delete any projects that can trigger a
release on the live application from
CCTray. I only add them when a release
to production is necessary since then.
And once I am done, I delete them from
my project lists.
Hi friends, I'm having a dropdown list in my web page. And it contains two lists. 1. Yes 2.No. If we select yes then the desired text box and label will visible, else it won't be visible. So hw to do this?
I need to create a function to rotate a given matrix (list of lists) clockwise, and I need to use it in my Table class. Where should I put this utility function (called rotateMatrixClockwise) so I can call it easily from within a function in my Table class?
I'm completely stumped on this one. I have three different lists that need to be displayed on the screen.
I've tried using a ScrollView with a LinearLayout child, and putting my ListViews in the LinearView, but all of the ListViews lock to a fixed height with scroll bars. Using other kinds of Layouts means no scrolling.
It seems like there are plenty of examples of clever things being done in a lazily-evaluated language that can't be done in an environment with strict evaluation. For example infinite lists in Haskell or replacing every element in a tree with the tree's minimum value in one pass.
Are there any examples of clever things being done in a strictly-evaluated language that can't easily be done in a lazily-evaluated language?
Hi folks.
I'm just putting together a simple nav bar using something similar to this tutorial:
http://www.cssnewbie.com/horizontal-dropdown-menus/
The thing is, that I'd like to have the children lists first item to line up directly below the parent. Right now, they just go wherever I float them. Is there a way to do this without absolute positioning?
I'd like to achieve something similar to what these guys have in their top nav bar:
http://michaelfranti.com/
I want to take a backup of my existing site and restore it on a different Sharepoint server. I know its easily possible through stsadm backup restore. But I dont want the content of my lists to appear in the restored sites. Is there any way to achieve this using backup or export command????
One of the drop down lists in my Java SWT application has 8 fixed options. When I click on it only 5 first options are visible and I have to scroll the list down to view the rest.
Is there any way to force it to make all options visible without having to scroll down?
There is another similar .NET application that has same drop down list with the same options and they all are visible without having to scroll down!