小编Ras*_*ash的帖子

使用经典ASP读取xml数据

我编写了一个代码来读取经典asp中的xml数据,如下所示:

<%


 Dim objxml
    Set objxml = Server.CreateObject("Microsoft.XMLDOM")
    objxml.async = False
    objxml.load ("/abc.in/xml.xml")



set ElemProperty = objxml.getElementsByTagName("Product")
set ElemEN = objxml.getElementsByTagName("Product/ProductCode")
set Elemtown = objxml.getElementsByTagName("Product/ProductName")
set Elemprovince = objxml.getElementsByTagName("Product/ProductPrice")  

Response.Write(ElemProperty)
Response.Write(ElemEN) 
Response.Write(Elemprovince)
For i=0 To (ElemProperty.length -1) 

    Response.Write " ProductCode = " 
    Response.Write(ElemEN) 
    Response.Write " ProductName = " 
    Response.Write(Elemtown) & "<br>"
    Response.Write " ProductPrice = " 
    Response.Write(Elemprovince) & "<br>"

next

Set objxml = Nothing 
%>
Run Code Online (Sandbox Code Playgroud)

此代码未提供正确的输出.请帮帮我.

xml是:

<Product>
   <ProductCode>abc</ProductCode>
   <ProductName>CC Skye Hinge Bracelet Cuff with Buckle in Black</ProductName>
</Product>
Run Code Online (Sandbox Code Playgroud)

xml asp-classic

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

在弹出窗口上裁剪浏览的图像

请在下面的代码中查看http://jsfiddle.net/UmJtB/18/

<script type="text/javascript">
$(document).ready( function() {
$(".uploadphoto").click(function() {
    if(document.getElementById('files').files.length == 0){
      alert('Select an Image first');
      return false;
      }else {
         // When upload button is pressed, load the Popupbox First
       loadPopupBox();
              }
        $('#popupBoxClose').click( function() {           
            unloadPopupBox();
        });

        $('#container').click( function() {
            unloadPopupBox();
        });

        function unloadPopupBox() {    // TO Unload the Popupbox
            $('#popup_box').fadeOut("slow");
            $("#container").css({ // this is just for style       
                "opacity": "1" 
            });
        }   
        function loadPopupBox() {    // To Load the Popupbox
            $('#popup_box').fadeIn("slow");
            $("#container").css({ // this is just for style
                "opacity": "1.5" …
Run Code Online (Sandbox Code Playgroud)

javascript jquery jcrop

7
推荐指数
1
解决办法
2975
查看次数

如何在 Fabric.js 中为活动文本添加轮廓

我使用 fabric js 在 html5 中使用了画布。我想将轮廓应用于画布上的活动文本。我编写的以下代码工作正常,但问题是当我增加轮廓的厚度时,它会与文本重叠,这意味着文本颜色消失。

activeObject1.stroke = color;
activeObject1.strokeWidth = 5;
Run Code Online (Sandbox Code Playgroud)

还有一件事通过应用这个我无法应用第二个大纲。我有一个例子,但它不适用于fabricjs。

http://jsfiddle.net/vNWn6/
Run Code Online (Sandbox Code Playgroud)

html javascript html5-canvas fabricjs

6
推荐指数
1
解决办法
4200
查看次数

如何在HTML5(或Fabric.js)中制作屋顶文字效果和谷文字效果

我使用下面的代码:

<script type='text/javascript'>//<![CDATA[ 
window.onload=function(){
/// (c) Ken Fyrstenberg Nilsen, Abidas Software .com
/// License: CC-Attribute

var ctx = demo.getContext('2d'),
    font = '64px impact',
    w = demo.width,
    h = demo.height,
    curve,
    offsetY,
    bottom,
    textHeight,
    angleSteps = 255/h,
    i = h,
    y,
    os = document.createElement('canvas'),
    octx = os.getContext('2d');

os.width = w;
os.height = h;
octx.font = font;
octx.textBaseline = 'top';
octx.textAlign = 'center';

function renderBridgeText() {
    curve = parseInt(iCurve.value, 10);
    offsetY = parseInt(iOffset.value, 10);
    textHeight = parseInt(iHeight.value, 10);
    bottom = parseInt(iBottom.value, 10); …
Run Code Online (Sandbox Code Playgroud)

html5 canvas html5-canvas fabricjs

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

由于android不活动,15分钟后自动注销

由于用户不活动,15分钟后如何在android中使用计时器自动注销?

我在loginActivity.java中使用了以下代码

public class BackgroundProcessingService extends Service {

        @Override
        public IBinder onBind(Intent intent) {
            // TODO Auto-generated method stub
         timer = new CountDownTimer(5 *60 * 1000, 1000) {

                public void onTick(long millisUntilFinished) {
                   //Some code
                    //inactivity = true;
                    timer.start();
                    Log.v("Timer::", "Started");
                }

                public void onFinish() {
                   //Logout
                    Intent intent = new Intent(LoginActivity.this,HomePageActivity.class);
                    startActivity(intent);
                    //inactivity = false;
                    timer.cancel();
                    Log.v("Timer::", "Stoped");
                }
             };
            return null;
        }

    }
Run Code Online (Sandbox Code Playgroud)

并点击登录按钮我已经调用了服务意图.

Intent intent1 = new Intent(getApplicationContext(),
                        AddEditDeleteActivity.class);
                startService(intent1);
Run Code Online (Sandbox Code Playgroud)

请指教......

15分钟后显示此类错误消息

15分钟后显示此类错误消息

android timer countdowntimer

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

我想在对话框或使用android的弹出框中显示我的登录表单

我在一个xml中有两个textViews即.客户登录和供应商登录...当我点击cuztomer登录或供应商登录弹出时应该打开我想要显示我的登录表单.请帮帮我.

这是我的登录表单:login_layout.xml

   <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/background"
    android:orientation="vertical" >

    <include layout="@layout/header_layout" />
        <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_margin="10dip"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/lbl_username"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dip"
            android:gravity="center"
            android:textColor="#000000"
            android:text="@string/username"
            />

        <EditText
            android:id="@+id/et_username"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dip"
            android:hint="@string/enter_username"
            android:inputType="textEmailAddress" />

        <TextView
            android:id="@+id/lbl_password"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dip"
            android:gravity="center"
             android:textColor="#000000"
            android:text="@string/password"
            />

        <EditText
            android:id="@+id/et_password"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dip"
            android:hint="@string/enter_password"
            android:inputType="textPassword"
            android:singleLine="true" />
         <TextView
            android:id="@+id/lbl_forgot"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="25dip"
            android:gravity="center"
            android:textColor="#000000"
            android:text="@string/forgot_password"
            android:textSize="18dp"
            />

        <Button
            android:id="@+id/loginButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="15dip"
            android:text="@string/login"
             />
    </LinearLayout>

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

这是LoginActivity.java:

package com.Login;

import android.os.AsyncTask;
import …
Run Code Online (Sandbox Code Playgroud)

android

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

如何在android中处理空指针异常

我正在尝试制作照片库应用程序.但我有以下错误,我的程序将崩溃.我也有错误到这一行:

imageView.setImageResource(pics[arg2]);
Run Code Online (Sandbox Code Playgroud)

错误

09-03 16:45:22.618: E/AndroidRuntime(443): Uncaught handler: thread main exiting due to uncaught exception
09-03 16:45:22.628: E/AndroidRuntime(443): java.lang.NullPointerException
09-03 16:45:22.628: E/AndroidRuntime(443):  at com.example.myfirstapplication.setwall$1.onItemClick(setwall.java:40)
09-03 16:45:22.648: E/dalvikvm(443): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
Run Code Online (Sandbox Code Playgroud)

这是我的代码:

package com.sai.samples.views;

import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;

public class GalleryView extends Activity {
    Integer[] pics = {
            R.drawable.antartica1,
            R.drawable.antartica2,
            R.drawable.antartica3,
            R.drawable.antartica4,
            R.drawable.antartica5,
            R.drawable.antartica6,
            R.drawable.antartica7, …
Run Code Online (Sandbox Code Playgroud)

android

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