With two-page master pages
Who is affected:
I often create double pages that best suit our needs if they appear side by side. For these two pages, I would also use handy master of InDesign pages features. I create a master page to the right and the left, but when I anchor the two pages as a simple spread, elements of right master page appear on both pages. Is anyway to make sure the pages document reflects the master pages mirrored? If only I did these pages sometimes, I simply give up the master page feature and place the master page items in the pages of document themselves. I do, however, several pages a week, so I was hoping to implement a model of two-page spread with all repeated items stored on the master pages.
Kennith69
Suppose you start a new document, as well as 2 pages. They have defaults to 1 on first page of page numbering. If you select the first icon in the page; go to the upper right of the Pages panel menu button and click on "numbering and Section Options" you can change the first page to start numbering at 2. This will cause to become a left page, and the number is 2; and the second page will be a numbered right-hand page 3.
IOW, do not drag the pages for him anchor them.
Tags: InDesign
Similar Questions
-
OBS: Script InDesign CS3:
I have a document with two pages but a file name!
I need a script which
1 export the two pages in format PDF separated two - so NOT a single PDF file with two pages but two PDF files
2. the first PDF file must have the same name as the document - for example .indd13ESW110020216TC0-> ESW110020216TC013.pdf
3. the second PDF file will be added to the last number - so .indd14ESW110020216TC0-> ESW110020216TC014.pdf
Is it possible to integrate this script:
var doc = app.activeDocument; var _PDFfile = new File('\\\\testserver\\' + app.activeDocument.name.replace (/\.indd$/, '.pdf')); var _PDFExportPreset = app.pdfExportPresets.item('MyPdfSetting'); if (_PDFExportPreset == null){ alert('PDF Export Presets not found'); exit(); } app.pdfExportPreferences.pageRange = PageRange.ALL_PAGES; doc.exportFile(ExportFormat.pdfType, _PDFfile, false,_PDFExportPreset);
Hello
Try this...
-
Header issues with two pages of language of numbering.
I have created a book. Almost all of the text is set up in the tables. A column is in Norwegian, and a column is in English. The title, I need to have numbered as 1: 1, position 2 position: 1.1, section 3: 1.1.1 and so on. This works very well for a game. I made a set of paragraph styles Norwegian header and a paragraph English set header. However given that all the text is in the same text box English headers keep cash after the Norwegian. Is it possible to separate the sets in the textbox?
Any tips?
I think that when you are your paragraphs must have defined a list of numbering and named each separately
Norwegian numbering
and the other
English numbering
Then the title current declare two variables - one for English titles pick up the English text and the other for the Norwegian who won the Norwegian text.
I think the problem is that the numbering uses the same rather than separate list.
-
I would like to print double-sided with two pages per side in order to return to the page (as if it was required on the left side of paper). This means that orientation is the same on both sides of the paper.
power out put, is that the back of the page's side to the bottom. (as if I wanted to just staple the documents on the upper left)
Is this possible without going into PDF documents and manually turning every 3rd and 4th page?
(I have a Brother HL-2270DW with the lit duplex. I have the latest version of the driver. OSX 10.11.1)
You may need to change the printer to "Long Edge binding" setting to "short edge binding." My printer Brother (different) this setting is on under page setup in the print dialog box.
-
11g: problem with the page open in a new window
Hello
I have a simple application with two pages. Page 1 contains only one button:
<af:commandButton text="commandButton 1" useWindow="true" action="dialog:action"/> {code} Page 2 is empty. Action is defined in adfc-config.xml: {code:xml} <control-flow-case> <from-outcome>dialog:action</from-outcome> <to-activity-id>untitled2</to-activity-id> </control-flow-case> {code} When I click the button, page 2 opens in new window but page 1 stays kind of "locked". It takes two clicks on the button to get page 2 to show again (the first click sort of resets the page, and the second one works as it should). Same behavior reproduces in a very complex application (where, for instance, a table can be scrolled but selection is impossible). This worked in technology preview, did something change and some extra step is required or this is a bug? I can send someone a test case, if needed. Thanks, Pedja
Pedja,
I have confirmed that it is the glasspane.
When you open a dialog box in a new window like this, the main window is supposed to be blocked interaction until the dialog box is closed properly (this technique is sometimes called a "glasspane").
Just close the dialog window by closing the browser window does not mean "close" dialog box. You must use the AdfFacesContext API to close the window.
Add a command button on your page 2, bind it to an Action listener that does this:
AdfFacesContext.getCurrentInstance().returnFromDialog(null, null);
The behavior you see is correct; That is why the af: popup is probably a more "preferred" method to do so.
I just saw your answer on the PDF - you'll still need clear the sort dialog box so that it works. You can use a ' print' button instead of a button 'command' (thus eliminating the need to use the framework of the dialogue)? I could not find any method of compensation of the dialog without actually closing the window.
John
-
Problem of election after split-drain repeated with two nodes
Hello
I use a custom source based on BDB - 5.1.19 (excxx_repquote)
with two site-MASTER and SLAVE on the other...
NSite = 2
ACK = quorum
-the master is written at the rate of 10 txn quotedb per second
-l' test is to isolate the customer from the master (brain) and reconnect after a random time include 1 sec to 10 sec
the test run of about 10 times, but at some point, the slave to process receive DB_EVENT_REP_ELECTION_FAILED
and the captain enter the mode of election and never leave the CLIENT mode. I have to say that I decided to freeze the client to kill me (kill-9 my pid) when I get this event...
Here is the log in light on the master...
[1307872770:871621] [6510/47655809107168] MASTER: rep_send_function returned: 110
[1307872770:973655] [6510/47655809107168] MASTER: bulk_msg: Send copy due to PERM after buffer
[1307872770:973667] [6510/47655809107168] MASTER: send_bulk: send 266 bytes of the buffer in bulk (0x10a)
[1307872770:973672] [6510/47655809107168] MASTER: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 68 eid - 1, type bulk_log, LSN [21] [986648] perm
[1307872770:973693] [6510/47655809107168] MASTER: wait for the acknowledgement of receipt: need 1
[1307872771:26623] [6510/47655809107168] MASTER: rep_send_function returned: 110
[1307872771:126380] [6510/1162996032] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 70 eid 0, Journal type, LSN [21] [946345]
[1307872771:126407] [6510/1162996032] MASTER: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 68 eid - 1, type dupmaster, LSN [0] [0] nobuf
[1307872771:126695] [6510/1162996032] MASTER: rep_start: old version 17 journal found
[1307872771:126753] [6510/1162996032] CLIENT: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 68 eid - 1, type newclient, LSN [0] [0] nobuf
[1307872771:126833] [6510/1183975744] CUSTOMER: from the election thread
[1307872771:126876] [6510/1183975744] CLIENT: Start election Europe 2, ack 1, priority 100
[1307872771:126890] [6510/1183975744] CLIENT: Election thread has egen 69
[1307872771:127423] [6510/1173485888] CLIENT: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 70 eid 0, type newclient, LSN [0] [0]
[1307872771:130079] [6510/1183975744] CLIENT: count VOTE1 [0] (2147483647, 69)
[1307872771:130113] [6510/1183975744] CLIENT: count an election
[1307872771:130134] [6510/1183975744] CLIENT: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 68 eid - 1, type vote1, LSN [21] [986728] nobuf
[1307872771:130147] [6510/1173485888] CLIENT: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 68 eid - 1, type master_req, LSN [0] [0] nobuf
[1307872771:130438] [6510/1152506176] CLIENT: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 70 eid 0, type vote1, LSN [21] [946437]
[1307872771:130460] [6510/1162996032] CLIENT: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 70 eid 0, living type, LSN [21] [986728]
[1307872771:130467] [6510/1152506176] CLIENT: update of gen from 68 to 70
[1307872771:130482] [6510/1162996032] CLIENT: received egen ALIVE of 71, 69 mine
[1307872771:130503] [6510/1162996032] CLIENT: Election completed in 0.003602000 sec
[1307872771:130515] [6510/1162996032] CLIENT: Election; Egen 70
[1307872771:130534] [6510/1152506176] CLIENT: received vote1 egen egen 71, 71
[1307872771:130581] [6510/1152506176] CLIENT: count VOTE1 [0] (0, 71)
[1307872771:130593] [6510/1089075520] CUSTOMER: from the election thread
[1307872771:130619] [6510/1152506176] CLIENT: Vote Incoming: (eid) 0 (pri) 100 ELECTABLE (gen) 70 (egen) 71 [21,946437]
[1307872771:130642] [6510/1152506176] CLIENT: not in election, but receipts vote1 0x282c 0x8
[1307872771:130674] [6510/1089075520] CLIENT: Start election Europe 2, ack 1, priority 100
[1307872771:130692] [6510/1089075520] CLIENT: Election thread has 71 egen
[1307872771:130704] [6510/1194465600] CUSTOMER: from the election thread
[1307872771:130733] [6510/1194465600] CLIENT: Start election Europe 2, ack 1, priority 100
[1307872771:132922] [6510/1089075520] CLIENT: count VOTE1 [1] (2147483647, 71)
[1307872771:132949] [6510/1089075520] CLIENT: accept the new vote
[1307872771:132958] [6510/1089075520] CLIENT: count an election
[1307872771:132973] [6510/1089075520] CLIENT: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 70 eid - 1, type vote1, LSN [21] [986728] nobuf
[1307872771:132985] [6510/1194465600] CLIENT: fate of election thread
[1307872771:133012] [6510/1089075520] CLIENT: count VOTE2 [0] (2147483647, 71)
[1307872771:133037] [6510/1089075520] CLIENT: counted my vote 1
[1307872771:133048] [6510/1089075520] CLIENT: jump phase2 waiting: already had 1 vote
[1307872771:133060] [6510/1089075520] CLIENT: got enough votes to win. election of fact; Gen (prev) 70
[1307872771:133071] [6510/1089075520] CLIENT: Election completed in 0.002367000 sec
[1307872771:133084] [6510/1089075520] CLIENT: Election; Egen 72
[1307872771:133111] [6510/1089075520] CLIENT: flag of election ending in 0, e_th 1, egen 72, 0x2a2c, e_fl, 0x0, lo_fl 0 x 6
[1307872771:133170] [6510/1173485888] CLIENT: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 70 eid 0, living type, LSN [0] [0]
[1307872771:133187] [6510/1173485888] CLIENT: Racing replication msg lockout, ignore the message.
[1307872771:173744] [6510/1162996032] CLIENT: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 70 eid 0, type vote2, LSN [0] [0]
[1307872771:173769] [6510/1162996032] CLIENT: Racing replication msg lockout, ignore the message.
[1307872771:231593] [6510/1183975744] CLIENT: flag of election ending in 0, e_th 0, egen 72, 0x2a2c, e_fl, 0x0, lo_fl 0x1c
[1307872771:231629] [6510/1183975744] CLIENT: fate of election thread
[1307872777:443794] [6510/1131526464] CLIENT: connect to 2.0.0.210:12345 site with result 115 init
[1307872971:644194] [6510/1131526464] CLIENT: connect to 2.0.0.210:12345 site with result 115 init
[1307873165:844583] [6510/1131526464] CLIENT: connect to 2.0.0.210:12345 site with result 115 init
[1307873360:44955] [6510/1131526464] CLIENT: connect to 2.0.0.210:12345 site with result 115 init
[1307873554:245347] [6510/1131526464] CLIENT: connect to 2.0.0.210:12345 site with result 115 init
[1307873748:445736] [6510/1131526464] CLIENT: connect to 2.0.0.210:12345 site with result 115 init
[1307873942:646117] [6510/1131526464] CLIENT: connect to 2.0.0.210:12345 site with result 115 init
[1307874136:846509] [6510/1131526464] CLIENT: connect to 2.0.0.210:12345 site with result 115 init
... and stay infinite this situation
My question is why the master is suddenly transformed into CUSTOMER and why he never returns to the MASTER
Thanks in advance...
Here is the log for the customer
[1307872315:455113] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, Journal type, LSN [21] [984396]
[1307872315:455134] [1282/1160603968] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, Journal type, LSN [21] [984483] perm
[1307872315:609962] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type bulk_log, LSN [21] [984733] perm
[1307872315:764958] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type bulk_log, LSN [21] [984986] perm
[1307872315:919962] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type bulk_log, LSN [21] [985238] perm
[1307872316:75018] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type bulk_log, LSN [21] [985491] perm
[1307872316:229959] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type bulk_log, LSN [21] [985741] perm
[1307872316:384949] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type bulk_log, LSN [21] [985993] perm
[1307872316:499899] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type bulk_log, LSN [21] [986141] perm
[1307872316:539895] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, Journal type, LSN [21] [986221]
[1307872316:540078] [1282/1171093824] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, Journal type, LSN [21] [986307]
[1307872316:540100] [1282/1160603968] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, Journal type, LSN [21] [986394] perm
[1307872316:694950] [1282/1171093824] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type bulk_log, LSN [21] [986648] perm
[1307872316:847349] [1282/1129134400] MASTER: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 70 eid - 1, Journal type, LSN [21] [946345]
[1307872316:847698] [1282/1171093824] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, dupmaster, LSN type [0] [0]
[1307872316:847999] [1282/1181583680] MASTER: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type newclient, LSN [0] [0]
[1307872316:848168] [1282/1171093824] MASTER: rep_start: old version 17 journal found
[1307872316:848222] [1282/1181583680] CLIENT: Racing replication msg lockout, ignore the message.
[1307872316:848398] [1282/1171093824] CLIENT: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 70 eid - 1, type newclient, LSN [0] [0] nobuf
[1307872316:848504] [1282/1192073536] CUSTOMER: from the election thread
[1307872316:848542] [1282/1192073536] CLIENT: Start election Europe 2, ack 1, priority 100
[1307872316:848566] [1282/1192073536] CLIENT: Election thread has 71 egen
[1307872316:849634] [1282/1192073536] CLIENT: count VOTE1 [0] (2147483647, 71)
[1307872316:849654] [1282/1192073536] CLIENT: count an election
[1307872316:849680] [1282/1192073536] CLIENT: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 70 eid - 1, type vote1, LSN [21] [946437] nobuf
[1307872316:851403] [1282/1160603968] CLIENT: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, type vote1, LSN [21] [986728]
[1307872316:851448] [1282/1160603968] CLIENT: received vote1 egen egen 69, 71
[1307872316:851470] [1282/1160603968] CLIENT: received the old vote egen 69, 71, ignoring vote1
[1307872316:851481] [1282/1160603968] CLIENT: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 70 eid 0, living type, LSN [21] [986728] nobuf
[1307872316:851538] [1282/1171093824] CLIENT: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 68 eid 0, master_req, LSN type [0] [0]
[1307872316:851558] [1282/1171093824] CLIENT: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 70 eid 0, living type, LSN [0] [0] nobuf
[1307872316:854254] [1282/1160603968] CLIENT: / opt/bdb/rep_process_message: msgv = 5 logv 17 gen = 70 eid 0, type vote1, LSN [21] [986728]
[1307872316:854275] [1282/1160603968] CLIENT: received vote1 egen egen 71, 71
[1307872316:854317] [1282/1160603968] CLIENT: count VOTE1 [1] (0, 71)
[1307872316:854339] [1282/1160603968] CLIENT: Vote Incoming: (eid) 0 (pri) 100 ELECTABLE (gen) 70 (egen) 71 [21,986728]
[1307872316:854353] [1282/1160603968] CLIENT: Vote existing: (eid) 2147483647 (pri) 100 (gen) 70 (sites) 2 [21,946437]
[1307872316:854369] [1282/1160603968] CLIENT: accept the new vote
[1307872316:854379] [1282/1160603968] CLIENT: Election of phase 1 done
[1307872316:854395] [1282/1160603968] CLIENT: vote for 0
[1307872316:854407] [1282/1160603968] CLIENT: / opt/bdb/rep_send_message: msgv = 5 logv 17 gen = 70 eid 0, type vote2, LSN [0] [0] nobuf
[1307872317:960344] [1282/1192073536] CLIENT: after the phase 2: votes 0, nvotes 1, Europe 2
[1307872317:960389] [1282/1192073536] CLIENT: Election completed in 1.111809000 sec
[1307872317:960401] [1282/1192073536] CLIENT: Election; Egen 72
[1307872317:960412] [1282/1192073536] CLIENT: flag of completed election with-30974, e_th 0, egen 72, 0x282c, e_fl, 0x0, lo_fl 0x0
Kill me!
-my source
on the master, I executed manually:
txn_rate 1
loop_rate 10
loop 1 20000
------
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2001-2010 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
/*
* In this application, specify us all communications via the command line. In
* a real application, one would expect that the information on other sites
* in the system would be maintained in a sort of configuration file. The
* most of this interface, it is that we assume at the start that we can
* knowledge
(* 1) what is our environment home Berkeley DB,.
(* 2) which host/port we want to hear about the connections. and
(* 3) an optional list of other sites, we should try to connect to.
*
* These items of information are expressed by the following indicators.
* h House (required; h means home directory)
*-l host: port (required; l means local)
* - C or - M (optional; will start as customer or master)
* r - host: port (optional; r mean distance; no matter how many of them may be)
* specified)
* R - host: port (optional; R stands for the remote peer; only one of them can
* to be specified)
* - an all the | quorum (optional; a is synonymous with the ACK policy)
* b (optional; b means in bulk)
* Europe - n (optional, number of sites in the replication group; default is 0)
* to try to dynamically calculate Europe)
* priority Pei (optional; default is 100)
* - v (optional; v means verbose)
*/
#include < cstdlib >
#include < a > cstring
#include < iostream >
#include < String >
#include < sstream >
#include < sys/types.h >
#include < signal.h >
#include < db_cxx.h >
#include "RepConfigInfo.h".
#include "dbc_auto.h".
using std::cout;
using std::cin;
using std::cerr;
using std::endl;
using std::ends;
using std::flush;
using std::istream;
using std::istringstream;
using std::ostringstream;
using std::string;
using std::getline;
#include < stdio.h >
#include < readline/readline.h >
#include < readline/history.h >
#define CACHESIZE (10 * 1024 * 1024)
#define of DATABASE 'quote.db '.
#define «quote2.db» base2
const char * progname = "excxx_repquote";
#include < errno.h >
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include < windows.h >
#define _snprintf snprintf
#define sleep (s) sleep (1000 * (s))
extern "C" {}
extern int getopt (int, char * const *, const char *);
extern char * optarg;
}
typedef HANDLE thread_t;
typedef DWORD thread_exit_status_t;
#define thread_create (thrp, attr, func, arg).
(((* (thrp) = CreateThread (NULL, 0,-))))
(LPTHREAD_START_ROUTINE) ((((func), (arg), 0, NULL)) == NULL)? (1: 0)
#define thread_join (thr, statusp).
((WaitForSingleObject ((THR), Infinite) == WAIT_OBJECT_0) & & \)
GetExitCodeThread ((thr), (LPDWORD) (statusp))? 0: - 1).
#else / *! _WIN32 * /.
#include < pthread.h >
typedef pthread_t thread_t;
typedef void * thread_exit_status_t;
#define thread_create (thrp, attr, func, arg).
pthread_create ((thrp), (attr), (func), (arg))
#define (thr, statusp) thread_join pthread_join ((thr), (statusp))
#endif
Struct used to store information in the field of app_private Db.
typedef struct {}
bool app_finished;
bool in_client_sync;
bool is_master;
bool no_dummy_wr;
} APP_DATA.
public static void log(const char *);
void checkpoint_thread (Sub );
void log_archive_thread (Sub );
void dummy_write_thread (Sub );
Class RepQuoteExample {}
public:
RepQuoteExample();
void init (RepConfigInfo * config);
void doloop();
terminate() int;
public static void event_callback (DbEnv * dbenv, u_int32_t, void * info);
void print_stocks_size(Db *dbp);
private:
disable the copy constructor.
RepQuoteExample(const RepQuoteExample &);
void operator = (const RepQuoteExample &);
internal data members.
APP_DATA app_data.
RepConfigInfo * app_config;
DbEnv cur_env;
thread_t ckp_thr;
thread_t lga_thr;
thread_t dmy_thr;
private methods.
void print_stocks(Db *dbp);
void print_env(DbEnv *dbenv);
prompt() Sub;
};
RepQuoteExample * g_runner = NULL;
RepConfigInfo * g_config = NULL;
Class DbHolder {}
public:
DbHolder ( env, const char _dbname DbEnv): env (env)
{
DBP = 0;
If (_dbname) dbname = _dbname;
else dbname = database;
}
{~ DbHolder()}
try {}
Close();
} catch (...) {
Ignore: this may mean that another exception is waiting
}
}
bool ensure_open (bool creation) {}
If (dbp)
return (true);
DBP = new Db (env, 0);
u_int32_t flags = DB_AUTO_COMMIT;
If (creation)
flags | = DB_CREATE;
try {}
DBP-> open (NULL, NULL, DB_BTREE, DATABASE, flags, 0);
DBP-> open (NULL, dbname, NULL, DB_BTREE, flags, 0);
DBP-> open (NULL, NULL, dbname, DB_BTREE, flags, 0);
return (true);
} catch (DbDeadlockException e) {}
} catch (DbRepHandleDeadException e) {}
} catch (DbException e) {}
If (e.get_errno () == DB_REP_LOCKOUT) {}
Just fall through.
} ElseIf (e.get_errno () == ENOENT & &! creation) {}
Provide a little extra explanation.
//
Log ("Stock DB is not still exist");
} else
throw;
}
(All renewable errors pass here).
//
Log ("Please try again");
Close();
Return (false) End Function
}
{} void close()
If {(dbp)
try {}
DBP-> close (0);
Remove dbp;
DBP = 0;
} catch (...) {
Remove dbp;
DBP = 0;
throw;
}
}
}
operator Db * () {}
return of dbp;
}
DB * operator-> () {}
return of dbp;
}
private:
DB * dbp;
DbEnv * env;
const char * dbname;
};
Class StringDbt: public {Dbt
public:
#define GET_STRING_OK 0
#define GET_STRING_INVALID_PARAM 1
#define GET_STRING_SMALL_BUFFER 2
#define GET_STRING_EMPTY_DATA 3
int get_string (char * buf, size_t buf_len)
{
size_t copy_len;
int ret = GET_STRING_OK;
If (buf == NULL) {}
ECRR < < "Invalid entry to get_string stamp" < < endl;
Return GET_STRING_INVALID_PARAM;
}
Make sure that the string is null terminated.
Memset (* buf, 0, buf_len);
If there is no string, simply return.
If (get_data() == NULL | get_size() == 0)
Return GET_STRING_OK;
If (get_size() > = buf_len) {}
RET = GET_STRING_SMALL_BUFFER;
copy_len = buf_len - 1; save room for a terminator.
} else
copy_len = get_size();
memcpy (* buf, get_data(), copy_len);
return ret;
}
size_t get_string_length()
{
If (get_size() == 0)
return 0;
Return strlen ((char *) get_data());
}
Sub set_string(char *string)
{
SET_DATA (String);
set_Size ((u_int32_t) strlen (String));
}
StringDbt(char *string):
DBT (string, (u_int32_t) strlen (string)) {};
StringDbt(): Dbt() {};
~ StringDbt() {};
Do not add additional data to this subcategory because we want to keep it
compatible with objects Dbt created in-house by Berkeley DB.
};
DB * g_repquote = NULL;
RepQuoteExample::RepQuoteExample(): app_config (0), cur_env (0) {}
App_Data.app_finished = 0;
App_Data.in_client_sync = 0;
App_Data.is_master = 0; Suppose I have as a customer initially
App_Data.no_dummy_wr = 0; prevent to run dummy writing
}
/*
int (* old_rep_process_message)
__P ((DB_ENV *, DBT *, DBT *, int, DB_LSN *));
int my_rep_process_message __P ((DB_ENV DBT, arg1 , arg2, arg3, arg4 int, DB_LSN $arg5 DBT))
{
printf ("EZ-> > > my_rep_process_message:%p\n",arg5 ");
old_rep_process_message (Arg1, Arg2, Arg3, Arg4, $arg5);
}
*/
void RepQuoteExample::init(RepConfigInfo *config) {}
app_config = config;
cur_env.set_app_private (& App_Data);
cur_env.set_errfile (stderr);
App_Data.no_dummy_wr = config-> no_dummy_wr;
If (app_data.no_dummy_wr)
printf ("no dummy! \n");
EZ-> cur_env.set_errpfx (progname);
cur_env.set_event_notify (event_callback);
Configure the transfer block to send groups of documents to customers
When a single network transfers. This is useful for sites of masters
and customers participating in the synchronization from client to client.
//
If (app_config-> in bulk)
cur_env.rep_set_config (DB_REP_CONF_BULK, 1);
Set the total number of sites in the replication group.
It is used by the treatment of election internal repmgr.
//
If (app_config-> totalsites > 0)
cur_env.rep_set_nsites (app_config-> totalsites);
Turn on the output of debugging and application information.
If (app_config-> verbose)
cur_env.set_verbose (DB_VERB_REPLICATION, 1);
cur_env.set_verbose (DB_VERB_REPMGR_MISC, 1);
cur_env.set_verbose (DB_VERB_RECOVERY, 1);
cur_env.set_verbose (DB_VERB_REPLICATION, 1);
cur_env.set_verbose (DB_VERB_REP_ELECT, 1);
cur_env.set_verbose (DB_VERB_REP_LEASE, 1);
cur_env.set_verbose (DB_VERB_REP_SYNC, 1);
cur_env.set_verbose (DB_VERB_REPMGR_MISC, 1);
Set the priority of replication for this environment group election.
An election first selects the site with the most recent log
documents such as the new master. If several sites are the most
recent log records, the site with the highest priority value
is selected as the master.
//
cur_env.rep_set_priority (app_config-> priority);
Set the policy that determines how master and client sites
treat the acknowledgment of replication messages required for
permanent record. The default policy of "quorum" requires only
a quorum of the likely to be elected peers sufficient to ensure a permanent
record remains durable if the election is held. The option 'all '.
requires that all clients to recognize a permanent replication
message instead.
//
cur_env.repmgr_set_ack_policy (app_config-> ack_policy);
Set the threshold for the minimum and maximum of the client time
wait before asking the retransmission of a missing message.
These core values on the characteristics of performance and load
host master and client as well as the tower platforms
message trigger time.
//
cur_env.rep_set_request (20000, 500000);
Configure the detection of blockages to ensure that blockages of locks?
are broken by the presence of one of the queries of locks in conflict
has rejected. DB_LOCK_DEFAULT uses the specified lock strategy
at the time of the creation environment or DB_LOCK_RANDOM if none has been
specified.
//
cur_env.set_lk_detect (DB_LOCK_DEFAULT);
The following features of the basic replication can also be useful to your
request. See Berkeley DB documentation for more details.
-Master leases: strict consistency for data reads
on a main site.
-Delivery time: Customize the amount of time that waiting for Berkeley DB
for such things as the election must be concluded or a master
lease to be granted.
-Client synchronization delay: managing the main site
resources by spreading intensive customer resources
synchronizations.
-Blocked customer operations: return immediately with an error
rather than wait indefinitely if a customer is operation
blocked by a current client synchronization.
cur_env.repmgr_set_local_site (app_config-> this_host.host,
app_config-> this_host.port, 0);
for (REP_HOST_INFO * cur = app_config-> other_hosts; cur! = NULL;)
Cur = cur-> next) {}
cur_env.repmgr_add_remote_site (cur-> host, cur-> port,
NULL, cur-> peers? DB_REPMGR_PEER: 0);
}
Configure heartbeat timeouts so that repmgr monitors the
health of the TCP connection. Master sites disseminate a heartbeat
at the frequency specified by the timeout DB_REP_HEARTBEAT_SEND.
Customer sites waiting for activity of the messages of the length of the
DB_REP_HEARTBEAT_MONITOR timeout before concluding that the
connection to the master is lost. The DB_REP_HEARTBEAT_MONITOR
timeout must be longer than the time-out DB_REP_HEARTBEAT_SEND.
//
cur_env.rep_set_timeout (DB_REP_HEARTBEAT_SEND, 5000000);
cur_env.rep_set_timeout (DB_REP_HEARTBEAT_MONITOR, 10000000);
The following features of repmgr can also be useful to your
request. See Berkeley DB documentation for more details.
-Regulates two sites of strict majority - in a two-site replication
the group, to ask the two sites are available to elect a new
master.
-Timeout - customize the amount of time repmgr awaits
for things as pending or try thanks
to reconnect to other sites.
-The site list - returns a list of currently known sites at repmgr.
Now we can open our environment, although we are not ready to
start replication. However, we want to have a dbenv autour
so that we can send it in one of our message handlers.
//
cur_env.set_CacheSize (0, CACHESIZE, 0);
cur_env.set_flags (DB_REP_PERMANENT, 1);
cur_env.set_flags (DB_TXN_WRITE_NOSYNC, 1);
/ * u_int32_t maxlocks = 300000;
If (maxlocks! = 0)
cur_env.set_lk_max_locks (MAXLOCKS);
u_int32_t maxlocks_o = 300000;
If (maxlocks_o! = 0)
cur_env.set_lk_max_objects (maxlocks_o);
u_int32_t maxmutex = 300000;
If (maxmutex! = 0)
cur_env.mutex_set_max (maxmutex);
*/
DbEnv * m_env = & cur_env;
m_env-> set_flags (DB_TXN_NOSYNC, 1);
m_env-> set_lk_max_lockers (60000);
m_env-> set_lk_max_objects (60000);
m_env-> set_lk_max_locks (60000);
m_env-> set_tx_max (60000);
m_env-> repmgr_set_ack_policy (DB_REPMGR_ACKS_NONE);
m_env-> rep_set_timeout (DB_REP_ACK_TIMEOUT, 50 * 1000); 50ms
m_env-> rep_set_timeout (DB_REP_CHECKPOINT_DELAY, 0);
m_env-> rep_set_timeout (DB_REP_CONNECTION_RETRY, 30 * 1000 * 1000); 30 seconds
m_env-> rep_set_timeout (DB_REP_ELECTION_TIMEOUT, 1 * 1000 * 1000); 5 seconds
m_env-> rep_set_timeout (DB_REP_FULL_ELECTION_TIMEOUT, 5 * 1000 * 1000); 5 seconds
m_env-> rep_set_timeout (DB_REP_CONNECTION_RETRY, 5 * 1000 * 1000);
m_env-> rep_set_timeout (DB_REP_ELECTION_RETRY, 10 * 1000 * 1000); 10 seconds
m_env-> rep_set_timeout (DB_REP_HEARTBEAT_MONITOR, 80 * 1000 * 1000); 80 seconds
m_env-> rep_set_timeout (DB_REP_HEARTBEAT_SEND, 500 * 1000); 500 milliseconds
The minimum number of microseconds that a client will wait before requesting a retransmission
u_int32_t rep_req_min = 40000; 40 000 microsec = 40 mili
The maximum number of milliseconds that a client will wait before requesting a retransmission
u_int32_t rep_req_max = 1280000. / / 1 280 000 microsec = 1.28 sec
u_int32_t rep_limit_gbytes = 0;
u_int32_t rep_limit_bytes = 100 * 1024 * 1024; 100 MB
m_env-> rep_set_request (rep_req_min, rep_req_max);
m_env-> rep_set_limit (rep_limit_gbytes, rep_limit_bytes);
cur_env. Open (app_config-> homepage, DB_CREATE |) DB_RECOVER |
DB_THREAD | DB_INIT_REP | DB_INIT_LOCK | DB_INIT_LOG |
DB_INIT_MPOOL | DB_INIT_TXN, 0);
keep the old string function
old_rep_process_message = cur_env.get_DB_ENV ()-> rep_process_message;
deviant
cur_env.get_DB_ENV ()-> rep_process_message = my_rep_process_message;
/ * int _i;
cur_env.log_get_config (DB_LOG_DIRECT & _i); printf ("DB_LOG_DIRECT = %d\n",_i);
cur_env.log_get_config (DB_LOG_DSYNC & _i); printf ("DB_LOG_DSYNC = %d\n",_i);
cur_env.log_get_config (DB_LOG_AUTO_REMOVE & _i); printf ("DB_LOG_AUTO_REMOVE = %d\n",_i);
cur_env.log_get_config (DB_LOG_IN_MEMORY & _i); printf ("DB_LOG_IN_MEMORY = %d\n",_i);
cur_env.log_get_config (DB_LOG_ZERO & _i); printf ("DB_LOG_ZERO = %d\n",_i);
*/
Start checkpoint and newspaper archive support threads.
(void) thread_create (& ckp_thr, NULL, checkpoint_thread, & cur_env);
(void) thread_create (& lga_thr, NULL, log_archive_thread, & cur_env);
(void) thread_create (& dmy_thr, NULL, dummy_write_thread, & cur_env);
cur_env.repmgr_start (3, app_config-> start_policy);
}The detailed output shows that the site has won the election and the
RepMgr code calls rep_start to become the master, but he is stuck
waiting for a txn or a cursor to be resolved before this change of State
may occur. I have not studied your application code. But if you have a
cursor or txn, underway at the time, then you must resolve before
the site may change the State.If you can reproduce this, it would be useful to see the stack traces
the threads. That could confirm or deny that, in my view, I see.Sue LoVerso
Oracle -
Import multiple Word documents of several pages with the same master page?
Hi, I should start by saying that I have no experience with script. However, I wonder if there is a simple script for the following problem:
I created a master page with three linked text boxes. Right now, I use Cmd + D to select a file in word, and then Shift + click in the first box to place the text on the page. But I have 125 pages that are exactly the same, just different layout Word files to import. I could repeat this process 125 times, but I wonder if there is a way to tell InDesign to create 125 pages using the Master Page X and a for each import file?
I use InDesign CS5 v 7.0.4 on Mac OS x Snow Leopard 10.6.7 v
I thank in advance for any help you can offer,
NW
I'm sorry. The problem is that InDesign treats the two pages of the spread of master together, I guess you have to make a few hoop jump. Try this, then:
var d=app.activeDocument, p=d.pages, i, frames, masterPage, page; for (i=0; i
We have to check the whether the page is a left-hand page, and if it is, use the first page (0) of the master spread, otherwiseuse the right page.
-
With two or three open pages, I have scroll bars that allow me to see the right side of the other pages, but not on the page of Firefox.
If you have a three-button mouse, click on the middle button
and the mouse becomes a scroll controller. -
I am trying to create a PDF from a Word 2007 document with the layout, the 'Landscape' Orientation and Pages, 'two pages per sheet. The document was created in Word 2003. The entire document is four "pages" long, but each of these "pages" is half of an 8 1/2 x 11. So it's really a pages document two and prints on only two sheets of letter size paper.
Acrobat does not seem to 'see' this document is set up to have two pages per sheet, is it really just a two-page document. He created a four-page pdf file.
It arrived not with Word 2003. The pdf file created from this version is an exact copy of the document word - two pages.
Any ideas?
Word:
http://answers.Microsoft.com/en-us/Office/default.aspx
Office at the above link forums
http://answers.Microsoft.com/en-us/Office/ee861096.aspx
Word Help Forums at the link above.
They will help you with your question Word when repost you in the Office Forums above.
See you soon.
Mick Murphy - Microsoft partner
-
I want to put two tables on a page with two columns how can I do this?
I want to put two tables on a page with two columns how can I do this?
It depends on what application you are using.
If you use Word, then a good way would be to create a single table of 5 columns, check the borders of the invisible middle column so that it appears to be two separate tables. You will need to do the same thing for unused cells downstairs as well.
To get the best advice on Office-Word questions, use the forum not the Windows 7 Office forum that you do. Look at the top of this page, just below the logo MS Answers and click on Forums , then select desktop. Once there, you can select Word. By using the forum Office will give you a better chance to find a solution to your problem, as it is inhabited by people who know much about their topic. Search the Forum of office for the topic, then, if no notice is found, ask your question here instead of this.
-
How we prevent scrollbars on spreads with an Image on the two Pages?
Has anyone noticed that a spread with a large image (or graphic) stretching across two pages creates a vertical scrolling between two pages, whenever the iBook Viewer window size is adjusted? No idea how to prevent this? I guess I have to divide my images into two halves?
In the EPUB export dialog box, select: "convert across landscape Page.
-
Can I convert a ppt file to PDF with PDF Pack with two blades to the page?
I want to convert a ppt file to pdf format with two blades on the page, rather than a slide page. I can do this with a printer. How do I do this with pdf pack?
Hi sandyd,.
When you convert PowerPoint to PDF via Adobe PDF Pack, it will convert each slide in the deck to a page in the PDF file. Unfortunately, there is no way to change this.
Best,
Sara
-
Simple? View two pages side by side with gap
Set up your document in spreads. Insert a page between two pages. change the size of this page for the 1/2 inch wide. You may need to change the settings of magins to 0 for this page first.
Just tested in CS5 on a Mac and it works.
On the bottom of the Pages palette there are three icons, a bin for deleting pages to create a new page, and a third icon used to change a selected page size.
-
Shadow of a master appear on a page with a different master CS5
I have a series of books that make use of two styles of different page controlled by two masters. On occasion in the books, the two masters appear side by side in a spread. The two captains contain similar background graphics, but we have more margin than the other side. In which case the side margin appears on the left-hand page, the shadow of a substantive element on the full page master appears on the page of larger margin. The actual object that is the shadow isn't here, but the shadow is. This only happens when the margin is left; the shadow does not appear when the masters are side by side in a spread and the wide margin is on the right. See picture attached.
Pages I can split the shadow disappears, but it gets to be a pain when the text is redéroule and I change pages autour. No idea how I can keep this ghost effect to appear here, where it is not supposed to be?
I'm on CS5 on an Intel Mac under Leopard.
Thank you.
I should add that I am almost certain that they are in order to get a unique shadow rather than a shadow on each half, which straddles one form or the other.
I don't know there is a solution for this other than make a second based on the first two pages master adjust only this margin and apply it on the two pages in the spread when necessary (or split the spread as you do now).
-
A gap of two pages with extra half a page that will be folded up?
Hello:
I'm working on a children's book which is mainly composed of photographic images with some very simple texts on top. The size of each page is 23 x 23 cm with 0.7 purge cm on all borders. This means a normal spread of two pages will be 47.4 cm x 24.4 cm.
Now the problem I'm facing is the following:
There are two series that should have an extra 11.5 cm 'page' (included in the spread) which is printed in such a way so that the child will be able to fold and unfold. (A spread is on the back of the other, so the line of division of the folding area should coincide exactly on both spreads, the left side of a spread, one to the right of the back of the spread). These two series will be done on both 23 x 23 cm pages, more THAN the 11.5 cm extra page (the area that will be folded or unfolded) + bleeding. My question is: How do you create such a spread in ID? Unlike all other pasta spread, when there is only one line in the middle between the two 23 x 23 cm pages, in other words, I need to create a gap with two lines of division: a conflict between two 23 cm pages and another which marks the end of one of the pages two 23 cm and the beginning of the additional 11.5 cm page. So, in total, seen in a landscape view, we would have a spread which is:
0.7 cm purge + 23 cm [division line] page 23 cm [line] 11,5 cm folding a page + 0,7 cm bottom
and her back spread it is:
serving 0.7 + 11.5 cm foldable [line] 23 cm [division line] page 23 cm one page + 0.7 purge cm cm
All this because I need the printer to ensure the propagation fold line perfectly coincides with the reverse propagation fold line.
I hope that my explanation is not source of confused.
Thanks a lot for your help!
Daniel
When a guide that you want to display in the background area lost and the editing of like drawing table (win) key ctrl or cmd (mac) while dragging the rule guide.
Bob
Maybe you are looking for
-
Change the settings of the BIOS on the Machines in bulk
I need to change the settings of the Legacy BIOS in the UEFI on machines in bulk instead of this manual, model lenovo is the E93Z, is there any kind of tool can do this in bulk or any mechanism Please update me
-
How can I prevent Windows 7 install the same 2 updates every time I log out
Whenever I have shut down the computer a pop filter tells me that microsoft windows 7 is 2 installation updates and to not close or unplug the computer. This procedure takes about 3 minutes before I get the ok to stop, why what is happening and what
-
I have Vista Home and auto backup and I put in a new DVD-R, even if space is available on the existing DVD.
-
scan mf1522nf to show Mac mountain lion
Hello! I just got a Mac and it works on OS Mountain Lion. My MF1522nf shows any ideas on how I can get it to appear in my printer/scanner options, printer and fax but not the scanner? Can I use HP Director if I absolutely have to but he's so picky an
-
In Windows Live Mail if you open an attachment, then hit 'save' where will the file?
I have Windows 7, I use windows live mail. Sometimes I get the attachments, Word, Excel, ect. If I opened the mail document and press 'Save' I can't find out where it records. It does not save in any file temp that I see. Help, please.