I'm writing a .Net script that initiates a local move request on Exchange2010.
I take the output of the script to fill a datagrid showing some details of the newly initiated move request.
This is the script I use:
"New-MoveRequest -Identity 'user1' -TargetDatabase 'Mailbox Db1'"
At first I used powershell.invoke to run the new-moverequest.
It returned a nice list with over 91 lines of information about the move request. (returned line 1 startswith'ModuleTypeName')
But I want to use pipeline.invoke to run the exact same new-moverequest.
This however just returns only 3 lines of information about the move request. This is the same information that you see when you start a new moverequest from the console itself. (returned line 1 startswith 'Displayname)
My question:
How can I use pipeline.invoke, but still get the 91 lines of information returned (that I get when using powershell.invoke)?
Related
I am trying to implement word level matches in Google Diff Match Patch, but it is beating me up.
The result I get is:
=I've never been =|-a-|=t=|= th=|-e-|=se places=|
=I've never been =|=t=|+o+|= th=|+o+|=se places=|
The result I want is:
=I've never been =|-at these-|= places=|
=I've never been =|+to those+|= places=|
The documentation says:
make a copy of diff_linesToChars and call it diff_linesToWords. Look
for the line that identifies the next line boundary: lineEnd =
text.indexOf('\n', lineStart);
In the c# version, I found the line to change in diff_linesToCharsMunge, which I changed to:
lineEnd = text.Replace(#"/[\n\.,;:]/ g"," ").IndexOf(" ", lineStart);
However, there is no change in granularity -it still finds differences at character level.
I am calling:
List<Diff> differences = diffs.diff_main(linepair.Original, linepair.Corrected, true);
diffs.diff_cleanupSemantic(differences);
I have stepped through to make sure that it is hitting the change I made (incidently, there is a hardcoded minimum of 100 characters before it kicks in).
I have created a sample dotnet project with diffmatch program. Its probably older version of DiffMatchPatch file but the word and lines work.
DiffMatchPatchSample
For your above sample text ,I get below output.
at these | to those
I want to create a parameter that contains a list of string (list of hub codes). This list of string is created by reading an external csv file (this list could contain the different codes depending on the hub codes in the CSV file)
What I want is to find a easy auto way to perform batch runs by each hub code in the list.
So this question is:
1) how to add and set a new parameter directly from the code (during the initialization when reading the CSV) instead of GUI parameter panel?
2) how to avoid manual configuration of hub list in the batch run configuration
Something like this for adding the parameters should work in your ContextBuilder.
Parameters params = RunEnvironment.getInstance().getParameters();
((DefaultParameters)params).addParameter("foo", "Big Foo", Integer.class, 3, false);
You would read the csv file to get the parameter name and value.
I'm not sure I completely understand the batch run configuration question, but each batch run has a run number associated with it
RunState.getInstance().getRunInfo().getRunNumber()
If you can associate line numbers in your csv parameter file with run number (e.g. run number 1 should use line 1, and so on), then each batch run would use a different parameter line.
While creating an invoice through YV60SBAT-SDBILLDL via job - we have to do some checks.
If some of these custom checks don't pass, we should restrict the system not to create an invoice for that particular document and should continue for the rest of the documents. Also, that error message should be displayed in batch job log..
Here is an example:
Delivery documents: say 1,2,3
1-Invoice should generate
2-Invoice should not get generate because some check doesn't pass
3-Invoice should generate...
I've tried with Enhancement spot ES_SAPLV60A Point fakturaposi_auftragspositio_02 and set us_rc = 4 and RETURN (include LV60AA29), as found on some forum .. but the system doesn't access this code.
I use the following command to load data.
/home/bigquery/bq load --max_bad_record=30000 -F '^' company.junelog entry.gz country:STRING,telco_name:STRING,datetime:STRING, ...
It has happened that when I got non-zero return code the data was still loaded. How do I make sure that the command is successful or not? Checking return code does not seem to help. There are times when I loaded the same file again because I got an error but the data was already available in bigquery.
You can use bq show -j of the load job and check job status.
If you are writing code to do the load, so you don't know the job id, you can pass the job id into the load operation (as long as it is unique) so you will know which job to check.
For instance you can run
/home/bigquery/bq load --job_id=some_unique_job_id --max_bad_record=30000 -F '^' company.junelog entry.gz country:STRING,telco_name:STRING,datetime:STRING, ...'
then
/home/bigquery/bq show --j some_unique_job_id
Note if you are creating new tables for every load (as opposed to appending), you could use the write disposition WRITE_EMPTY to make sure you only did the load if the table was empty, thus preventing adding the same data twice. This isn't directly supported in bq.py, but you could use the underlying bigquery_client.py to make this call, or use the REST api directly.
I am unable to write any records to my database using a web service. Service is set up OK and can access it via uri and also query my database via the service using a simple page i created.
When it comes to writing to the database, I am not getting any errors, and the instance of my WebClient which is populated with variables to write to the db is holding all the variables OK but when it comes to actually writing to the db (see below code) nothing seems to happen except that the Member ID of the last existing member added to the database is returned.
'assign all abMem fields to values within form to write to database
newMem.Title = ddTitle.SelectedValue
newMem.Initials = txtInitials.Text
newMem.Surname = txtSurname.Text
newMem.Address1 = txtAdd1.Text
newMem.Address2 = txtAdd2.Text
newMem.Address3 = txtAdd3.Text
'etc etc .... additional fields have been removed
Try
cc.Open()
cc.CreateMember(newMem)
returnMem = cc.GetMember(newMem)
MesgBox(returnMem.MemberID & " - Member Created")
cc.Close()
Catch cex As CommunicationException
MesgBox("CommEX - " & cex.Message)
cc.Abort()
Catch tex As TimeoutException
MesgBox("TimeEX - " & tex.Message)
cc.Abort()
Finally
MesgBox("Closed the Client")
End Try
When i run the above, I've noticed in the log file for the service (in the system32 folder on my server) that 2 requests are made each time - presumably one for where I am trying to add a record and the other I would think would be the request for the ID of this member (which isn't created, hence why I believe it it is simply returning the last successful entry in the table).
I know there isn't a problem with the actual web service as there is another user successfully able to add to the db via the service (unfortunately I am unable to simply copy their set-up as they are hitting it via a php page) so i know there is a problem somewhere in my code.
Is cc.CreateMember(newMem) the correct syntax for passing a member's details to the function in the webservice is what I am wondering?
I've re-wrote the code (seems identical to above) and republished the web service. Seems to be working OK now so I must have had some silly mistake somewhere!