我正在通过访问数据库查找当前的工作,并遇到了一些令人困惑的代码.
Private Sub Form_Current()
Me.Parent!PF = Me.[Compound Number]
Me.Parent.start = Me.[Study Start]
'over and over for different variables
end sub
Run Code Online (Sandbox Code Playgroud)
我想知道vba(数组之外)的括号是什么以及为什么有人需要这个代码.谢谢
这个问题基于我在compsci课上的测试.特别是,我正在努力转换这个功能:
public static void foo(int number) {
if (number > 0) {
foo(number / 2);
System.out.print(number % 2);
}
}
Run Code Online (Sandbox Code Playgroud)
我需要将此函数转换为非递归,但我正在努力,因为它System.out.print(number % 2)发生在递归调用之后.
在工作中遇到这种奇怪的情况。我有使用 Node.JS 解析的 .doc 文件。它们中有.emf我想在我的网络应用程序中显示的照片。我从 word doc 中获取 emf 文件没有问题,但我不知道如何在网页上显示它。简单地按原样嵌入是行不通的。我试图找到一个实用程序来自动转换它们,但没有成功。我想自己转换它们,但在文件上找不到任何技术信息.emf。
有什么建议么?
我有一个创建为dialogFragment的对话框,它具有自己的XML布局。是否可以将带有引用的地图嵌入DialogFragment内,以便我可以更新它的位置?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.andrew.neighborlabour.CreateJobDialog">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:orientation="horizontal">
<TextView
android:id="@+id/tvTitle"
android:text="Create Job"
android:textAppearance="@color/colorPrimaryDark"
android:textSize="24dp"
android:padding="20dp"
android:lines="2"
android:layout_gravity="left"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
</LinearLayout>
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="400dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingBottom="20dp"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Address"
android:id="@+id/etAddress"/>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="200dp"
android:id="@+id/map"
tools:context=".MapsActivity"
android:name="com.google.android.gms.maps.SupportMapFragment" />
</LinearLayout>
</ScrollView>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Create Job"
android:id="@+id/btCreate"
android:onClick="Create"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
到XML中,我可以看到地图,但是我不确定如何从Java代码中与它进行交互。
dialogFragment:
public class CreateJobDialog extends DialogFragment {
@Override
public View onCreateView(LayoutInflater inflater, …Run Code Online (Sandbox Code Playgroud) 我正在为课堂建立一个词汇/ syntex分析器.我遇到的问题是当我尝试从除了main之外的方法访问我的静态变量"lexems"或"tokens"时它们是NULL.当我在main中使用它们(例如lex.printList方法)时,它们很好并且填充了数据.
这是怎么回事???
import java.io.IOException;
import java.util.ArrayList;
public class SyntaxAnalyzer {
public static int pos = 0;
public static ArrayList<String> lexems = new ArrayList<String>();
public static ArrayList<String> tokens = new ArrayList<String>();
public static String nextToken;
public static void main(String[] args) throws IOException {
LexicalAnalysis lex = new LexicalAnalysis();
lex.getFile();
lex.parseText();
ArrayList<String> lexems = lex.getLexems();
lex.printList(lexems);
ArrayList<String> tokens = lex.getTokens();
lex.printList(tokens);
//expr();
lex();
}
static void lex(){
//String lexem = lexems.get(pos);
//System.out.println(lexem);
nextToken = tokens.get(pos);
pos++;
}
}
Run Code Online (Sandbox Code Playgroud) java ×2
access-vba ×1
android ×1
arrays ×1
google-maps ×1
ms-access ×1
node.js ×1
recursion ×1
static ×1
vba ×1