我有Java编译器的问题.我简化了我的代码:
package a;
public class Base {
// compiles if this is made public or an int
protected Integer value = 0;
}
---
package b; // must be in a separate package
import a.Base;
public class Sub extends Base {
public void increment() {
System.out.println(super.value);
value++;
super.value = 1;
super.value = super.value + 1;
// this line crashes the compiler; the others all work
super.value++;
}
}
Run Code Online (Sandbox Code Playgroud)
编译后我得到:
Information:java: An exception has occurred in the compiler (1.8.0_51). Please file …Run Code Online (Sandbox Code Playgroud) YouTube v3 搜索 API 中是否有按语言过滤结果的选项?在 v2 中有像 lr 这样的参数,我可以将其设置为指定的语言。
我在 webBrowser 控件中遇到内存泄漏问题。我找到了这个线程:
如何解决 .NET Webbrowser 控件中的内存泄漏问题?
和这个:
//dispose to clear most of the references
this.webbrowser.Dispose();
BindingOperations.ClearAllBindings(this.webbrowser);
//using reflection to remove one reference that was not removed with the dispose
var field = typeof(System.Windows.Window).GetField("_swh", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
var valueSwh = field.GetValue(mainwindow);
var valueSourceWindow = valueSwh.GetType().GetField("_sourceWindow", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(valueSwh);
var valuekeyboardInput = valueSourceWindow.GetType().GetField("_keyboardInputSinkChildren", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(valueSourceWindow);
System.Collections.IList ilist = valuekeyboardInput as System.Collections.IList;
lock(ilist)
{
for (int i = ilist.Count-1; i >= 0; i--)
{
var entry = ilist[i];
var sinkObject = …Run Code Online (Sandbox Code Playgroud) 我有字符串例如:
string str = "??? - ?wr?";
Run Code Online (Sandbox Code Playgroud)
我如何用他们的快捷方式取代ĄĆŹ - ćą?该示例字符串的结果应为:
str = "\u0104\u0106\u0179 \u2013 \u0107wr\u0105"
Run Code Online (Sandbox Code Playgroud)
有没有快速更换方法?我不想为每个角色使用.Replace ...
我想在我的图表上隐藏X轴.这是我的代码:
zg1.GraphPane.XAxis.IsVisible = false;
zg1.AxisChange();
zg1.Invalidate();
Run Code Online (Sandbox Code Playgroud)
但我有问题.
我的图表:

隐藏X轴后:

知道为什么我有这个问题吗?
{
"id":"123", "result":
{
"0": { "children_id": "0", "name": "some name" },
"1": { "children_id": "1", "name": "some other name" }
}
}
Run Code Online (Sandbox Code Playgroud)
我有这个JSON字符串,我怎么可以使用它来反序列化它:JSON.NET http://json.codeplex.com?
我正在尝试制作一些可以容纳我的json对象的类,但是我不知道我怎么能保持这个"0"和"1".
public class Data
{
public string children_id { get; set; }
public string name { get; set; }
}
public class RootObject
{
public string id { get; set; }
public List<Data> result { get; set; }
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试按类别ID和关键字搜索视频.
这是我的链接:
https://www.googleapis.com/youtube/v3/search?part=snippet&key=API_KEYs&videoCategoryId=10&q=bieber
Run Code Online (Sandbox Code Playgroud)
我越来越:
{
"error": {
"errors": [
{
"domain": "youtube.search",
"reason": "invalidSearchFilter",
"message": "Invalid combination of search filters and/or restrictions.",
"locationType": "parameter",
"location": ""
}
],
"code": 400,
"message": "Invalid combination of search filters and/or restrictions."
}
}
Run Code Online (Sandbox Code Playgroud)
我应该在api请求中改变什么?
可能重复:
如何知道分数中的重复小数?
有没有办法判断小数点是终止还是重复?
示例:我有分数:1/3,并且它是重复的小数-0.33333333333333333333333我有分数1/2,并且它是终止的小数-0.5
我不知道我该怎么做。