How to invoke Func with arguments without type?

Please note, my logic is way to complicated, I have simplified everything to focus on this problem. I have dictionary of Functions, which I have to invoke, but Function takes type T as an input argument, which is derived type, I don't have access and

What is an effective way to analyze a String in Java?

How should I parse the following String using Java to extract the file path? ? stands for any number of random charaters _ stands for any number of white spaces (no new line) ?[LoadFile]_file_=_"foo/bar/baz.xml"? Example: 10:52:21.212 [LoadFile]

CUDA: Using cudaMemcpyHostToDevice with structures

I have: typedef struct { float x; float y; float z; }vec3; lineCuda.cu extern "C" void cudaTranslate(vec3 *grid, float xrot,vec3 center, int multi) { vec3 *dev_grid[2000]; cudaMalloc( (void**)&dev_grid, sizeof(vec3)*2000 ) ; cudaMemcpy(dev_g

Purpose of PHP parameters

I am trying to grasp the concept of PHP functions. I know how to create one. function functionName() { //code to be executed; } I also know how to call a function. I am just a little confused as to what a parameter is for. I have read the php manual

How to get a cocos2d menu aligned to the left

So I want my main menu to have a ccMenu. I tried exploring with align vertically and alignItemsInColumns but all these options center the items within the menu. If I wanted something that looked like this: Title Option 1 has a very long name Option 2

addObject in Array as structure xml

Folks, I have a Array similar to oneArray bellow, this file is already ready and functional. I want to mount this array dynamic, like addObject, but how can I add a descs value and into it test values ? Tks for help. @property (strong, nonatomic) NSA

How to compress audio and image files in Android?

I store my audio files in the raw folder and image files in drawable. Each audio file takes about 300kb, images 50-100kb. The final version of the app will contain about 300 of audio files and about 1000 images. My question is how to compress them as

SQL Query: SELECT

CREATE TABLE WRITTEN_BY ( Re_Id CHAR(15) NOT NULL, Pub_Number INT NOT NULL, PRIMARY KEY(Re_Id, Pub_Number), FOREIGN KEY(Re_Id) REFERENCES RESEARCHER(Re_Id), FOREIGN KEY(Pub_Number) REFERENCES PUBLICATION(Pub_Number)); CREATE TABLE WORKING_ON ( Re_Id

Recover data from 2 tables with multiple conditions

I have a question, So I have 2 tables : order: id supplier_id status 1 2 3 2 4 5 3 2 7 gift_2_order: order_id gift_id order_price 1 2 4 2 1 5 3 2 6 1 6 1 2 4 9 So I want to get all orders, how many times is repeated in table : gift_2_order and the to

How to install gcc 5.3 with yum on CentOS 7.2?

I am using centos7.2,when I use yum groupinstall "Development Tools", gcc is 4.8.5, like this: I would like to install gcc 5.3. How to approach this with yum?There is a package for gcc-5.2.1, if that's close enough. First you need to enable the

collection_select does not submit value_id to the database

<%= collection_select(:category, :category_id, Category.all, :id, :category_name ,:prompt=>"category") %> wont insert category_id in the deals table.Even though in the parameters you can see category_id is there,but it is not passed to

how to create a database in blackberry OS 5.0 using javascript

I need to create the database in blackberry os 5.0 using javascript for phonegap application. var mydb=false; function onLoad() { try { if (!window.openDatabase) { alert('not supported'); } else { var shortName = 'phonegap'; var version = '0.9.4'; va

How do I know how many times a user has touched an image?

- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; CGPoint touchlocation = [touch locationInView:self.view]; How would you know when a user touched a certain button and how many times

How a prefiled script with #! / Bin / rm deletes itself?

I was reading Chapter 2 of the Advanced Bash-Scripting Guide where I read about this script in a footnote: #!/bin/rm # Self-deleting script. # Nothing much seems to happen when you run this... except that the file disappears. WHATEVER=85 echo "This l

Using .ai (adobe illustrator) variables with Drupal variables

As we know that we can assign the variables to Adobe illustrator file. Is it possible to access these variables by using Drupal 7 variables feature?Short answer: no. Longer answer: This is theoretically possible, but. What you're referring to really

How to get user input during a while loop without blocking

I'm trying to write a while loop that constantly updates the screen by using os.system("clear") and then printing out a different text message every few seconds. How do I get user input during the loop? raw_input() just pauses and waits, which i

Add a button column in a databound datagridview

i have a datagridview. i bound it to a list. now i want to show a column at the end of it. but that column apprear in wrong possition. this is my code grdPatientAppointment.DataSource = lst; grdPatientAppointment.Columns["ID"].Visible = false; /

What tools help manage the architecture?

What are those tools that help managing the architecture especially in the Visual Studio / TFS era? I don't really think for those tools that help expressing what the architecture should be; I rather mean those tools or features of VS/TFS that help t

Select / Extract rows from rowname in R

This question already has an answer here: subsetting data frame based on search pattern in vector 2 answers subset with pattern 1 answer I want to extract some rows from my data in R based on specific identifier in column ids. My data is like this: i

Get a list of values ​​separated by commas - SQL

This question already has an answer here: Concatenating Column Values into a Comma-Separated List 8 answers products ----------------------------- | ProductId | ModelId | |---------------------------| | 12345 | A3666 | | 12345 | A3667 | | 12345 | A89

Local Variable Thread

I'm developing a server for a multiplayer game, where I want to give each player his own Lua thread, that I'd like to fill with some unique globals, e.g. the player's name and id. Basically, I want to be able to set thread local variables from the ho