由买买提看人间百态

topics

全部话题 - 话题: string
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
a**u
发帖数: 99
1
来自主题: Science版 - String Theory Basics 5
How many string theories are there?
There are several ways theorists can build string theories. Start
with the elementary ingredient: a wiggling tiny string. Next decide:
should it be an open string or a closed string? Then ask: will I
settle for only bosons ( particles that transmit forces) or will I ask
for fermions, too (particles that make up matter)? (Remember that in
string theory, a particle is like a note played on the string.)
If the answer to the last question is "Bosons only, please!"
S****h
发帖数: 558
2
It is a small bay area IT firm. They asked first how to find 10 most
frequent strings from 10 billion (string, frequency) pairs. Easy, use heap
O(10^9*log10). Then they asked the second question.
How to find 10 most frequent strings in 10 billion string list?
Not much idea. I answered to sweep once to build (string,frequency) pair
and then sweep again to find the first 10. Is there any better way?
c****9
发帖数: 164
3
来自主题: JobHunting版 - 关于String Interleaving 验证的问题
贴个过了测试的递归dp的code
class Solution {
public:
vector > map;
bool help(string& s1,string& s2,string& s3,int i, int j)
{
if(i+j==s3.size())
map[i][j]=true;
if(map[i][j]==1)
return true;
else if(map[i][j]==0)
return false;
if(i {
if(help(s1,s2,s3,i+1,j))
map[i][j]=1 ;
else
map[i][j] = 0 ;

}
if(j阅读全帖
b***m
发帖数: 5987
4
大牛们给评价一下我下面的code,匆匆写的,没用太多case验证:
bool IsStringMatch(char *pattern, char *string)
{
if( !pattern || !string ) return false;

char *laststar = NULL;

while( *pattern && *string )
{
if( *pattern == '*' )
laststar = pattern;
else
{
if( *pattern != *string && *pattern != '?' )
{
if( laststar )
pattern = laststar;
else
return false;
}
... 阅读全帖
j*****y
发帖数: 1071
5
来自主题: JobHunting版 - scramble string 怎么用dp 阿?
多谢二爷,这是我的 recursive
class Solution {
public:
bool isScramble(const string &s1, int start1, int end1, const string &s2
, int start2, int end2)
{
string s = s1.substr(start1, end1 - start1 + 1);
string t = s2.substr(start2, end2 - start2 + 1);
sort(s.begin(), s.end());
sort(t.begin(), t.end());
if(s != t)
{
return false;
}
if(s1.substr(start1, end1 - start1 + 1) == s2.substr(start2, end2 -
start2 + 1))
{
... 阅读全帖
y****n
发帖数: 743
6
我的方法:通过一个顺序无关的校验码,找到“疑似”字串,在对“疑似”进行甄别。
public static int GetCode(char c)
{
return c * (c ^ 23405) % 74259;
}
public static bool IsPermut(string a, string b)
{
List chars = new List(a.ToArray());
foreach (char ch in b)
if (chars.Contains(ch))
chars.Remove(ch);
else
return false;
return true;
}
public static void FindPermut(string a, string b)
{
if (a.Length >= b.Length)
{
int codeSumB = 0;
for (int i = 0; i < b.Length; i++)
codeSumB += Get... 阅读全帖
m**********e
发帖数: 22
7
今天重做leetcode:String Reorder Distance Apart。发现1337c0d3r给出的答案(http://discuss.leetcode.com/questions/31/string-reorder-distance-apart)有较大改进的地方:"used" array and the while loop inside the for loop are not needed. I wrote one with C#:
// String Reorder Distance Apart
public string ReorderDistanceApart(string str, int distance)
{
int[] freq = new int[256];
int[] used = new int[256];
bool[] except = new bool[256];
int n = str.Length... 阅读全帖
h*********2
发帖数: 192
8
来自主题: JobHunting版 - Reverse Words in a String
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Clarification:
What constitutes a word?
A sequence of non-space characters constitutes a word.
Could the input string contain leading or trailing spaces?
Yes. However, your reversed string should not contain leading or trailing sp
aces.
How about multiple spaces between two words?
Reduce them to a single space in the reversed string.
基本思路就是先整体reverse string (character per c... 阅读全帖
f*******w
发帖数: 1243
9
来自主题: JobHunting版 - Reverse Words in a String
C++的
class Solution {
public:
void reverseWords(string &s) {
stack np;
size_t lastPos = s.find_first_not_of(" ", 0);
size_t pos = s.find_first_of(" ", lastPos);
while (string::npos != pos || string::npos != lastPos) {
if (lastPos != pos) {
string str = s.substr(lastPos, pos - lastPos);
np.push(str);
}
lastPos = s.find_first_not_of(" ", pos);
pos = s.find_first_of(" ", lastP... 阅读全帖
h*********2
发帖数: 192
10
来自主题: JobHunting版 - Reverse Words in a String
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Clarification:
What constitutes a word?
A sequence of non-space characters constitutes a word.
Could the input string contain leading or trailing spaces?
Yes. However, your reversed string should not contain leading or trailing sp
aces.
How about multiple spaces between two words?
Reduce them to a single space in the reversed string.
基本思路就是先整体reverse string (character per c... 阅读全帖
f*******w
发帖数: 1243
11
来自主题: JobHunting版 - Reverse Words in a String
C++的
class Solution {
public:
void reverseWords(string &s) {
stack np;
size_t lastPos = s.find_first_not_of(" ", 0);
size_t pos = s.find_first_of(" ", lastPos);
while (string::npos != pos || string::npos != lastPos) {
if (lastPos != pos) {
string str = s.substr(lastPos, pos - lastPos);
np.push(str);
}
lastPos = s.find_first_not_of(" ", pos);
pos = s.find_first_of(" ", lastP... 阅读全帖
y****e
发帖数: 25
12
可以用recursion:
public boolean isScramble(String s1, String s2) {
if (s1.length() != s2.length()) return false;
if (s1.equals(s2)) return true;

char []c1 = s1.toCharArray();
char []c2 = s2.toCharArray();
Arrays.sort(c1);
Arrays.sort(c2);
if (!Arrays.equals(c1, c2)) return false;

for (int i = 1; i < s1.length(); i++) {
String s11 = s1.substring(0, i);
String s12 = s1.substring(i);
... 阅读全帖
K****D
发帖数: 30533
13
来自主题: Tennis版 - hybrid string problem
From physics point of view, the string that moves more tends to
break first.
For most people, that means main string breaks faster. -- unless
you are weird junk-baller.
From saving string point of view, all hybrid should use stronger
string as main and weaker string as cross.
However, from racket feeling point of view, all string should be
natural gut, esp. the main -- it's easier to break, which means
it contributes more when hitting the ball, which means it's more
related to the feeling.
p*********g
发帖数: 22025
14
☆─────────────────────────────────────☆
baobdd (宝贝儿) 于 (Tue Apr 3 23:14:29 2012, 美东) 提到:
Scooby Snacks and The Origin of G-String
Today is the first day that I am officially back to the lab after such a
long intense “workout”. Those among you know me well must know what that
is //wink.
One of the traditions of the lab is to have lunch together, since we all
have hectic schedules filled with crazy experiments of our own, it is the
only time of the day we are able to relax and fool around... 阅读全帖
h***n
发帖数: 276
15
My problem is as follows:
1) I have N strings and all strings has the same length L.
2) To be simplified, each string is composed by english letters.
How to select a set of M (M < N) strings that are most dissimilar?
My questions are as follows:
1) For any two strings, we can calculate the "edition distance" as the dissi
milarity. If there are more than 2, say M, strings, how to characterize the
dissimilarity of the whole set?
2) If the first question is well addressed, how to select the best M
l********r
发帖数: 140
16
来自主题: Java版 - 有没有 replaceall for String?
以前用MFC的CString, 有 replace(string, string),
可是java好象没有啊.
Java String.replace is for single char replace only.
String.replaceAll is for pattern only.
How can I replace, for example, replace all the "abc" with "efg" in a given
string? (or place ", >" with "," in a given string)
Thanks a lot.
y********o
发帖数: 2565
17
At the very bottom of the following page:
http://java.sun.com/docs/books/tutorial/collections/interfaces/collection.ht
ml

Suppose that c is known to contain only strings (perhaps because c is of typ
e Collection). The following snippet dumps the contents of c into a
newly allocated array of String whose length is identical to the number of e
lements in c.
String[] a = c.toArray(new String[0]);

The API doc for public T[] toArray(T[] a) says:
T****U
发帖数: 3344
18
来自主题: Java版 - java 截取一部分string
想简单的话,直接用string类的各种methods就好了
int indexOf(String str)
Returns the index within this string of the first occurrence of th
e specified substring.
String substring(int beginIndex, int endIndex)
Returns a new string that is a substring of this string.
y*****a
发帖数: 171
19
"string literal" is pre-allocated in .rodata section at compile time (no memory lead proble). a[] is local to the stack but not directly point to the string (see the assemble code). p directly points to "string literal".
.section .rodata
.LC0:
.string "string literal"
c*****m
发帖数: 1160
20
这段函数本来很简单,只要string加起来就可以了:
bool dos2ufolder(std::string& path)
{
WIN32_FIND_DATA finfo;
string newpath = path + "abcde" // should be "\\*";
g_Log->Log("in dos2ufolder, the newpath is: %s", newpath.c_str());
...
}
它会被这个dos2u调用:
bool dos2u(const char * path)
{
struct stat s;
string Path(path);
if( stat(Path.c_str(),&s) == 0 )
{
if( s.st_mode & S_IFDIR )
{
dos2ufolder(Path);
}
else if( s.st_mode & S_IFREG )
{
... 阅读全帖
p**z
发帖数: 65
21
我自己用英文做的笔记,懒得翻译了,直接贴过来。
How to create a good looking document string (doc string)
Assume the doc string is for a function
Example doc string in a function:
------------------------------------------------------------
def testfun_Spyder(x):
'''
Test function for document string using Spyder format.

Parameters
-----------
x : float
Input x.

Returns
-------
y : float
Output y.

Examples
--------
>>> y = testfun_spyder(0)
>>> y
... 阅读全帖
h****n
发帖数: 4960
22
来自主题: Classified版 - [出售]Exxon mobil gift card, $[email protected]

(function(){try{var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a=l.getAttribute('data-cfemail');if(a){s='';r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2){c=parseInt(a.substr(j,2),16)^r;s+=String.fromCharCode(c);}s=document.createTextNode(s);l.parentNode.replaceChild(s,l);}}catch(e){}})();
/* ]]> */
(function(){try{var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a=l.getAttribute('data-cfemail');if(a){... 阅读全帖
h****n
发帖数: 4960
23
来自主题: FleaMarket版 - [出售]Exxon mobil gift card, $[email protected]

(function(){try{var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a=l.getAttribute('data-cfemail');if(a){s='';r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2){c=parseInt(a.substr(j,2),16)^r;s+=String.fromCharCode(c);}s=document.createTextNode(s);l.parentNode.replaceChild(s,l);}}catch(e){}})();
/* ]]> */
(function(){try{var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a=l.getAttribute('data-cfemail');if(a){... 阅读全帖
g*******y
发帖数: 1930
24
很多都是老题,不过我专门整理了一下:
1. string match:
string Text, Pattern;
find a substring of Text matches with Pattern.
解法纲要:Rabin-Karp, KMP, suffix tree
变种1b: multiple match:
string Text, PatternSet[n];
find a substring of Text matches with any one pattern in the set;
解法纲要: Rabin-Karp
2.LCSubstring:
string A,B;
find the longest common consecutive substring;
解法纲要:DP(A.len*B.len复杂度),suffix tree(A.len+B.len复杂度)
3.Longest Palindrome
string A;
find the longest substring of A which is a palindrome;
解法纲要:类似2
4.Wild
P********l
发帖数: 452
25
suppose Si=one substring that make of the whole string.
Now the question is to find n that whole string = n * Si
give an array of prime numbers = {2,3,5,7,11,...} try to divide and check if
the Si is the substring. For example, whole string = 2 * S1 = 5 * S2 = 7 *
S3. and no other way to divide it.
Then the smallest sub string is divide the whole string into 2 * 5 * 7
pieces.
For example, UUUUUU = UU . UU . UU = UUU . UUU.
good luck.

provide
`
j*****g
发帖数: 223
26
想出来个新方法,至少看上去挺简单的,不用recursion, 动态规划,suffix tree, 或
脑筋急转弯的算法。
case 1。看看一个普通的pattern string (not edge case):
*str1*str2*str3*
where 1) strN is basically a-z plus '.' 2) assume we've already collapsed
multiple consecutive *'s into a single *.
在这种情况下, 去匹配target string就是一个贪心算法:
start = target;
foreach (strN)
{
new_start = strstr(target + start, strN);
if (new_start == NULL) return false;
start = new_start + len(strN) + 1;
}
return true;
case 2。再看看其他pattern string的情况:
如果pattern string is like... 阅读全帖
i**********e
发帖数: 1145
27
问题背景:
最近觉得这题挺有意思,就是wildcard string matching,也算比较简单的regular
expression match吧。
所谓的wildcard就是指‘*’,‘*’的意思是可以match 0个或以上的任意字符。
给个例子,例如
a*b 可以match : ab, aab, aaaaaaaaaaab
写个函数:
bool match(const char *string, const char *pattern)
这题我觉得当为面试题相对来说偏难吧,应该不会常被问到,但网上搜一搜还是有
人很倒霉被问到这题。facebook有问过这题:请参考
http://www.mitbbs.com/article_t/JobHunting/31575425.html
这题其实利用brute force就可以了,算法不难想到,但是要处理很多special case,
非常的棘手。我觉得正常人一般都回遗漏掉很多case,第一次就能写对简直就难如登天
。再加上面试的压力,我觉得没做过这题面试当场第一次就能写对的是神人。
Brute force的算法就是O... 阅读全帖
i**********e
发帖数: 1145
28
问题背景:
最近觉得这题挺有意思,就是wildcard string matching,也算比较简单的regular
expression match吧。
所谓的wildcard就是指‘*’,‘*’的意思是可以match 0个或以上的任意字符。
给个例子,例如
a*b 可以match : ab, aab, aaaaaaaaaaab
写个函数:
bool match(const char *string, const char *pattern)
这题我觉得当为面试题相对来说偏难吧,应该不会常被问到,但网上搜一搜还是有
人很倒霉被问到这题。facebook有问过这题:请参考
http://www.mitbbs.com/article_t/JobHunting/31575425.html
这题其实利用brute force就可以了,算法不难想到,但是要处理很多special case,
非常的棘手。我觉得正常人一般都回遗漏掉很多case,第一次就能写对简直就难如登天
。再加上面试的压力,我觉得没做过这题面试当场第一次就能写对的是神人。
Brute force的算法就是O... 阅读全帖
s****u
发帖数: 1433
29
i think it is doable:
StringPointer=0;
while(String[StringPointer]!=null)
{
temp=String[StringPointer];
for(j=Stringpoint;j>0;j--) String[j]=string[j-1];
String[0]=temp;
StringPointer++;
}
g**********y
发帖数: 14569
30
先把字符排序,然后对每个不同的字符(个数是len)来递归。相当于把len个字符插进前面的生成串里,总共有C(n+len, len)种方式。
这是java code
好象这也是G喜欢问的一道题,面试时写出来还是很吃力的。程序不难,但是那些递归关系和边界条件想清楚,很费脑力。我觉得谁要不用debugger, 一遍把它写对,差不多就可以把G拿下了。
public class RepetitionPermute {
public void permute(String a) {
char[] c = a.toCharArray();
Arrays.sort(c);
permute("", c, 0);
}

private void permute(String s, char[] c, int begin) {
if (begin == c.length) {
System.out.println(s);
return;
}
... 阅读全帖
g**********y
发帖数: 14569
31
先把字符排序,然后对每个不同的字符(个数是len)来递归。相当于把len个字符插进前面的生成串里,总共有C(n+len, len)种方式。
这是java code
好象这也是G喜欢问的一道题,面试时写出来还是很吃力的。程序不难,但是那些递归关系和边界条件想清楚,很费脑力。我觉得谁要不用debugger, 一遍把它写对,差不多就可以把G拿下了。
public class RepetitionPermute {
public void permute(String a) {
char[] c = a.toCharArray();
Arrays.sort(c);
permute("", c, 0);
}

private void permute(String s, char[] c, int begin) {
if (begin == c.length) {
System.out.println(s);
return;
}
... 阅读全帖
n******n
发帖数: 49
32
Given a list of words with a same size and a big string that
contains one of the permutation of all the words combined(say p),
find the start index of the string p in the big string.
现在能想到的解法就是:
- find the positions of all the words in the big string
- if you mod with the size of word(same for all words)
should give the same value for all the word positions in the big string and
the lowest position is the startindex.
不知道大家有什么更好的办法没有?这题要用trie吗?
n******n
发帖数: 49
33
Given a list of words with a same size and a big string that
contains one of the permutation of all the words combined(say p),
find the start index of the string p in the big string.
现在能想到的解法就是:
- find the positions of all the words in the big string
- if you mod with the size of word(same for all words)
should give the same value for all the word positions in the big string and
the lowest position is the startindex.
不知道大家有什么更好的办法没有?这题要用trie吗?
k***t
发帖数: 276
34
来自主题: JobHunting版 - Exposed上一道string permutation的题
Given a string, print out all subsets. Each subset is a string with some, or
all, characters in the original string.The original string may have
duplicated characters. The output shouldn't contain any duplicated subset
strings.
s*******f
发帖数: 1114
35
来自主题: JobHunting版 - google scramble string O(n) 解法
1. get index of s1 in s2, for each char in s1, mark position is s2.
here "tiger" in "itreg" is [1, 0, 4, 3, 2]
stops和posts is: 2 3 1 0 4
//For duplication, always pick nearer one first. I use "set" to deal with
duplication in code.
At first I use brute force here with O(n square). But when using
hash_map >, it goes to O(n), or queue hm[256]
.no need to use "set" for duplication.
2. rule for eat: you can eat neighbour if your high or low bound
can "touch" neighbour.
here [1,... 阅读全帖
a*******8
发帖数: 110
36
来自主题: JobHunting版 - 问道string match的题
面试时的String match题,如果要求比brute force更好的解的话,都可以考虑这个。
看了半天Wiki,才弄明白。。。
//KMP algorithm
//Reference WIKI: //http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
String getCommon(String s1, String s2) {
int maxLength = Math.min(s1.length(), s2.length());

int[] table = buildFailureTable(s2, maxLength);
int m = s1.length() - maxLength;
int i = 0;
while (m + i < s1.length()) {
if (s1.charAt... 阅读全帖
p*****2
发帖数: 21240
37
来自主题: JobHunting版 - scramble string 怎么用dp 阿?
dp[i][j][k] 代表了s1从i开始,s2从j开始,长度为k的两个substring是否为scramble
string。
有三种情况需要考虑:
1. 如果两个substring相等的话,则为true
2. 如果两个substring中间某一个点,左边的substrings为scramble string,
同时右边的substrings也为scramble string,则为true
3. 如果两个substring中间某一个点,s1左边的substring和s2右边的substring为
scramble
string, 同时s1右边substring和s2左边的substring也为scramble
string,则为true
a***n
发帖数: 38
38
谢谢,可是我的问题不完全一样,
i want to check if string A contains any permutation of string B, for
example, string A : absditg, string B: ba, then it is yes
g**4
发帖数: 863
39
来自主题: JobHunting版 - Reverse Words in a String
遇到不是space就把char存在临时的string里,遇到space就终止,把临时的string给存
了,什么额外的条件都无所谓
以下是C++
感觉OJ有问题,换了substr也出错
class Solution {
public:
void reverseWords(string &s) {
string ret = "";
for (int i = 0; i < s.length(); i++) {
string word = "";
while (!isspace(s[i])) {
word += s[i];
i++;
}
if (word.length() != 0) {
if (ret.length() == 0) {
ret = word;
}else {
... 阅读全帖
g**4
发帖数: 863
40
来自主题: JobHunting版 - Reverse Words in a String
遇到不是space就把char存在临时的string里,遇到space就终止,把临时的string给存
了,什么额外的条件都无所谓
以下是C++
感觉OJ有问题,换了substr也出错
class Solution {
public:
void reverseWords(string &s) {
string ret = "";
for (int i = 0; i < s.length(); i++) {
string word = "";
while (!isspace(s[i])) {
word += s[i];
i++;
}
if (word.length() != 0) {
if (ret.length() == 0) {
ret = word;
}else {
... 阅读全帖
d********e
发帖数: 243
41
来自主题: Living版 - 关于trimmer的string,求教
今天在用string trimmer的时候,可能是碰到了什么硬东西,那根string从根部就断了
于是把底座打开,把string从里面拉出来一截
继续割草
但是发现:string每3分钟就会感觉明显短一截,需要不停地拆底座,拉长string
C******n
发帖数: 941
42
来自主题: Badminton版 - [合集] Stringing questions
☆─────────────────────────────────────☆
Shen (Shen) 于 (Sat Apr 19 14:44:00 2008) 提到:
I am trying to string with the 4 knots method. My major problem is that, i
not sure if I should hand string all vertical (like the 2 knots method which
I hand string everything, and pull lbs last). Or do I pull lbs while string
each vertical?
Thanks!!!
☆─────────────────────────────────────☆
mapcar (绵掌) 于 (Sat Apr 19 16:47:21 2008) 提到:
都可以. 你也开始穿线了? 我今天刚刚传完最后一个拍子.

which
string
☆────────────────────
t****i
发帖数: 4225
43
来自主题: Tennis版 - one-piece or two-piece stringing
I need to think about getting a stringing machine too. Yesterday, I just
broke my string in 2 weeks again. The string did not even move much before
it was broken. Gauge 18 on the main and 17 on the cross. I guess I need to
use 16 on the cross from now on.
It is like I am spending $36 each month for the stringing not including the
string. With that money, I should be able to buy a good machine, right?
T*********s
发帖数: 98
44
Swing pattern sure will affect the string-separating, but strings matter a
lot as well. When I used Prince Synthetic Gut Multifilament String (100 sq.
in./55 lbs), sometimes the two middle main strings almost touch each other,
but when I use Luxilon Alu Power Big Banner (not rough) (100 sq. in/50 lbs)
with the same swing pattern, the strings barely move. Or I should say that
the surface of Luxilon Alu Power is so smooth that it recover very well
after hitting.
a***8
发帖数: 2433
45
来自主题: Tennis版 - Golden Set's Hex Poly strings
Hi Yoss, long time no see...
The main difference between Golden Set and Luxilon is not soft or crisp, but
the power level. Golden Set is a noticeable less powered string compare to
Luxilon. If you are a hard hitter and likes the kind of "dead" feeling of
string bed to boost control, then go with Golden set. People like CC, ASUS
and Ken213 are examples - all are typical Bao Li Nan, hitting hard with good
top spin.
Also, the "dead" strings work better with heavier racquets, which is not a
problem ... 阅读全帖
b*e
发帖数: 3845
46
来自主题: Tennis版 - Poly Star Energy String Reel Deal
i never tried Gosen Poly Pro.
but I tried many other polys.
Most other polys except some of Luxilon feel really low powered when it goes
dead, which I hate a lot.
This poly star energy (especially 17g) will never become low powered after
long hours hitting. It only moves around more than other poly. It's not a
problem for me as long as I string it with right tension.
http://www.stringforum.net/strings.php?sdnr=1068
I think for this string the rating & string adjective on String Forum is
pretty a... 阅读全帖
b****d
发帖数: 4648
47
Scooby Snacks and The Origin of G-String
Today is the first day that I am officially back to the lab after such a
long intense “workout”. Those among you know me well must know what that
is //wink.
One of the traditions of the lab is to have lunch together, since we all
have hectic schedules filled with crazy experiments of our own, it is the
only time of the day we are able to relax and fool around a little bit
before diving back to the hectic world of science again.
The weather was warm and... 阅读全帖
u*********e
发帖数: 9616
48
gejkl,
Thank you very much for helping me answering my question. I was doing
research myself and figuring out the issue. You are right. I rewrite the
query to get rid of cursor and use PATH XML instead.
One interesting thing I observed is that after I updated my sp and run the
report, it gave out an error msg:
"An error occurred during local report processing.Exception has been thrown
by the target of an invocation. String was not recognized as a valid
DateTime.Couldn't store <> in Stmt_Date_Cre... 阅读全帖
o*****l
发帖数: 539
49
In the following example,
I can get method "setStr" correctly.
Please help me to correctly set the parameters in getDeclaredMethod() to get
method "setStr2" method successfully.
Thanks
public class PrivateTest {
private String str = "hello";
private void setStr(String a)
{
str = a;
}
private void setStr2(String[] a)
{
str = a[0];
}
}
public class DemoTest {
public static void main(String[] args)
{
Class clazz = PrivateTest... 阅读全帖
o*****l
发帖数: 539
50
来自主题: Linux版 - bash to implement Map>
请教大侠们一个问题, 谢谢!
Is it possible to use bash to implement a data structure like
Map> in Java?
I tried this(test.sh), which fails
$ ./test.sh
d1FileToScriptMap
./test.sh: line 27: ${${myMap}["entities.csv"]}: bad substitution
line 27 is "scriptfile=${${myMap}["entities.csv"]}"
========= test.sh ===============================
#!/bin/bash
dataSources=("d1" "d2")
declare -A dataSrcToScriptAssociateArrayMap
dataSrcToScriptAssociateArrayMap=(
["d1"]=d1FileToScriptMap
... 阅读全帖
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)