What does "-vp" do in "call prorest.bat live.db live.BK -vp > Backup.txt"? - command-line

I'm a newbie to cmd scipts, annd just want to know What "-vp" is doing here? What's the purpose of it? I don't think it's batch-parameter of the batch (prorest.bat) being called here. Instead, it should be some kind of qualifier of cmd i think. But what would this qualifier do? Can anyone please tell me?
call prorest.bat d:\live.db d:\dbbackup\live.BK -vp > d:\dbbackup\Verify_Live_Backup.txt
Thanks a lot!

-vp is indeed a parameter of prorest.bat as you can see by looking at the documentation of prorest.bat.
-vp: Faz a leitura do bloco de backup, calcula o CRC e compara com o bloco do banco.

Related

GAMS: retrieve information from solution

GAMS: I think I have a pretty simple question, however I'm stuck and was wondering if someone could help here.
A simplified version of my model looks like this:
set(i,t) ;
parameter price
D;
variable p(i,t)
e(i,t);
equations
Equation1
obj.. C=sum((i,t), p(i,t)*price);
Model file /all/ ;
Solve file minimizing C using MIP ;
Display C.l;
p(i,t) and e(i,t) are related:
Equation1 .. e(i,t)=e=e(i,t-1)+p(i,t)*D
Now I want to retrieve information from the solution: lets say I want to know at what t e(i,t) has a certain value for example --> e(i,t)= x(i) or otherwise formulated e(i,t=TD)=x(i) find TD, where x(i) thus is depending on i. Does anyone know how I can write this in to my GAMs model? To be clear I do not want to change anything about my solution and the model I have runs; I just want to retrieve this information from the solution given.
So far I tried a couple of thing and nothing worked. I think that this must be simple, can anyone help? Thank you!
Try something like this:
set i /i1*i10/
t /t1*t10/;
variable e(i,t);
*some random dummy "solution"
e.l(i,t) = uniformInt(1,10);
set find5(i,t) 'find all combinations of i and t for which e.l=5';
find5(i,t)$(e.l(i,t)=5) = yes;
display e.l,find5;
Hope that helps,
Lutz

SphinxQL MATCH - how to use?

Explain to me please, what's the MATCH() operator in SphinxQL - how to use it?
Sorry if my question is stupid for somebody, but I really couldn't find any normal explanation in the Web of this.
For example, I have this request:
SELECT tid FROM message WHERE MATCH('test');
What does it mean?
Thanks.
Its quite literally the 'workhorse' of sphinx. The query you want to 'search' the index with. Pretty much the point of Sphinx is to run 'full-text queryies'
http://sphinxsearch.com/docs/current.html#extended-syntax
http://sphinxsearch.com/docs/current.html#sphinxql-select

How to sscanf this string?: "+CPMS: \"ME\",18,255,\"ME\",18,255,\"ME\",18,255"

So, I'm developing an application in C and I need to sscanf a string.
+CPMS: \"ME\",18,255,\"ME\",18,255,\"ME\",18,255
I need to get the number between the first and second commas, 18 in this example, but it can be from 0 to 255.
I'm trying to create the placeholder to get this but I can't seem to make it work.
I've tried lots of thing, but I can't understand why:
sscanf(pointer, "+CPMS: \"%*s\",%d", &intPointer);
doesn't work.
Can anyone help me?
Thank you.
Well, I'm going to answer my own question.
sscanf(pointer, "+CPMS: \"%*2s\",%d", &intPointer);
It looks like I needed to put the number of characters to ignore.
Hope it help someone else.

Where are `_stdlib_getTypeName()` & `_stdlib_getDemangledTypeName()` declared? -- Swift

I'm toying with some introspection in Swift and it seems like if you want to get the class of an object in a printable version, these are the best options. (introduced in beta 6.0).
_stdlib_getTypeName(someClass)
_stdlib_getDemangledTypeName(someClass) // A slightly cleaner version
I was hoping to find other introspection methods, but unfortunately, command clicking the methods take me to the Swift header and they're not declared there.
My other option would be to type _stdlib and wait for autocomplete or control space to see my options. Unfortunately, none of these methods autocomplete.
Is there a file where these and other stdlib functions are declared, or is there documentation for these methods anywhere?
I found the answer to my question via a tips and tricks blog post from realm here -- notably, the post by JP Simard.
The best way to see other methods along these lines is to go to your terminal and type:
cd `xcode-select -p`/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx
And then enter the following:
nm -a libswiftCore.dylib | grep "T _swift_stdlib"
This will give you a readout of all available functions that looks something like this:
00000000001a43c0 T _swift_stdlib_NSObject_isEqual
00000000001a4490 T _swift_stdlib_NSStringHasPrefixNFD
00000000001a44f0 T _swift_stdlib_NSStringHasSuffixNFD
00000000001a4450 T _swift_stdlib_NSStringNFDHashValue
00000000001a2650 T _swift_stdlib_atomicCompareExchangeStrongPtr
00000000001a2670 T _swift_stdlib_atomicCompareExchangeStrongUInt32
00000000001a2690 T _swift_stdlib_atomicCompareExchangeStrongUInt64
00000000001a2700 T _swift_stdlib_atomicFetchAddUInt32
00000000001a2710 T _swift_stdlib_atomicFetchAddUInt64
00000000001a26f0 T _swift_stdlib_atomicLoadPtr
00000000001a26d0 T _swift_stdlib_atomicLoadUInt32
00000000001a26e0 T _swift_stdlib_atomicLoadUInt64
00000000001a26b0 T _swift_stdlib_atomicStoreUInt32
00000000001a26c0 T _swift_stdlib_atomicStoreUInt64
00000000001a4410 T _swift_stdlib_compareNSStringDeterministicUnicodeCollation
000000000017c560 T _swift_stdlib_conformsToProtocol
00000000001a5a80 T _swift_stdlib_demangleName
000000000017c8e0 T _swift_stdlib_dynamicCastToExistential1
000000000017c6f0 T _swift_stdlib_dynamicCastToExistential1Unconditional
00000000001a5910 T _swift_stdlib_getTypeName
I haven't found any documentation, but a lot of these function names are fairly explanatory and one can always discover a lot through trying them out!
All answers are good, but the result of second step that we can not use. We dont even know is this function usable or correct...
I've been trapped in these result about 1 day.
Finally I dump all funcitons & symbols for stdlib from libswiftcore.dylib, i found this..
command:
nm libswiftcore.dylib | grep "_stdlib_"
We can find one line from result:
00000000000b2ca0 T __TFSs19_stdlib_getTypeNameU__FQ_SS
Remove first underscore "_" then we get this:
_TFSs19_stdlib_getTypeNameU__FQ_SS
Maybe we can view this website to understand the meaning of "_TFSs19_stdlib_getTypeNameU__FQ_SS",
But I think we can get the correct function description faster!!
So, we demangle like this below in xcode lldb window:
(lldb) p _stdlib_demangleName("_TFSs19_stdlib_getTypeNameU__FQ_SS")
(String) $R0 = "Swift._stdlib_getTypeName <A>(A) -> Swift.String"
Finally we can expose more undocumented functions in swift that we never seen before, we can try another one that we never heard like this:
(lldb) p _stdlib_demangleName("_TFSs24_stdlib_atomicLoadARCRefFT6objectGVSs20UnsafeMutablePointerGSqPSs9AnyObject____GSqPS0___")
(String) $R1 = "Swift._stdlib_atomicLoadARCRef (object : Swift.UnsafeMutablePointer<Swift.Optional<Swift.AnyObject>>) -> Swift.Optional<Swift.AnyObject>"
All clear~ Thank god!!
Share this to you, wish it can help~
:D

Quartz Get trigger description

Is there a function in the API that returns language description of a trigger? For example,
cron trigger expression="0 0 0 L * ?"
Language I'm looking for is "Fires at 0:00:00 every last day of the month" (Or something like that)
I want to use this to give feed back to user of what schedules are created. I'm hoping I don't have to parse the expression myself. I search Google but have came empty, maybe I'm not using the right words to search for.
I'm using the .NET version. But if there is a java function out there I could probably figure out how to port it.
Thanks in advance
There is a question similiar to this here I think your going to have to write something yourself for this.