Here's an example of what I'd like to be able to do (in Java):
interface MyInterface<E> {
public void doSomething(E foo);
}
class MyClass implements MyInterface<ClassA>, MyInterface<ClassB> {
public void doSomething(ClassA fooA) {
...
}
public void doSomething(ClassB fooB) {
...
}
}
When I try to implement this, th...
Hi, this question is kind-of programming related but not exactly - see how we go...
I am trying to view a trip i have made using a gps tracking device onto google maps as one continuous line, however, when i upload the KML file onto google maps it is arbitrarily broken into about 7 different segments.
The trip was made in one go and wh...
Hello,
I have a simple rule in ANTLR:
title returns [ElementVector<Element> v]
@init{
$v = new ElementVector<Element>() ;
}
: '[]'
| '[' title_args {$v.add($title_args.ele);} (',' title_args {$v = $title_args.ele ;})* ']'
;
with title_args being:
title_args returns [Element ele]
: author {$ele = new Element(...
Hi,
I am using Linq to dataset to query a datatable. If i want to perform a group by on "Column1" on data table, I use following query
var groupQuery = from table in MyTable.AsEnumerable()
group table by table["Column1"] into groupedTable
select new
{
x = groupedTable.Key,
y = groupedTable.Count()
}
Now I want to perform group...
I'm generating jQuery UI slider elements in a Rails helper:
def add_link(form_builder, method)
link_to_function 'Add' do |page|
page << "$(\"div#range\"+new_id+\"\").slider({
range: true,
min: 1,
max: 7,
values: [parseInt($(\"#lecture_events_attributes_\"+new_id+\"_from_block\").val()), parseInt($(\"#lect...
I'm writing some rather basic jQuery code to create a slideshow from a set of images in a DIV. The CSS ensures that all images are stacked on top of each other. The script looks at the active image in the set, then moves the NEXT image's z-index up (via CSS class) and fades it in from 0.0 opacity. Rinse, repeat. It's actually based on so...
Hello,
lets say I got multiple users. They all have items linked to their account. They can CRUD those items.
So now my question is: what's the best way to prevent users from manipulating items from eachother.
At first I thought the antiforgerytoken would help. But it doesn't because when the users look at their control panel they got...
I have three lists, the first is a list of names, the second is a list of dictionaries, and the third is a list of data. Each position in a list corresponds with the same positions in the other lists. List_1[0] has corresponding data in List_2[0] and List_3[0], etc. I would like to turn these three lists into a dictionary inside a dictio...
Hi all!
I need to find a way how to make one video file from 2 or more webcam in C# (windows app). I tried to use the google for finding some samples, but no success. I found a way how to record a video from the webcam (with directshowNet, directx I can save two avi with two webcam...)
more about directShowNet:
http: //directshownet.so...
Hey,
I've got some code that I'd like to run on every single checkbox on my page within a table, but I'm not sure of the best way to do this? I've tried something like this but it didn't work :(
$(document).ready(function() {
function whatever (elem) {
var $elem = elem;
$elem.val('test');
}
$('table tr td :check...
Hi,
I have a set of 4 tables that I want to search across, each has a full text index, and here is my query;
SELECT categories.name AS category,
categories.id AS category_id,
host_types.name AS host_type,
host_types.id AS host_type_id,
hosts.name AS host,
hosts.id AS host_id,
products.name as name,
products.id AS ...
Given the following table:
Length | Width | Color | ID
===========================
18 | 18 | blue | 1
---------------------------
12 | 12 | red | 1
---------------------------
I want to produce a single column/row:
SIZES
=================
18 x 18, 12 x 12,
I can do this in SQL as follows:
DECLARE @SIZES VARCH...
Hello,
I have a grid view with multiple check box columns and I was wondering if anyone could show me how to select all check boxes in a unique column. I don't want to select a check box in the header and have it select all the check boxes in the grid view. I'm new to jQuery, literally at the beginners stage and was hoping to be able t...
Hi i am using Connection Kit Framework in my cocoa application.. I need to set multiple connections to a ftp server. and also i am facing problem in multiple file uploads.. How can i do that using connection Kit.. Can anyone Guide me on this..
I want to connect to ftp from three different classes.And also i need to upload from three cla...
Hello!
I have 3 tables (actors, categories, actor_cats) in my db.
I'm using a form to insert new info in the database (mysql). Most of the information goes into the actors table.
But in a label "categories", i have a checkbox input type, with 3 fields that i get from the categories table [action (id1), comedy(id2), drama(id3)]. I want ...
I have two tables restaurants n cuisines which are related to each other as HATBM table
cusinies have certain fixed entries - 54 number
i restarurant can hve any number of cuisines. on baking the application this came with a multiple select.
since i wanted check boxes i used array( 'type' => 'select', 'multiple' => 'checkbox') to conve...
In my cakephp app I have an Option model.
In my option/index view I display 2 options with inputs and radio button fields.
I want to update both of them, but I get a weird behaviour.
The option I alter doesn't get saved and instead a new option is inserted with the new value.
Here is my view
<h2 class='page-title' id='manage-option...
Hi I need to upload the files to FTP from three different classes simultaneously.. How can i handle it using connection Kit .. If i use thread for three classes uploading will not be done. I think for uploading it is using the main thread of the application.. How can i separate this into three main threads so that uploading should be car...
HI,
I have a list of files from the last 7 days. From this list, if there are multiple files on a certain day, i need to get the latest for that day using korn shell script.
Please help!
...
Hi
I'm trying to set up a social networking type of site, where users can have friends and send each other messages.
I have a users table, and a friends table, which basically has an user_id and user_friends_id.
Using cakePHP, how can I link the user_id and user_friend_id back to the users table?
I used bake to create all my models and...