小编Mar*_*ail的帖子

使用PHP将数据写入文件

我需要使用下面的代码发布数据到php文件,将其保存在文本文件中.我只是不知道如何创建php文件来接收下面的数据并将其保存在文本文件中.尽可能简单.

try {  
    // Add your data  
    List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);  
    nameValuePairs.add(new BasicNameValuePair("stringData", "12345"));  
    nameValuePairs.add(new BasicNameValuePair("stringData", "AndDev is Cool!"));  
    httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));  

    // Execute HTTP Post Request  
    HttpResponse response = httpclient.execute(httppost);  
    String responseText = EntityUtils.toString(response.getEntity()); 
    tv.setText(responseText);             
} catch (ClientProtocolException e) {  
    // TODO Auto-generated catch block  
} catch (IOException e) {  
    // TODO Auto-generated catch block  
}  
Run Code Online (Sandbox Code Playgroud)

php post text http

22
推荐指数
2
解决办法
7万
查看次数

移动到SD卡

我的一些用户(很少)无法将我的应用程序移动到SD卡.虽然,他们有Android 2.2及以上,我在清单中启用它."Move to SD"按钮关闭.例如LG Optimus V for Virgin Mobile.

我已经在像nexus one这样的手机上进行了测试,它的功能非常完美,适用于Android 2.2及更高版本.

据我所知,"移动到SD卡"选项的编码在AndroidManifest中.

安卓的installLocation ="自动".

是否有第三方阻止它,或者我错过了什么.

谢谢

android

5
推荐指数
1
解决办法
1141
查看次数

Webview 2 .NET(Windows 窗体)NullReferenceException

Microsoft 终于发布了适用于 .NET 的 Webview2 预发行版。我按照这些步骤操作,但在加载表单时不断收到 NullReferenceException。我怎样才能解决这个问题?

System.InvalidOperationException: 'An error occurred creating the form. See Exception.InnerException
for details.  The error is: Object reference not set to an instance of an object.'

NullReferenceException: Object reference not set to an instance of an object.

This exception was originally thrown at this call stack:
Microsoft.Web.WebView2.WinForms.WebView2.OnVisibleChanged(System.EventArgs)
  System.Windows.Forms.Control.AssignParent(System.Windows.Forms.Control)
  System.Windows.Forms.Control.ControlCollection.Add(System.Windows.Forms.Control)
  System.Windows.Forms.Form.ControlCollection.Add(System.Windows.Forms.Control)
  Repair_VIP.Form_test.InitializeComponent() in Form_test.Designer.vb
Run Code Online (Sandbox Code Playgroud)

.net

2
推荐指数
1
解决办法
6562
查看次数

从数据库中删除一行

我在删除一行时遇到问题.我可以插入和删除整个表.我无法理解整个ID的东西,只删除一行,我看着一些例子,我无法得到它.它让我疯狂,任何帮助都会非常感激.这是sqlite类;

public class datahelper {
   private static final String DATABASE_NAME = "table.db";
   private static final int DATABASE_VERSION = 1;
   private static final String TABLE_NAME = "table1";

   private Context context;
   private SQLiteDatabase db;
   private SQLiteStatement insertStmt;

   private static final String INSERT =
      "insert into " + TABLE_NAME + "(name) values (?)";

   public datahelper(Context context) {
      this.context = context;
      OpenHelper openHelper = new OpenHelper(this.context);
      this.db = openHelper.getWritableDatabase();
      this.insertStmt = this.db.compileStatement(INSERT);
   }

   public long insert(String name) {
      this.insertStmt.bindString(1, name);
      return this.insertStmt.executeInsert();
   }

   public …
Run Code Online (Sandbox Code Playgroud)

sql delete-row

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

.net ×1

android ×1

delete-row ×1

http ×1

php ×1

post ×1

sql ×1

text ×1