-- SQL Server 2000SELECT a.name AS 字段名, CASE WHEN EXISTS (SELECT 1 FROM sysobjects WHERE xtype = 'PK' AND parent_obj = a.id AND name IN (SELECT name F...
分类:
数据库 时间:
2014-07-16 23:16:46
阅读次数:
294
ASP如何检测某文件夹是否存在,不存在则自动创建...
分类:
Web程序 时间:
2014-06-28 09:14:09
阅读次数:
144
在传统的Javascript里,当我们对某个页面元素进行某种操作前,最好先判断这个元素是否存在。原因是对一个不存在的元素进行操作是不允许的。
例如:document.getElementById("someID").innerText("hi");
如果ID为"someID"的元素不存在,我们将得到Javascript运行错误:document.getElementById("som...
分类:
Web程序 时间:
2014-06-28 07:21:50
阅读次数:
203
给一个带权有向图,求其中是否存在环,若存在,输出环上边权的平均值最小的那个的平均值。
点的范围就50,感觉可以很暴力。。但显然超时了
感觉方法好巧妙,二分平均值,将所有边权减去二分的那个值,然后spfa判断是否有负环
若有负环,则图中存在的所有环的边权平均值一定比枚举值大
反之则小,要是无论枚举值多大都没有负环,说明图中没有环。
#include
#include
#incl...
分类:
其他好文 时间:
2014-06-28 07:00:08
阅读次数:
298
保存cookie,读取cookie以及判断cookie是否存在```javapublic class Local {private static SharedPreferences shared;public static void setShared(SharedPreferences share...
分类:
移动开发 时间:
2014-06-27 22:27:44
阅读次数:
854
if (Directory.Exists(path)) { string[] name = Directory.GetFiles(path); foreach (string item in name) { ...
分类:
其他好文 时间:
2014-06-27 18:44:08
阅读次数:
196
题目Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adja...
分类:
其他好文 时间:
2014-06-27 17:25:52
阅读次数:
225
2014-06-26 BaoXinjian一、摘要在OAF的开发中,可能有这样的需求,在选择保存按钮时,如果存在改动的数据,则提交事务,保存到数据库中;如果不存在改动的数据,就提示用户当前没有数据可更改;解决时需要判断页面中所使用的视图对象是否发生过改动,存在多种方法1. 调用OADBTransac...
分类:
其他好文 时间:
2014-06-27 13:39:09
阅读次数:
174
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:
其他好文 时间:
2014-06-27 12:46:45
阅读次数:
238
要求1:使用for循环在/root/scripts/practice/q1/oldboy目录下创建十个文件.名称依次为:oldboy-1,oldboy-2,.....oldboy-10.脚本实现:#!/bin/bash
#Question1
shopt-sexpand_aliases
aliasll="ls-l"
cd/root/scripts/practice/q1
#首先判断目录是否存在,不存在则创建目录
if[!..
分类:
其他好文 时间:
2014-06-27 06:29:22
阅读次数:
415