How to solve java.lang.NoClassDefFoundError?

How to solve java.lang.NoClassDefFoundError?

I've tried both the example in Oracle's Java Tutorials. They both compile fine, but at run-time, both come up with this error:Exception in thread "main" java.lang.NoClassDefFoundError: graphics/shapes/Square at Main.main(Main.java:7)Caus

How do you find a float's nearest non-equal value? [duplicate]

How do you find a float's nearest non-equal value? [duplicate]

This question already has an answer here: How to alter a float by its smallest increment (or close to it)? 7 answers A float (a.k.a. single) value is a

How to install a python library manually

How to install a python library manually

I built quickfix engine (http://www.quickfixengine.org/) for one of my tasks and also built in python support for it.Unfortunately this is a multi user env and I dont have access to the python installation path. Thus the make install comman

Static keyword in function parameter

Static keyword in function parameter

I've just found this function definition in some embedded code:float round_float_to_4(static float inputval);I'm familiar with other uses for static (global variables, functions and local variables), but this is the first time I see it as s

How can I convert List to Hashtable in C#?

How can I convert List to Hashtable in C#?

I have a list of objects, each containing an Id, Code and Description.I need to convert this list into a Hashtable, using Description as the key and Id as the value.This is so the Hashtable can then be serialised to JSON.Is there a way to c

show distinct column values in pyspark dataframe: python

show distinct column values in pyspark dataframe: python

Please suggest pyspark dataframe alternative for Pandas df['col'].unique().I want to list out all the unique values in a pyspark dataframe column.Not the SQL type way (registertemplate then SQL query for distinct values).Also I don't need g

Why `float` function is slower than multiplying by 1.0?

Why `float` function is slower than multiplying by 1.0?

I understand that this could be argued as a non-issue, but I write software for HPC environments, so this 3.5x speed increase actually makes a difference.In [1]: %timeit 10 / float(98765) 1000000 loops, best of 3: 313 ns per loop

how to change jQuery autocomplete plugin default querystring key? (term to that i want)

how to change jQuery autocomplete plugin default querystring key? (term to that i want)

jQuery autocomplete plugin sent request like thismysite.com/suggestion?term=Sadeghis there any way to change term querystring key to another? i can't find option that provide this for me ;) 1:I assume you're using jQuery UI AutoCompleteY

How to get first object out from List using Linq

How to get first object out from List using Linq

I have below code in c# 4.0.//Dictionary object with Key as string and Value as List of Component type objectDictionary> dic = new Dictionary>();//Here I am trying to do the loping for Listforeach (List lstComp in dic.Values.ToList()){ /

Escaping JavaScript string literals in views

Escaping JavaScript string literals in views

Is there a utility function for escaping JavaScript in ASP.NET MVC views? I often need to init a little snippet of JavaScript using some values from the view; for instance I may have something like:I would expect something like:I could, of

Get first element from a dictionary

Get first element from a dictionary

I have the following declaration:Dictionary> like = new Dictionary>();I need to get the first element out, but do not know the key or value. What's the best way to do this? 1:Edit To satisfy the commenters.Note that to call First here is

What does &(int) { 1 } mean in C++?

What does &(int) { 1 } mean in C++?

I saw this here and I don't know what it means:&(int) { 1 }I thought it was weird because it seems like invalid syntax. It's casting a block scope(?) with a random 1 in the middle (without a semi-colon) and taking the address. Doesn't make

jQuery or JavaScript equivalent of PHP strpos function to find string on a page

jQuery or JavaScript equivalent of PHP strpos function to find string on a page

Is there an equivalent function in JavaScript or jQuery similar to strpos in PHP?I want to locate a string inside an element on a page. The string I'm looking for is: td class="SeparateColumn"I would like something where I can run it like t

What does the .csproj file do?

What does the .csproj file do?

Usually a C# project has a .csproj file associated with it. What is that file for? What data does it contain? 1:Basically the .csproj file contains the list of files in your project, plus the references to system assemblies etc.There ar

Excluding a bean's field in Hibernate criteria result

Excluding a bean's field in Hibernate criteria result

Here is how I'm getting my User beans from Database.session.createCriteria(User.class).list();That returns all of User records from database. Interesting part is that, I don't want to get the password field from DB. Just want to exclude tha

mmap vs sbrk, performance comparison

mmap vs sbrk, performance comparison

Which of these calls is faster on average? I've heard that mmap is faster for smaller allocations but I haven't heard a comparison of either. Any information on performance for these would be nice. 1:You should tag this with a particular

MGTwitterEngine for Iphone SDK errors

MGTwitterEngine for Iphone SDK errors

I'm trying to get MGTwitterEngine to work for the iPhone SDK. I've followed the read me below and now I keep getting the following errors: TCDownload.h: No such file or directoryyajl_parse.h: No such file or directoryNow, I've done a search

OSX count pressed keys without accessibility access

OSX count pressed keys without accessibility access

I found that upwork.app can count pressed keys without accessibility access but I can not understand how it is done.I read a lot of themes like this one:OSX: Detect system-wide keyDown events?In all themes are saying that process should be

Application.Current.Shutdown() doesn't

Application.Current.Shutdown() doesn't

Title's about it. WPF app with some WCF stuff for IPC. I call Application.Current.Shutdown() and the app continues on happily. I thought Shutdown was supposed to be unstoppable.Perhaps because it's being called from a background thread?

Core Data Migration - Can't find mapping model for migration

Core Data Migration - Can't find mapping model for migration

I followed the guide found here:http://www.timisted.net/blog/archive/core-data-migration/but keep getting "Can't find mapping model for migration" when I start up the app with the new model. I've tried it in xcode 3 and xcode 4, multiple ti

How does Object class implement clone() method

How does Object class implement clone() method

In a book on Core Java, I found this excerpt : Think about the way in which the Object class can implement clone. It knows nothing about the object at all, so it can make only a field-by-field copy. If all data fields in the object ar

Deepzoom for WPF [closed]

Deepzoom for WPF [closed]

Are there any ports to WPF of Silverlight's MultiScaleImage (aka DeepZoom)? Have Microsoft road-mapped this at all for WPF?I want to move from WinForms to WPF and require something like DeepZoom, using Silverlight isn't an option. 1:At

Get specific subdomain from URL in foo.bar.car.com

Get specific subdomain from URL in foo.bar.car.com

Given a URL as follows:foo.bar.car.com.auI need to extract foo.bar.I came across the following code :private static string GetSubDomain(Uri url){ if (url.HostNameType == UriHostNameType.Dns) { string host = url.Host; if

How to drop connecting lines where the function is discontinuous

How to drop connecting lines where the function is discontinuous

I'm plotting some functions that have several discontinuities. Each function is given as a list. I want to connect points with lines only where the function is continuous.Here is a simplified example of what plot is doing.x=linspace(0,1,100

How to test a value on being AnyVal?

How to test a value on being AnyVal?

Tried this:scala> 2.isInstanceOf[AnyVal]:8: error: type AnyVal cannot be used in a type pattern or isInstanceOf test 2.isInstanceOf[AnyVal] ^and this:scala> 12312 match { | case _: AnyVal => true