“class, interface, or enum expected” error when trying to create package

I'm trying to declare a package in a file as follows:import java.util.*;package rtg;public class Generate{ // ...}But I'm getting an error when I try to compile this:Generate.java:3: class, interface, or enum expected package rtg;Why am

Why function parameter occupy at least 4 bytes stack on x86?

Function parameter is allocated with at least 4 bytes via push/pop if they are allocated in stack on x86. This wastes memory if there are many parameters sized less than 4 bytes for each function invocation. One reason might be push and pop

ambiguous type error when using type families, and STV is not helping

{-# LANGUAGE Haskell2010 #-}{-# LANGUAGE ScopedTypeVariables #-}{-# LANGUAGE TypeFamilies #-}class PoC m where type Wrapper m :: * -> * wrap :: l -> Wrapper m lI'm working with haskell-src-exts, and I want to upgrade my AST to have fr

Swig, python and output strings

I am using Swig to wrap a C interface that looks like this:int dosomething(char **str);where str is an output string. For example, from C its called like this:char *str= NULL;int val= dosomething(&str); ...free(str);In Python, I'd like t

Set Depth : java.util.TreeMap

How can we set depth of a TreeMap object.Suppose we are trying to build an auto suggest feature on top of underlying data structure of a TreeMap, how would depth of a tree as we know affect the performance? 1:Your question is vague but i

Call a function after retrofit and rxjava completes

Here's my codefinal ApiInterface apiInterface=restAdapter.create(ApiInterface.class);apiInterface.submitDataToAnalyze(dataToAnalyze,852741963,1,123,lalala,2015-11-20) .flatMap(new Func1>() { @Override pu

Circular Referencing …Just to show Forms of Different Projects

I am a newbie to C# and i have some difficulty in integrating two different projects. The scenario is:Project A and Project B are Working on a Same Project. Project A has many Forms. I have added Project B as a reference for Project A to sh

Create member alias based on a template parameter condition C++17

So, I am trying to simplify the use of my generic classes and came across the following idea:The following struct is given:template struct Vector { std::array data; float& x = data[0]; float& y = data[1];

How to put a UIView in a UITableView

I have a UITableView and I'm trying to put a graph in my table above the cells. I have a GraphView that I've made that extends UIView and I'd like to put it in my table. How can I do this? 1:You could set it as the tableHeaderView, like

prism: how to bind something in shell.xaml to a region content variable?

App is in prism/mvvm/mef and uses loading by attribute like StockTraderRI.My shell window contains a DockPanel for a StatusBar, which is global to the shell, not local to each region.Looks something like this:

Apps Marketplace SDK: Test Install Flow button missing

Am creating a new project to migrate an oauth1 app to oauth2. Have enabled (and configured) the Apps Marketplace SDK. I am not seeing a Test Install Flow button in the settings screen.I have not found any clues, after much searching, rega

Java 6 Map.get() Type Safety Unexpected Behavior(?) [duplicate]

Possible Duplicate: What are the reasons why Map.get(Object key) is not (fully) generic According to the javadocs (http://java.sun.com/javase/6/docs/api/java/util/Map.html) for the Map interface, the definition of get is V get(Object key

Objective C - Can't work out @property/@synthesize setters and getters?

I know this is a newbie question but i can't get my head around this (or really, i can't get it working)so i have in my .h@interfaceNSString *test;@end;@property NSString *testand in my .m...@synthesize test;...but i want a custom setter fo

Django admin popup links are broken

I'm having a problem with the django admin popups: on creating a new object related to the one I'm currently working on (e.g., the User model and the Groups he belongs to), by clicking on the plus sign near the form field I expect the brows

Returning a limited type in Ada

I am trying to return a limited type via a constructor function. I understand that because it is a limited type, I cannot copy the type but I am not sure of the best way to do it. I have it working using an extended return statement but I h

Instantiating a variadic member function template of a class template

How can I instantiate a variadic member function template of a class template in separate .cpp file? Say, given an above class template in a set of files: a.hpp with definition of interface, a_impl.hpp with implementation and a.cpp with ins

What rules govern using @MOdify and @Query in JPA Repository?

Now that my project is successfully completed, we are trying to document lessons learned. One that still confuses me is the following: We have a database of addresses, and needed to autocomplete when a User started typing in a street name.

Convert ppt/pptx to JPG/PNG using PHP on apache server

Anyone know of a way to use PHP on an apache server to convert ppt/pptx slides into images on the server?As I understand it, one way is to install microsoft powerpoint (or openoffice maybe?) on the server in order to save the powerpoint as

VBA error when trying to close IE after accessing intranet site

The code below works fine if a internet site such as google is used. However, I need to access a work intranet site. When I do I get the following error, run-time error '-2147023179 (800706b5)': Automation error The interface is unknown

Strict Standards: Non-static method

I'm running Ubuntu + PHP 5.4 and got such error: Strict Standards: Non-static method XTemplate::I() should not be called statically, assuming $this from incompatible context in ... on line 339And that method looks like this:interface IT

What's the difference between var label: UILabel! and var label = UILabel( )?

I notice when I'm writing in Swift, if I declare a label in the ViewController as either var label: UILabel! or var label = UILabel(), and then initialize them in the viewDidLoad method, they both seem to, functionally, work identically. So

want to call ViewController's method from appdelegate

I want to call ViewController's method in AppDelegate.m.i have method method() in my Viewcontroller .i want it to be called when didSelectMethod() called in appdelegate.m.I have called method like this.-ViewController *vc=[[ViewController

WPF DataGrid build from List using AutoGenerateColumns

I'm trying to load data to DataGrid from a generic list.the relevant code:XAML: C#: public ILis

Cannot make RemoteServiceRelativePath and XML work (GWT)

I think I have a bad configuration of my XML files for my GTW project because when I try to contact the remote service I get this error: Problem accessing /myresults/compress. Reason: NOT_FOUND. Please find below the important pieces of my

Can you add a mouse listener to an object in paintComponent

Just a quick question, I was wondering if there is any way to add a mouse listener to a paint component? For example, say you drew a rectangle, could you make it so when you click that rectangle, it will then do something.public void paintC

 240    1 2 3 4 5 6 7 8 9 10 下一页 尾页