I want to create a method sum that I can call on different types, specifically sum(1,2).
def sum[A](a1: A, a2: A) = a1 + a2
This fails because the compiler can't tell if A has a method '+'
I tried to define a structural type:
type Addable = {def +(a: Addable)}
This fails because of an illegal cyclic reference
How can I achieve this in a type safe way without requiring A to extend a specific trait?
I am using an XML config file to tell Zend_Form what elements I want. I would like to have a element, but I am unsure as to how to add tags using the XML syntax.
Sure I am missing something pretty basic.
Ben
Greetings,
Can anyone tell me how the heck I'm meant to use a maven repository or whatever the term is with a project?
I've downloaded the OAuth library from Google. I run mvn compile, test, install, deploy
I want to know where the Jar goes so I can just put it into my class path. Any help appreciated!
Hi all,
I'm trying to implement a CSS menu and am having a problem with the menu pushing the other content/divs down when the menu expands.
http://bit.ly/bAcS56
Can anyone tell me what CSS I need to stop the main body content being pushed when the menu expands?
Thanks
Hi,
I'm a beginner in java. I want the logic of the small program.
I have two arrays
array = {a1,a2,a3,a4,a5,,,,,,,,,an}
and
array2 = {b1,b2,b3,b4,,,,,,,,,,,bn}
I want string as:
a1b1,a2a3b2b3,a4a5a6b4b5b6,..........an
Please tell me what will be the logic.
The Lucene documents tell me that "Hits" will be removed from the API in Lucene 3.0.
Deprecated. Hits will be removed in
Lucene 3.0. Use search(Query, Filter,
int) instead.
The proposed overload limits the number of documents returned to the value of the int.
So my question is: what is the recommended way to perform a search in Lucene with no limit on the number of documents to be returned?
Hi, Can anyone tell me how to get the Unicode name of a character in MFC.
e.g. -
Character - Name
Z - LATIN CAPITAL LETTER Z
[ - LEFT SQUARE BRACKET
etc.
Thanks,
Dev
Can someone tell me how I can binding an Ultratree to a Bindingsource? Binding it to a dataset won't work for me since I need to be able to do filters on the data, something I have in the BindingSource but not in the Dataset.
I have tried following the sample Hello World for MonoTouch by creating an iPad solution. For some reason I cannot get the MainWindow to load. I followed the instructions exactly and the app just closes before even loading a view. Is there something missing? Do I need to tell the solution how to load the MainWindow.XIB or something? Please help, this seems very basic and I am about to throw MonoTouch in the garbage.
I inherited a GPL project which I'm trying to improve. I know of an MIT library that could really help me improve this project. I know its developer personally and I read his blog, and he's made it clear on several occasions that he likes MIT and Apache licenses.
My questions:
Do I have to tell him that I'm using his library in a GPL project?
Is it ok for my GPL project to interface with his MIT library?
Hi All,
Please tell me how to fix a footer at specific height and it will get down as per content
its not working properly i want to fix it at specific height.
Thanks Mayur
I am actually new to java programming and am finding it difficult to take integer input and storing it in variables...i would like it if someone could tell me how to do it or provide with an example like adding two numbers given by the user..
Tagged PDFs allow for the easy reflow and accessibility of PDFs. It seems like this would be a natural use case for using LaTeX, which advocates content over style. But as far as I can tell, there is no way to create a tagged PDF with MikTeX 2.8.
Does anybody know of any tips, tricks or techniques to get a tagged PDF through LaTeX without resorting to the commercial version of Adobe Acrobat?
im new to java ee platform and im having a hard time searching for a book for java ee that uses eclipse IDE. So please can you tell me any book that involves java ee and eclipse for beginners. and some tips from you how to learn this stuff and a follow up question, is java EE still good 20 years from now?
Hello,
I have a transparent table with width:100% which contains some html content.
I use the table in order to position a content element on the screen center.
The table captures mouse events, and the user can't press on links which are positioned beneath it (although it is transparent).
Is there a way to tell the browser to ignore events on the table?
I want to capture events only from the content inside the table (and from the rest of the site).
Thanks
Yaron
Hello. Can anyone tell me how to make a div's background transparent, but with a tint of color, such as black. I've tried this using CSS although I can only get the div to be either transparent or filled with color.
Thanks for the help!
Hi All
Can anyone please tell me how to add table background image in wicket. Actually I've tried a lot like
<table background="images/logo.jpg">
also
<style>table {background-image: url('images/logo.jpg')}</style>
also
<table style="background-image: url('images/logo.jpg')">
But nothing works.
Please help. Thanks in advance.
hi,
i have an export sql file containing tables and data from mysql and i want to import it into a sqlite 3 db.
please can you tell me the best way?
i get error reading file in via sqlite3 binary.
Hi there.
I'm using a very simple CSS dropdown menu which works well in most modern browsers. Unfortunately it must also work in IE6 and 7, which it currently does not. Can anyone please check it out very quickly and tell me if it can be easily fixed?
I'm not adverse to using JavaScript if required.
The markup and CSS: http://paste2.org/p/826583
Many thanks!
Please take a look at the following .htaccess
ErrorDocument 404 /404/
RewriteEngine On
RewriteRule (.*) index.php [L]
With this setup, I am using header('HTTP/1.1 404 Not Found'); in PHP to redirect to the error handling page and send the appropriate HTTP status code. The correct 404 status code is sent, but the browser shows a blank page and the access log shows "GET /invalid-url/ HTTP/1.1" 404 -
Can anyone tell me how to make ErrorDocument work with Apache URL rewrites?
Is server side pagination where the pagination script calculates the number of entries in a database then make the links?
All I know is server side is faster and better if there is alot of data and client side is using javascript?
What makes a pagination script server or client side?
Also, right now I am planning to use this pagination which is like digg-style. Can someone tell me if that is server-side pagination?
(sorry if my terminology is off)
I have called getpeername on my connected socket and now have an IPv6 address of the connected peer. How do I tell whether my peer's IP address is localhost?
(the host name "localhost" is not defined in the target system's hosts file, so I need to work with IP addresses only)