I am in the process of converting some code from C# to Java. I have never used C# before, but it has been pretty easy up to this point.
I have a line that looks like this in the C# file:
coverage.createMethod = delegate (Gridpoint gp){
//Some method stuff in here, with a return objecct
}
What exactly is this trying to do? It seems a little bit like an inline class but I am not sure how to go about converting htis to java
I have an application that performs a little slow over the internet due to bandwidth reasons. I have enabled GZip which has improved download time by a significant amout, but I was also considering whether or not I could switch from XML to JSON in order to squeeze out that last bit of performance. Would using JSON make the message size significantly smaller, or just somewhat smaller? Let's say we're talking about 250kB of XML data (which compresses to 30kB).
Hi,
i have this page:
login: [email protected]
password: m
I want to have the string "Editar mi perfil" aligned on the right, so i have added:
text-align: right
but it doesn't work,
I have tried also:
float:right
It works but goes a bit upper than I want.
Any idea?
Regards
Javi
Okay, I want to have an app that takes phone numbers from an online database and displays them in a table view. When the user is not online, I want them to still be able to see the numbers they already got from the database in the table view. If the user manages to go back online, the database updates the view. My question is, is this possible to do and if so, what's the best way to approach it? (bit of a newbie, please help me out)
Hello, as a way to spice up my C++ programming homework, I've decided to instead of typing the C++ from the book onto my computer, instead reforming it in Ruby. Yes it's a bit silly, but I'm bored.
Anyway, I'm having trouble converting this kind of function to Ruby
void swap(int &a,int &b){
int c=b;
b=a;
a=c
}
What would the equivalent ruby code looking inside a function ?
Hey, here's a dumb question: how can I set an object property given its name in a string. I have a dictionary being passed to me and I wish to transfer its values into namesake properties using code like this:
for entry in src_dict:
if entry.startswith('can_'):
tgt_obj[entry] = src_dict_profile[entry]
I'm still a bit of a noob with Python so would appreciate some help.
- dave.
I need to test if my 304 responses are working, but my development environment is pretty hard set on force no-cache.
Is there an easy way to modify the max-age value of the cache-control header before it goes out?
I'm perhaps a bit optimistic in hoping chrome (or an extension, or FF) has a console command letting me alter the if-modified-since header then send the request. Maybe paste something into a telnet connection?
So my overall goal is that I want to be able to code with CUDA enabled applications.
However, upon many days of searching, using installation walkthroughs, and reinstalling countless times after driver failure... I'm now here as a last resort.
I cannot get Ubuntu 12.04 LTS to install the NVIDIA 295.59 driver for my GeForce GT 540M NVIDIA graphics card.
My main system specs is as follows... (I believe having the Intel processor may be the problem)
DELL Laptop XPS L502X
Intel® Core™ i7-2620M CPU @ 2.70GHz × 4
Intel Integrated Graphics
64 bit
NVIDIA GeForce GT 540M
Ubuntu 12.04 LTS
All other specs are irrelevant unless I forgot something?
Methods Tried:
aptitude install nvidia-current (all packages)
Results:
Nothing really happened. Nothing in the additional drivers menu appeared, nor was the NVIDIA X Server settings application allowing access because it thought there was no NVIDIA X Server installed.
Downloaded driver from nvidia.com.
Set nomodeset in the grub boot menu through /boot/grub/grub.cfg
Went to console and turned off lightdm.
Installed the driver, but it said the pre-install failed? (mean anything?)
Started up lightdm again.
Results:
NVIDIA X Server settings still didn't notice it. Even tried to do nvidia-xconfig multiple times. I also went into the config file to make sure the driver setting said "nvidia".
aptitude install nvidia-173 (all packages)
Results:
Couldn't find the xorg-video-abi-10 virtual package. It was nowhere to be found and the ubuntu forums everywhere had no answers. Lots of people were having this problem.
This is easily done in windows, simply download the driver and debug in visual studio with no problems at all. I'd like clear step-by-step instructions on how I should go about this. I'm relatively new to linux but I can find my way around pretty well so you aren't talking to a straight-up beginner. Also, if you think another thread may have the answer please post because I was having a hard time looking for my specific type of problem.
TL;DR I want to have access to my GPU so I can code with CUDA while in Ubuntu 12.04 on my 64 bit laptop that also has Intel integrated graphics on the processor.
Solution:
sudo apt-add-repository ppa:ubuntu-x-swat/x-updates && sudo apt-get update && sudo apt-get upgrade && sudo apt-get install nvidia-current
Hi,
I know at least two PHP source prettifiers and one for JavaScript, but all of them are written in those languages - PHP prettifiers in PHP, JavaScript in JS ;]
Now what I'm looking for is a prettifier for those languages which is a native application - can be C/C++ or Pascal, so that I can run it from commandline.
Possibly open source solution, as I might need to modify it a bit for my needs ...
( i need to run those prettifiers in batch mode )
any known programs / libraries for that?
Using simple type like
class A {
public int X, Y;
}
with object intializers, one can write
var a = new A { X=0, Y=0 };
But the following is also accepted by the compiler:
var a = new A { X=0, Y=0, }; // notice the additional ','
Same for int[] v = new int[] { 1, 2, };
This looks a bit strange ... Did they forgot to reject the additional ',' in the compiler or is there a deeper meaning behind this?
Hi chaps,
I hit a bit of a quirk of scala's syntax I don't really understand
object Board {
def getObjectAt(x:Int, y:Int):Placeable = return locations(x)(y)
}
works fine. But
object Board {
def getObjectAt(x:Int, y:Int):Placeable {
return locations(x)(y)
}
}
returns the error
Board.scala:8: error: illegal start of declaration
return locations(x)(y)
I found some stuff that says the second form convinces the scala compiler you're trying to specify an expansion to the return type Placeable. Is there a way I can fix this, or should I just avoid specifying a return type here?
I have gone through with some of the sample examples of blackberry.
And in some classes I have found some variables are starting from _ like _address and some of them are ALLCAPS.
So, i guess it's bit different then the basic Java naming conventions.
So, can anybody let me know that is there any difference between Java and blackberry naming convention ?
Thanks in advance.
Could someone write down a very simple basic example in javascript to conceptualize (and hopefully make me understand) how the jQuery plugin design pattern is done and how it works?
I'm not interested in how creating plugin for jQuery (so no jQuery code here at all).
I'm interested in a simple explanation (maybe with a bit of Javascript code) to explain how it is done the plugin concept.
Plz do not reply me to go and read jQuery code, I tried, but I it's too complex, otherwise I would have not post a question here.
Why is it that this works:
$cacheMatchesNotPlayed = $cache->load('externalData');
$cacheMatchesNotPlayed = $cacheMatchesNotPlayed['matchesNotPlayed'];
But this doesn't work:
$cacheMatchesNotPlayed = $cache->load('externalData')['matchesNotPlayed'];
Is there some reason for it? The second bit is easier to write.
So im just playing around with PHP and the MD5 functionality, sorry if this sounds really silly, but I cant seem to understand, how is it possible to represent an unlimited number of characters of input into a 32 bit character output? Is my logic sound here? Or is there a limit to the input that a MD5 function can take?
Thanks...
Is it possible to control the standard streams of C++ code in python? So the code is wrapped with SWIG and then exposed to python where I call its functions.
I am getting all kinds of unwanted messages coming from C++ code and I want to suppress them either by not using the stream or by redirecting it to a bit bucket.
Hi
As a developer I am a user of Subversion at the moment and I am changing job and going to work for a company that uses Team Foundation Server
I would like to learn the basic and more as user of Team Foundation Server
What do I need to do to replicate the enviroment and practice a bit?
Any Tips ?
What should I read?
Can I simulate the enviroment?
Thanks a lot
Don't know if this is possible, I am looking a writing social network-esque code but need a bit of help.
SELECT wall.Wid, wall.uid, wall.wcomment, wall.name, comment.wid, comment.comment,comment.wid
FROM wall
LEFT JOIN comment ON wall.Wid=comment.wid
WHERE wall.uid in (SELECT fid from friends where uid = 3)
Cheers guys
while restoring some data i am displaying a activity indicator..but i want the background image to become dull or dim a bit so that the focus is on activity indicator..i have seen that in some applications but cant figure out how to achieve that??
Dear All,
I am experienced in the technical support like Linux, oracle, sunos etc and but if i say scripting i know little bit of bash. Now i promoted to manage technical engineers including some JavaScript developers, so i want to learn JavaScripting so that i can understand engineers. Hope you understand. Can you please advise me how can i start JavaScripting and point me to some simple docs and examples.
I am creating quite a bit of XML with JavaScript which is then processed by variuos components. I would like to send this XML to some file and prompt the user to save it on their disk (all this happens in the browser at the client, no server interaction whatsoever). Is this at all possible? Google is not a lot of help here :(
I'm a newbie android programmer and I recently followed a tutorial which shows how to create a local SQLite database by using SQLiteDatabase.rawQuery to return a Cursor. I would like to modify my app to use CursorLoader which is apparently a better way to access the database.
My problem is the CursorLoader constructor expects a URI to be given. Do I just input "file:///[path to db]"? Seems a bit messy.
Hi,
I have a function in which I'd like to return an Object or false.
Is a return type of * ok to use? are there any downfalls to this? (besides it being a bit lazy in some cases).