|
z****n 发帖数: 871 | 2 2011 Sunday Coupon Insert Schedule
Date: December 13th, 2010
2011 Sunday Coupon Insert Schedule (Smartsource Coupon Preview 2011, Redplum
Coupon Preview 2011, Proctor & Gamble Coupon Preview 2011, General Mills
Coupon Preview 2011)
January
2— (2) Smart Source (2) Red Plum and General Mill
9— Smart Source and Red Plum
16 — Smart Source, Red Plum and Proctor & Gamble
23 — Smart Source and Red Plum
30 — Smart Source and Red Plum
February
6 — Smart Source
13 — No Inserts scheduled (Valentine’s Day)
... 阅读全帖 |
|
s*******y 发帖数: 44 | 3 我一开始也是这个思路,顺序遍历,找到左右overlap的interval,然后删除、插入。
查找过程可以用binary search优化到logn。
vector insert(vector &intervals, Interval
newInterval) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int size = intervals.size();
if (size == 0) {
intervals.push_back(newInterval);
return intervals;
}
int i=0, pos;
while (i < size && intervals[i].end < newInterval.start) i++; //
lef... 阅读全帖 |
|
s*******y 发帖数: 44 | 4 我一开始也是这个思路,顺序遍历,找到左右overlap的interval,然后删除、插入。
查找过程可以用binary search优化到logn。
vector insert(vector &intervals, Interval
newInterval) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int size = intervals.size();
if (size == 0) {
intervals.push_back(newInterval);
return intervals;
}
int i=0, pos;
while (i < size && intervals[i].end < newInterval.start) i++; //
lef... 阅读全帖 |
|
y*****e 发帖数: 18 | 5 /*
Algorithm: Modified Binary search
[1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9].
1. BSearch to find the 'first' interval whose end >= newInterval.start.
If does not find, the new interval should be appended at the tail.
2. BSearch to find the 'last' interval whose start <= newInterval.end.
If does not find, the new interval should be inserted before the head.
3. Erase the found 'first' to 'last' intervals and insert the new merged
interval at index 'first'
*/
vector i... 阅读全帖 |
|
y*****e 发帖数: 18 | 6 /*
Algorithm: Modified Binary search
[1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9].
1. BSearch to find the 'first' interval whose end >= newInterval.start.
If does not find, the new interval should be appended at the tail.
2. BSearch to find the 'last' interval whose start <= newInterval.end.
If does not find, the new interval should be inserted before the head.
3. Erase the found 'first' to 'last' intervals and insert the new merged
interval at index 'first'
*/
vector i... 阅读全帖 |
|
l*****j 发帖数: 4788 | 7 定报纸的,注意啦
January
Jan 01: Red Plum (2), Smart Source (2), P&G
Jan 08: Red Plum, Smart Source
Jan 15: Smart Source
Jan 22: Red Plum, Smart Source
Jan 29: Red Plum, Smart Source
February
Feb 05: Red Plum, Smart Source, P&G
Feb 12: Red Plum, Smart Source (2)
Feb 19: Red Plum
Feb 26: Smart Source (2)
March
Mar 04: Red Plum, Smart Source, P&G
Mar 11: Red Plum, Smart Source
Mar 18: Red Plum, Smart Source
Mar 25: Red Plum, Smart Source
April
Apr 01: Red Plum (2), Smart Source (2), P&G
Apr 08: No Inserts... 阅读全帖 |
|
m*********n 发帖数: 11525 | 8 ☆─────────────────────────────────────☆
laomamj (老马虎) 于 (Thu Dec 29 21:15:20 2011, 美东) 提到:
定报纸的,注意啦
January
Jan 01: Red Plum (2), Smart Source (2), P&G
Jan 08: Red Plum, Smart Source
Jan 15: Smart Source
Jan 22: Red Plum, Smart Source
Jan 29: Red Plum, Smart Source
February
Feb 05: Red Plum, Smart Source, P&G
Feb 12: Red Plum, Smart Source (2)
Feb 19: Red Plum
Feb 26: Smart Source (2)
March
Mar 04: Red Plum, Smart Source, P&G
Mar 11: Red Plum, Smart Source
Mar 18: Red Plum, Smart Source
Mar... 阅读全帖 |
|
r******r 发帖数: 700 | 9 写的另一个 iterative 的,就没有问题。这个调试了很久,就是不 work. 每次只是插
入重复插入第一个值。这是把 insert 定义在 BST class 里面。下面另一个
recursive 的,把 insert 定义在 node 里面,也没问题。 贴出我的 node 定义。
谁再看看,上面那个的问题在哪里 (注意,那个 insert 定义在 BST class 里面)?
private static class BSTNode>{
private T value_;
BSTNode left;
BSTNode right;
public BSTNode(T value){
value_ = value;
left = null;
right = null;
}
public void insert(T... 阅读全帖 |
|
y****9 发帖数: 144 | 10 不太熟悉MS SQL 和 MySQL, 能不能给几个 test cases to show how they complete
the same tasks?
In Oracle if we do individual insert statements, seems it won't cause the
whole batch fail.
SQL> ho cat temp.sql
insert into t values(1);
insert into t values(1);
insert into t values(2);
commit;
SQL> @temp
1 row created.
insert into t values(1)
*
ERROR at line 1:
ORA-00001: unique constraint (Vxxxx.T_PK) violated
1 row created.
Commit complete.
SQL> select * from t;
ID
----------
1
2
"if ex... 阅读全帖 |
|
l**********1 发帖数: 5204 | 11 linker-based PCR
plus
iMapper soft:
//www.ncbi.nlm.nih.gov/pubmed/18974167
//geocachingsoftware.com/imapper.html
more details
please to to E-Book
Chapter 2:
its link:
FTP://ftp.sanger.ac.uk/pub4/theses/kong/chapter2.pdf
citation:
>Based on these expectations, a web-based server called iMapper (Insertional
Mutagenesis Mapping and Analysis Tool) was developed for the efficient
analysis of insertion site sequence reads against vertebrate and
invertebrate Ensembl genomes. Taking linker-based PCR se... 阅读全帖 |
|
P**********c 发帖数: 3417 | 12 insert过程中,保证两个heap一样大,或者max heap多一。max heap里的所有值小于min heap里的所有值。每次insert只需要比较要insert的数跟两个heap的root决定进哪个heap, 如果insert后两个heap大小不满足要求则把其中一个的root插到另一个。 insert复杂度O(lgn).
找median时,如果两个heap一样大,则median为两个root的平均。
如果max heap多一,则为max heap的root
找median操作为O(1). |
|
n****u 发帖数: 229 | 13 I am writing C# with SQL statement to update a record which has four text
fields (Introduction, What am I looking for, etc)
When a user, first time, inputs texts into these fields, Of course use
INSERT.
But when the user decides to modify one of these, use UPDATE or INSERT?
If I choose INSERT, I need to delete old record, INSERT a new one.
If I choose UPDATE, I could just UPDATE record, but I am afraid the text
field may take longer time to update.
I feel like INSERT is always faster than UPDATE |
|
c*******e 发帖数: 8624 | 14 ☆─────────────────────────────────────☆
myyaoyao (瑶瑶妈) 于 (Wed Mar 11 15:19:46 2009) 提到:
我用的是mysql,有一个table:
columnA, columnB
1,a
2,b
我要create一个batch insert,里面有可能已经有1,a 和2,b. 这种情况我不想再
insert进去了。我试着加了个unique key 在columnA+columnB,可是这样的话,一旦遇
到duplicate的数据,mysql就停止insert了。 请问怎样让mysql继续insert那些不
duplicate的数据?
☆─────────────────────────────────────☆
neil222966 (Wei) 于 (Wed Mar 11 18:52:23 2009) 提到:
没用过mysql,不知道以下几种方法是否对你有用。
Option1:
cursor
loop
If not exists (Select ... From ...)
Insert into |
|
s****y 发帖数: 66 | 15 最近開始用Oracle寫一些很基本的query。類似query之前在MS SQL Server和MySql上實
現都沒問題。換到Oracle最頭疼的一個問題就是居然沒有if exists也沒有insert
ignore之類的。一個簡單的insert都沒有辦法避免primary key violation。網上搜了
一下,都說是要在application code這邊catch exception。可是如果我做的是batch
insert,其中任何一個insert造成primary key violation都會讓整個batch失敗。
這麼簡單的一個事居然沒有一個簡單的辦法解決。覺得不可思議啊!
這裡的Oracle高手指點一下怎麼做insert不用擔心primary key violation吧。 |
|
C*******e 发帖数: 4348 | 16 +1
我做过无数克隆了
从200bp的到12kb的insert
最近还做比较crazy的vector加4个insert片段一起ligate
从来都是vector:insert是insert过量
不管Insert长短 |
|
|
z*********8 发帖数: 2070 | 18 Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the
intervals (merge if necessary).
You may assume that the intervals were initially sorted according to their
start times.
Example 1:
Given intervals [1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9].
Example 2:
Given [1,2],[3,5],[6,7],[8,10],[12,16], insert and merge [4,9] in as [1,2],[
3,10],[12,16].
This is because the new interval [4,9] overlaps with [3,5],[6,7],[8,10].
代码不好写啊, 谁给贴个? |
|
z*********8 发帖数: 2070 | 19 Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the
intervals (merge if necessary).
You may assume that the intervals were initially sorted according to their
start times.
Example 1:
Given intervals [1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9].
Example 2:
Given [1,2],[3,5],[6,7],[8,10],[12,16], insert and merge [4,9] in as [1,2],[
3,10],[12,16].
This is because the new interval [4,9] overlaps with [3,5],[6,7],[8,10].
代码不好写啊, 谁给贴个? |
|
m*******i 发帖数: 370 | 20 在美东,取暖用的是proane gas,有个500gallon的propane tank,很贵,去年冬天平
均一个月多一点就要加一次,每次平均要800-900,打算装个fireplace insert,有朋
友装的wood的,基本上不用怎么开空调了。如果是装gas fireplace insert是不是麻烦
很多?因为得走gas管道。另外gas fireplace insert烧gas,应该比直接开空调省吧?
了解的给点建议,多谢。 |
|
m******o 发帖数: 61 | 21 我用的是mysql,有一个table:
columnA, columnB
1,a
2,b
我要create一个batch insert,里面有可能已经有1,a 和2,b. 这种情况我不想再
insert进去了。我试着加了个unique key 在columnA+columnB,可是这样的话,一旦遇
到duplicate的数据,mysql就停止insert了。 请问怎样让mysql继续insert那些不
duplicate的数据? |
|
i****a 发帖数: 36252 | 22 that maybe a problem if you have concurrent inserts into the database
from different sources.
the auto ID will insert as the next biggest number in the column. so if
you manually set indentity_insert xxx off and adds a row of ID 1000,
next auto insert will be 1001. and when you process your manual row of
1001, you'll get the error.
one way to avoid this, that I can think of now is, reserver a gap for
yourself.
say your current ID is 1 - 1000, and you need to manually insert 500
records. reseed t |
|
l*****d 发帖数: 359 | 23 ok, by "destructive" is means you destroy the previous state, i.e., after
you insert the node, you only know the present state (after node insertion),
and you have no idea about the previous state (before node insertion). in
other words, you don't know which node you have inserted.
although I don't understand how does the python script preserve all previous
states since I don't know python. |
|
t****t 发帖数: 6806 | 24 yes, you can use inserter on list<>, since insertion on list doesn't
invalidate iterator. however, since list<> can be splice()'ed with constant
time, i think inserter on list<> is rarely needed.
for associative container, e.g.
set x;
copy(istream_iterator(cin), istream_iterator(), inserter(x, x.
begin());
it |
|
|
|
R******d 发帖数: 1436 | 27 我发现buy it now insertion fee在http://pages.ebay.com/help/sell/fees.html#optional上有两个不同的说明,请问怎么理解。
多谢了。
=====1=======
Insertion fee for fixed price format listings
Buy It Now price
Fixed price insertion fee
$0.99 or higher $0.50
=====2=======
Buy It Now price* Fee
$0.99 - $9.99 $0.05
$10.00 - $24.99 $0.10
$25.00 - $49.99 $0.20
$50.00 or more $0.25
Learn how Buy It Now works.
*Listings with the Buy It Now feature must have a Buy It Now price of at
least $0.99.
============ |
|
i**********e 发帖数: 1145 | 28 请看我之前发过的帖子:
http://www.mitbbs.com/article_t0/JobHunting/31881903.html
看下12楼我贴的图片,可以对 pointer to pointer 的理解更进一步。
这个方法很巧妙,在很多情况下可以用,例如:
1)linked list insertion,就如 lz 说的.
2)linked list merge/intersection
3)BST insert (iterative)
如果不用 pointer to pointer,那以上的程序一就是需要利用递归,二就是因为处理
个别状况而写起来很繁琐。
以下是一个使用的例子:
Node *head = NULL; // this will be the result stored in linked list
Node **p = &head; // pointer to pointer used to advance the result
......
// to insert new node to p.
*p = new Node(val);
p = &((... 阅读全帖 |
|
i**********e 发帖数: 1145 | 29 写了一个 O(n) 的 in-place insert。
如果有 overlap 多个区间就左移数组(因为所有overlap区间被merge成一个大区间)
,然后更改第一个overlap的区间。
如果没有overlap的话,那要注意是否在某个区间前面。如果是的话,就右移数组一位
,然后insert。
如果以上两种情况都不符合的话,就简单了。只剩下最后一个可能:
把区间push到最后边。
class Solution {
public:
vector intervals;
void insert(Interval newInterval) {
int n = intervals.size();
for (int i = 0; i < n; i++) {
if (newInterval.end < intervals[i].start) {
moveRight(i, 1);
intervals[i] = newInterval;
return;
} else {
... 阅读全帖 |
|
l*********8 发帖数: 4642 | 30 下面是我的程序
vector a 存储intervals [a[0] a[1]), [a[2] a[3]), [a[4] a[5]) ....
开始写在纸上,后来在电脑上调试才发现有几个bugs. 一遍写对不容易啊:-(
#include
#include
using namespace std;
void MergeToIntervals(vector & a, int left, int right)
{
int leftIdx = lower_bound(a.begin(), a.end(), left) - a.begin();
int rightIdx = upper_bound(a.begin(), a.end(), right) - a.begin();
int vectorSizeChange = 0;
int leftPos = -1; // left boundary's final position in the vector. -1 means it w... 阅读全帖 |
|
i**********e 发帖数: 1145 | 31 写了一个 O(n) 的 in-place insert。
如果有 overlap 多个区间就左移数组(因为所有overlap区间被merge成一个大区间)
,然后更改第一个overlap的区间。
如果没有overlap的话,那要注意是否在某个区间前面。如果是的话,就右移数组一位
,然后insert。
如果以上两种情况都不符合的话,就简单了。只剩下最后一个可能:
把区间push到最后边。
class Solution {
public:
vector intervals;
void insert(Interval newInterval) {
int n = intervals.size();
for (int i = 0; i < n; i++) {
if (newInterval.end < intervals[i].start) {
moveRight(i, 1);
intervals[i] = newInterval;
return;
} else {
... 阅读全帖 |
|
l*********8 发帖数: 4642 | 32 下面是我的程序
vector a 存储intervals [a[0] a[1]), [a[2] a[3]), [a[4] a[5]) ....
开始写在纸上,后来在电脑上调试才发现有几个bugs. 一遍写对不容易啊:-(
#include
#include
using namespace std;
void MergeToIntervals(vector & a, int left, int right)
{
int leftIdx = lower_bound(a.begin(), a.end(), left) - a.begin();
int rightIdx = upper_bound(a.begin(), a.end(), right) - a.begin();
int vectorSizeChange = 0;
int leftPos = -1; // left boundary's final position in the vector. -1 means it w... 阅读全帖 |
|
f*******n 发帖数: 12623 | 33 back_inserter requires a Back Insertion Sequence. I don't know what type "
tree_indexes" is, but if it is a set, set is not a Back Insertion Sequence. inserter just requires a Container. |
|
l*********8 发帖数: 4642 | 34 A 2-D bounding box can represented as (Xmin, Xmax, Ymin, Ymax). We have a
set of bounding boxes. There is no intersection between any two of the
bounding boxes.
Now we want to insert one bounding box into the bounding boxes set and merge
the intersected bounding boxes if necessary. Two intersected boxes can be
merged into a big box like this:
Xmin = min(Xmin1, Xmin2); Xmax = max(Xmax1, Xmax2);
Ymin = min(Ymin1, Ymin2); Ymax = max(Ymax1, Ymax2);
Design an algorithm to do t... 阅读全帖 |
|
B*****7 发帖数: 137 | 35 最近在学CLRS,觉得RB-INSERT-FIXUP有bug。拿出来和大家讨论一下。
The case 1 in the algorithm deals with case that the parent and the uncle of
the newly inserted node are both red nodes. Lines 4-8 repaint the parent
and the uncle into black and the grandparent into red, and then the current
node z moves up to the grandparent as in line 8. However, that shouldn't be
the end of the case. Instead, the routine should recursively call itself, i.
e., there should be statement after line 8 like this:
RB-INSERT-FIXUP(T, z)
An... 阅读全帖 |
|
r*********n 发帖数: 4553 | 36 O(logN) search implemented using STL set
void insert_interval(set>& intervals, const pair&
newint){
set last;
for(auto& r : intervals){
last.insert(r.second);
}
auto beg = last.lower_bound(newint.first);
auto end = intervals.lower_bound(make_pair(newint.second, 0));
if( (*end).first == newint.second ) ++end;
if( beg == end ){
intervals.insert(newint);
}else{
auto it = intervals.begin() + beg - last.begin();
... 阅读全帖 |
|
s********x 发帖数: 914 | 37 ls的binary search还是有可以improve的地方,因为在hit到某个interval时search就
可以停止了,效率更高。我贴一些我的代码吧。思路是跟ls一样的。谢谢ls的代码。
public ArrayList insert(ArrayList intervals,
Interval newInterval) {
int n = intervals.size();
if (n==0) {
intervals.add(newInterval);
return intervals;
}
int first = -1, last = -1; // first and last interval to be merged/
erased
int l = 0, r = n - 1;
// BSearch to find the 'first' interval whose end >= ne... 阅读全帖 |
|
s********x 发帖数: 914 | 38 ls的binary search还是有可以improve的地方,因为在hit到某个interval时search就
可以停止了,效率更高。我贴一些我的代码吧。思路是跟ls一样的。谢谢ls的代码。
public ArrayList insert(ArrayList intervals,
Interval newInterval) {
int n = intervals.size();
if (n==0) {
intervals.add(newInterval);
return intervals;
}
int first = -1, last = -1; // first and last interval to be merged/
erased
int l = 0, r = n - 1;
// BSearch to find the 'first' interval whose end >= ne... 阅读全帖 |
|
w*****m 发帖数: 20421 | 39 如果是老窗户木头框装饰性的很好看的,就只换INSERT
如果没啥古色古香,不好看的就全换掉。我装修了一个
老房子,因为木头框跟里面的FIREPLACE啥的木料一致
我只换了INSERT,INSERT的漆的颜色要尽量搭配好 |
|
g***g 发帖数: 200 | 40 I can't type Chinese now, but my experience may relief you a little bit. At
16 weeks, I was told that my placenta was lower and cord insertion position
wasn't the best, but not the worst either. My OB said that marginal
insertion would more likely to get twisted when baby moves, so the only
thing she can do is monitor baby's growth, which actually she didn't do
anything except the routine check up. Yourself just need to monitor your
baby's movement. I got another ultrasound at 30 weeks and every... 阅读全帖 |
|
|
j******u 发帖数: 41683 | 42 4-4 P&G coupon insert
Sunday coupon preview
Regional coupon inserts & value differences are to be expected!
(x) before coupon = multiple of same coupon
ETS = excludes trial sizes
P&G Coupon Insert
Duracell rechargeable cells, charger, pocket or powerhouse charger Save $2/1 (4/30)
Tide Save $1/1 (4/30)
Dawn Save $.50/1 (4/30)
size Cascade Save $.50/1 (4/30)
PUR OR PUR flavor options system Save $3/1 (4/30)
PUR pitcher or faucet mount multi-pack replacement filters or PUR refrigerator filter Save |
|
t**********s 发帖数: 1251 | 43 Date: September 22nd, 2010
9-26 P&G coupon insert
Sunday coupon preview
Regional coupon inserts & value differences are to be expected!
(x) before coupon = multiple of same coupon
ETS = excludes trial sizes
P&G Insert Coupons Expire (10/31)
Save $2/1 Crest Rinse 946mL or larger
Save $1/1 Crest 4.0oz.or more or Liquid Gel (Excludes: Crest Cavity, Baking
Soda, Tartar)
BOGO Oral-B CrossAction Manual Tooth Brush (up to Save $3.99)
Save $1/1 Crest or Crest Pro Health for Me Rinse 440mL or larger
Save |
|
a*****a 发帖数: 438 | 44 i just tried and it worked..
I created a table CompCEO with two columns, 'CompID'
(autonumber) and 'CEOName'(text).
then I inserted two records by:
INSERT INTO CompCEO VALUES (1, "amnesia")
INSERT INTO CompCEO (CEOName) VALUES ("amnesia")
SELECT * FROM CompCEO
everything works. |
|
h****r 发帖数: 2056 | 45 Use JDBC to insert record to Oracle 8i, only 40 inserts per
second, it
is too slow, does some one know how to improve the
performance of insert
and query?
I already use the connection pool and "not auto commit"
features.
Thanks a lot! |
|
b*e 发帖数: 3845 | 46 SQL Server insert speed is more than 10 times MySQL insert speed.
How to solve this problem. I have a real-time file to database sync
system so I can't use some block insert tools.
Is there anyway to turn of transaction for a table in SQL Server?
Thanks. |
|
s*****r 发帖数: 59 | 47 mysql_select_db(INQUIRY_DB);
$insert = "INSERT INTO profiles
set INQEmail=\"$lname\"";
$result = mysql_query($insert);
I use mysql in php code. but whenever I tried to add a new entry into the
table, I always failed. can somebody give me some suggestion why that happen?
this is a test. the table include a lot of columns, I tried to add a new entry
with only one column value. thanks very much! |
|
t*****z 发帖数: 812 | 48 我有一个mysql的table
CREATE TABLE test (
ka int not null auto_increment,
kb varchar(7) not null,
kc varchar(7) not null,
PRIMARY KEY ka,
UNIQUE KEY (kb,kc)
)
INSERT IGNORE INTO test VALUES (NULL,'aa','bb');
SELECT LAST_INSERT_ID(); ==> 1
INSERT IGNORE INTO test VALUES (NULL,'cc','dd');
SELECT LAST_INSERT_ID(); ==> 2
INSERT IGNORE INTO test VALUES (NULL,'aa','bb');
SELECT LAST_INSERT_ID(); ==> 0
因为第三个想插入的记录和第一个已插入的重复,所以实际上没有插入,请问如何知道第
三个插入的内容和第几个重复?
我知道可以重新查询如
if (LAST_INSERT_ID()==0)
|
|
e***e 发帖数: 168 | 49 Hi under sqlplus shell, if i want to frequently insert a long command while
tuning queries, is there any way I can press a few keys to insert the
command that is preprepared.
For example, I need to frequently insert:
sqlplus> alter session set events '10053 trace name context forever';
anyone knows some tips to avoid typing? |
|
y****w 发帖数: 3747 | 50 做个表,比如叫做bulk_request,上面放个trigger可以根据insert的内容bulk insert
。你只要给他们insert就行了。 善后的可以用pipe或某字段或另一个表通知他们干完
活儿了。怕滥用的话加些constraint。
have to
other
ways |
|