我在Fedora 19中安装了Eclipse Luna并面临以下问题.
与Windows安装相比,标签标题似乎很大.我在googled和编辑.gtkrc-2.0文件在主目录中,使标签更小.但我使用高对比度外观而不是GTK,以获得深色背景.但是标签看起来又很大.我使用或编辑什么脚本来解决这个问题.
我正在使用Dark主题,树中项目的选择不突出显示.怎么解决这个?
工具栏图标似乎很大,如何减小它们的大小?
第一个陈述有效但不是第二个给出以下误差,为什么?
java.util.Arrays.asList(1,2,3,4,5).stream()
.map(n -> n+1)
.collect(Collectors.toList());
List<Integer> list = IntStream.rangeClosed(1, 10)
.map(n -> n + 1)
.collect(Collectors.toList());
Run Code Online (Sandbox Code Playgroud)
错误:
Type mismatch: cannot convert from Collector<Object,capture#5-of ?,List<Object>>
to Supplier<R>
Run Code Online (Sandbox Code Playgroud) int a[4] = {10,20,30,40};
std::vector<int> vec(4);
std::copy(a, a + 4, vec.begin());
Run Code Online (Sandbox Code Playgroud)
我在vc ++中遇到以下错误,它显示警告,但标记为错误,我该如何解决?
严重性代码说明项目文件行抑制状态错误C4996
std::copy::_Unchecked_iterators::_Deprecate:std::copy使用可能不安全的参数进行调用-此调用依赖于调用者检查传递的值是否正确。要禁用此警告,请使用-D_SCL_SECURE_NO_WARNINGS。请参阅有关如何使用Visual C ++“检查的迭代器” ConsoleApplication3的文档:e:\ programs \ vc \ include \ xutility 2372
Pl/SQL:意图:我的意图是通过使用键作为employee_id来访问定义为下面的光标的雇员元组对象。
问题:我创建了一个游标 - *l_employees_cur* 并想要创建如下类型 *l_employees_t* 的类型表,如下所示,但编译器抱怨说PLS-00315 实现限制不支持表索引类型。
CURSOR l_employees_cur
IS
SELECT employee_id,manager_id,first_name,last_name FROM employees;
type l_employees_t
IS
TABLE OF l_employees_cur%rowtype INDEX BY employees.employee_id%TYPE;
Run Code Online (Sandbox Code Playgroud)
的定义employees.employee_id是:
EMPLOYEE_ID NUMBER(6) NOT NULL
Run Code Online (Sandbox Code Playgroud)
为什么我不能这样做?还是我做错了什么?
我得到以下错误,我假设所有的递归情况,缺少什么?
Prelude> product [] =1
Prelude> product (x:xs) =x * product xs
Prelude> product [1,2,3]
*** Exception: <interactive>:48:1-30: Non-exhaustive patterns in function product
Run Code Online (Sandbox Code Playgroud) 控制器中的Spring重定向不像返回"redirect:/ reservation/reservationSuccess"那样工作,但返回"/ reservation/reservationSuccess"; 工作中.为什么它不起作用.哪里出错了.请帮忙.
@RequestMapping(method = RequestMethod.POST)
public String submitForm(@ModelAttribute("reservation") Reservation reservation,
BindingResult result,
SessionStatus status,
Model model) {
validator.validate(reservation, result);
if(result.hasErrors()) {
model.addAttribute("reservation",reservation);
return "reservation/reservationForm";
}
reservationService.make(reservation);
status.setComplete();
return "redirect:reservation/reservationSuccess";
}
Run Code Online (Sandbox Code Playgroud) bubblesort2 :: (Ord a, Show a) => [a] -> [a]
bubblesort2 [] = []
bubblesort2 [x] = [x]
bubblesort2 (x:y:rest) =
bubblesort2 (init bubbled) ++ [last bubbled]
where
(first,second) = if x > y then (y,x) else (x,y)
bubbled = first : bubblesort2(second:rest)
Run Code Online (Sandbox Code Playgroud)
我试图理解上面的haskell代码.我试图在intellij,jetbrains haskell插件中调试代码,但由于某种原因它会抛出调试执行错误.有什么好方法可以通过ide进行调试.通过gchi正常调试似乎太复杂了.
我有2节课如下.根据我的理解,编译器不能在第4行(类WildCard)抱怨,因为我的参数化类型是(节点?超级数> s0),因为对象在参数化类型中是超级数.但编译器在4,8和9抱怨.为什么这样.
public class Node<E> {
private E data;
public void setData(E obj) {
data = obj;
}
public E getData() {
return data;
}
}
public class WildCard {
static void checkIt(Node<? super Number> s0)
{
Object object=new Object(); //1
Number number =1.5; //2
Integer integer=10; //3
s0.setData(object); //4
s0.setData(number); //5
s0.setData(integer); //6
object=s0.getData(); //7
number=s0.getData(); //8
integer=s0.getData(); //9
}
}
Run Code Online (Sandbox Code Playgroud) 我是perl的新手,以下代码片段无法正常运行并出现以下错误.我试过谷歌搜索,但没有得到任何解决方案.
$halfSize = floor($halfSize);
Run Code Online (Sandbox Code Playgroud)
未定义的子程序&main :: floor调用
请帮我理解下面的haskell代码.
data Coin = Heads | Tails deriving ({-hi-}Eq, {-/hi-} Show,Enum,Bounded)
instance Random Coin where
randomR (a,b) g =
case randomR (fromEnum a, fromEnum b) g of
(x,g') -> (toEnum x,g')
random g = randomR (minBound,maxBound) g
coins = do
g <- newStdGen
print . take 10 $ (randoms g::[Coin])
count = 10000
process :: [Coin] -> (Int,Int)
process cs = (length cs,length (filter (== Heads) cs))
display::(Int,Int) -> String
display (coins,heads) = "We got " ++ (show $ 100.0 …Run Code Online (Sandbox Code Playgroud) 我创建了一个像这样的堆栈类.有时它会运行,有时它会通过ArrayIndexOutofBoundException.线程有什么问题?无法理解请帮忙.
public class StackImpl<E> implements Stack<E>{
private E[] stackArray;
private int topOfStack;
public StackImpl(int size) {
stackArray = (E[]) new Object[size];
topOfStack = -1;
}
public synchronized void push(E e) {
while (isFull()) {
try {
System.out.println("stack is full cannot add " + e);
wait();
} catch (InterruptedException exception) {
exception.printStackTrace();
}
}
stackArray[++topOfStack] = e;
System.out
.println(Thread.currentThread() + " :notifying after pushing");
notify();
}
public boolean isEmpty() {
return topOfStack == 0;
}
public synchronized E pop() …Run Code Online (Sandbox Code Playgroud) 以下是在讨论开放调用时来自实践本书中java并发的代码片段.我没有得到的是setLocation方法的声明方式,它已经被同步并再次在同一个方法中调用synchronized(this)块,为什么呢?是类型错误吗?synchronized方法已经锁定了这个方法然后为什么再次对同一个对象?
@ThreadSafe
class Taxi {
@GuardedBy("this") private Point location, destination;
private final Dispatcher dispatcher;
...
public synchronized Point getLocation() {
return location;
}
public synchronized void setLocation(Point location) {
boolean reachedDestination;
synchronized (this) {
this.location = location;
reachedDestination = location.equals(destination);
}
if (reachedDestination)
dispatcher.notifyAvailable(this);
}
}
Run Code Online (Sandbox Code Playgroud) 我收到了以下错误
Prelude> abs n | n>=0 = n+100 | otherwise =n
Prelude> abs 10
110
Prelude> abs -1
<interactive>:44:1: error:
* Non type-variable argument in the constraint: Num (t -> t)
(Use FlexibleContexts to permit this)
* When checking the inferred type
it :: forall t. (Ord t, Num (t -> t), Num t) => t -> t
Run Code Online (Sandbox Code Playgroud)
Ord隐式类型定义?