这是我的主要.xml文件:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dip"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="@color/mbackground1"
android:gravity="center_horizontal"
android:text="@string/decode_label"
android:padding="5dip"
/>
<TextView
android:id="@+id/mytext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:background="@color/mbackground2"
android:textColor="@color/mytextcolor"
android:padding="5dip"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/continue_label"
android:gravity="center_horizontal"
android:textColor="@color/mytextcolor"
android:padding="5dip"
/>
<Button
android:id="@+id/webbutton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/web_button"
android:textColor="@color/mytextcolor"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/continue_label1"
android:gravity="center_horizontal"
android:textColor="@color/mytextcolor"
android:padding="5dip"
/>
<Button
android:id="@+id/callbutton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/call_button"
android:textColor="@color/mytextcolor"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/continue_label2"
android:gravity="center_horizontal"
android:textColor="@color/mytextcolor"
android:padding="5dip"
/>
<Button
android:id="@+id/emailbutton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/sendemail_button"
android:textColor="@color/mytextcolor"
/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我希望基于运行时的输出,它应该只显示一个文本视图和对应于该输出的按钮.我在main.xml文件中定义布局,我也在这个领域.
有谁有想法吗.提前致谢
我正在创建一个带有java poi库的excel文件,它被创建但是当我打开文件时,excel会弹出一条消息,说"我们发现文件内容有问题.你想让我们尽可能多地恢复如果你相信工作簿的来源."
单击是,它弹出"修复的部分:/xl/worksheets/sheet1.xml部分,带有XML错误.加载错误.第121行,第0列.删除记录:从/xl/worksheets/sheet1.xml部分合并单元格".
并且文件中没有数据丢失,我无法理解excel错误背后的原因.
我不能在这里写完整个代码,但这里是与xlsx文件相关的主要内容:
<cfdirectory action="list" directory="#expandPath('/poi_39')#" name="poidir"/>
<cfset paths = arrayNew(1)>
<cfloop query="poidir">
<cfset arrayAppend(paths, directory & "\" & name) />
</cfloop>
<cfset server.loader = createObject("component", "javaloader.JavaLoader").init(loadPaths=paths, loadColdFusionClassPath=true) />
<cfscript>
_Thread = createObject("java", "java.lang.Thread");
currentClassloader = _Thread.currentThread().getContextClassLoader();
try {
// Set the current thread's context class loader as Javaloader's classloader, so dom4j doesn't die
_Thread.currentThread().setContextClassLoader(server.loader.getURLClassLoader());
//code found online
//inp = createObject("java", "java.io.FileOutputStream").init("#fullpath#");
//reseting the value on code
inp = 100;
//workBook = server.loader.create("org.apache.poi.xssf.usermodel.XSSFWorkbook").Init(inp);
workBook = server.loader.create("org.apache.poi.xssf.streaming.SXSSFWorkbook").Init(inp);
}
catch(Any …Run Code Online (Sandbox Code Playgroud) 我使用以下代码,用于创建数据库连接.但是没有创建表.
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Bundle;
import android.provider.BaseColumns;
import android.widget.TextView;
public class DatabaseHelper extends SQLiteOpenHelper {
private static final String DATABASE_NAME = "notification.db";
public static final String Title = "Title";
public static final String NotificationId = "NotificationId";
public static final String Subject = "Subject";
public static final String TABLE = "notification";
public static final String Flag = "Flag";
public DatabaseHelper(Context context)
{
super(context,DATABASE_NAME,null,1);
android.util.Log.v("DatabaseHelper","Constructor called");
}
public void onCreate(SQLiteDatabase db)
{
android.util.Log.v("SQLiteDatabase","SQLiteDatabase create called");
String sql = …Run Code Online (Sandbox Code Playgroud) 我在我的应用程序中使用以下代码:
import android.app.Activity;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
import android.widget.TextView;
public class LinkifyDemo extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView linkify = (TextView) findViewById(R.id.linkify);
linkify.setText("http://www.google.com");
Linkify.addLinks(linkify, Linkify.WEB_URLS);
setContentView(R.layout.main);
}
}
Run Code Online (Sandbox Code Playgroud)
还包括我的清单中的以下许可.
<uses-permission android:name="android.permission.INTERNET" />
Run Code Online (Sandbox Code Playgroud)
但应用程序给出错误,强制关闭.任何人都可以帮助我.谢谢!!
我有这样的代码:
<cfset n = '222222222222222'>
<cfset sum=0>
<cfset sum += n>
<cfoutput>#sum#</cfoutput>
Run Code Online (Sandbox Code Playgroud)
输出是:
2.22222222222E+014
Run Code Online (Sandbox Code Playgroud)
有没有什么方法可以像'222222222222222'那样以正常形式输出?
Queryappend 在 Coldfusion - 18 中而不是在 Coldfusion - 16 中。
任何人都可以为“Queryappend”建议任何自定义coldfusoin函数
假设我有 2 个查询:
Query-1
select * from user where userid > 10 order by userid asc
Query-2
select * from user where userid < 10 order by userid desc
Query append should return folowing:
userid username
11 AA
12 BB
13 CC
9 MM
8 NN
7 OO
Run Code Online (Sandbox Code Playgroud)
提前致谢
我在我的项目中使用以下代码
<cfoutput query="getOptions">
<tr>
<td align="center"> #optionname#</td>
<td align="center"> #DollarFormat(optionprice)#</td>
<td><input type="checkbox" name="OptionalID" value="#OptionID#" ></td>
</tr>
</cfoutput>
Run Code Online (Sandbox Code Playgroud)
我将值传递给其他形式如下
<a href="addtocart.cfm?pid=#productId#&OptionalID=#OptionalID#">
Run Code Online (Sandbox Code Playgroud)
我该怎么做才能传递所有选中的复选框的值.请帮忙
提前致谢