Graphics Server Documentation or User Guide - graphics

I got a very old Classic ASP code which is running on windows server 2003 the code has lines something like GSDSVR.GSServerProp and GSSERVER.GSServerProp. After some research I found that this is some kind of Graphic Server Component to generate chats or graphics, but I am unable to find any example on how to use it.
Block of code I have-
Set GSObject("Bar") = Server.CreateObject("GSDSVR.GSServerProp")
GSObject("Bar").URL = Graphics_URL
... more stuff ...
GSObject("Bar").Height = 291
GSObject("Bar").ClipGraph = 1
Tmp_FileName = GSObject("Bar").DrawGraph()
The code generates chart(s) based on some data, Now I want to achieve this using .net.
The problem I am facing is I don't know what is happening in code I just know the out of the code.
Can anyone please help me with documentation or few examples for this graphic server component?

Related

Micropython and Bluetooth on ESP32

I know the support for bluetooth is still under development but it seems to cover everything I need at this point so I decided to give it a try.
I just want to simulate reading from a source of data (a EKG machine) so I came up with this code:
from ubluetooth import BLE
from ubluetooth import FLAG_READ, FLAG_NOTIFY, FLAG_WRITE
import time
ekg_data = [-305,-431,-131,440 ,1158,1424,1445,1623,1500,1018,142 ,-384,-324,-414,-77 ,334 ,-372,-154,366 ,7613,1461,1403,6133,-179,-381,-224,-135,-168,-208,-187,-181,-180,-160,-160,-151,-150,-151,-138,-141,-128,-118,-106,-798,-677,-430,-253,-122,98 ,133 ,281 ,354 ,390 ,519 ,475 ,558 ,565 ,533 ,593 ,458 ,377 ,107 ,-335,-719,-116,-129,-132,-131,-119,-122,-111,-106,-105,-935,-971,-877,-841,-841,-725,-757,-660,-641,-660,-554,-592,-496,-473,-486,-387,-431,-350,-364,-347,-208,-365,-362]
bt = BLE()
bt.active(True)
print('----')
print(bt.config('mac'))
print(bt.config('gap_name'))
HR_UUID = bluetooth.UUID(0x180D)
HR_CHAR = (bluetooth.UUID(0x2A37), bluetooth.FLAG_READ | bluetooth.FLAG_NOTIFY,)
HR_SERVICE = (HR_UUID, (HR_CHAR,),)
SERVICES = (HR_SERVICE,)
((ekg,),) = bt.gatts_register_services(SERVICES)
# bt.gap_advertise(100, 'MicroPython EKG')
count = 0
while True:
if count >= len(ekg_data):
count = 0
bt.gatts_write(ekg, ekg_data[count].to_bytes(2, 'big'))
print(ekg_data[count])
time.sleep_ms(1000)
count += 1
Now the code compiles and runs (I can see the output on the console) but I cannot find the device in my bluetooth app (I am using the nordic app)
Does anyone with more knowledge on that area can tell me if I am overlooking something? I tried to take the advertising off and on because I thought I might be overriding something with it but that didn't help too...
I think your code is missing multiple things.
First, you are not setting (irq) which is (Event Handling) for Micropython(As you can see from the docs or in their Github codes.
Also, I can't see you setting the buffer or any stuff like that, please revise the examples for what you asking here. Good job btw.

webdriver-sync running asynchronously?

I'm trying to create selenium tests that run each step synchronously, without using .then(), or async/await. The reason for this is that I want to create a set of functions that allow pretty much anyone on our test team, almost regardless of tech skills to write easy to read automated tests. It looks to me like webdriver-sync should give me exactly what I want. However, the following dummy code is producing problems:
var wd = require('webdriver-sync');
var By = wd.By;
var Chromedriver = wd.Chromedriver;
var driver = new Chromedriver;
driver.get('https://my.test.url');
var myButton = driver.findElement(By.cssSelector('[id*=CLICK_ME]'));
myButton.click();
It tries to run - browser is launched, and page starts to load... but the steps are not executed synchronously - it goes on and tries to find and click "myButton" before the page has finished loading, throwing a "no such element" error... which to me kinda defeats the point of webdriver-sync?! Can someone tell me where I am going wrong?
FWIW, I have webdriver-sync 1.0.0, node v7.10.0, java 1.8.0_74, all running on CentOS 7.
Thanks in advance!
You need to put double-quotes around "CLICK_ME" as it's a string value.
Generally, though, it's a good idea to Wait for specific elements because dynamic pages are often "ready" before all their elements have been created.

IronPython Azure sending service bus message - assertion error

I've been trying different combination of strings to get this to work to no avail. Hoping someone can help. I am using the Azure SDK to send a Service Bus message.
GUID = '40100b19-1335-468d-bf18-fca6b15c8f0c'
Current_Lineup = '{"Flex": 11247, "DST": 530, "RB2": 9680, "RB1": 9448, "QB": 10699, "WR2": 9964, "WR3": 9427, "WR1": 11676, "TE": 11521}'
sbs = ServiceBusService('blahblah' , 'blahblahblah', 'owner')
msgbody = 'msg-body'
utf8msg = msgbody.encode('utf8')
bytemsg = bytes(utf8msg)
msg = Message(bytemsg, custom_properties={"MessageId":GUID,"Whitelist":Current_Lineup,"Type":"roster"})
## msg = Message(b'msg-body')
## msg = Message(b'msg-body', custom_properties={"MessageId":GUID,"Whitelist":Current_Lineup,"Type":"roster"})
sbs.send_topic_message('statustopic',msg)
Seems the Azure SDK doesn't like what I am sending for message body. Using CPython works like a champ. Using IronPython it dies with an AssertionError.
Any help would be greatly appreciated!!!
Looks like I got it working, a bit of a kludge though. Still would like a better solution so all you IronPython guys, chime in.
I change the message creation call to this...
msg = Message(None, custom_properties={"MessageId":GUID,"Whitelist":Current_Lineup,"Type":"roster"})
I don't need the body of the message to carry any of the data. It's a lot easier to send data in the properties.
The only other thing I needed to change is comment this line in httpclient.py in send_request_body...
assert isinstance(request_body, bytes)
I would prefer to not hack the httpclient.py but that is the only way I could figure out how to get through this bug.

Post a text request in Casablanca (C++ REST SDK)

I am writing a client side code in Visual C++ 2012 using C++ Rest SDK (codename "Casablanca").
I have a client created and wish to POST a text string to the server. However, when I send the following code, it is compiling but not sending sending the request.
When I remove everything after "methods::POST" and send a blank post request, then it is sent and received by the server.
Can you please guide me where the problem is. The documentation related to this function is available on Casablanca Documentation.
pplx::task<http_response>resp = client.request(methods::POST,L"",L"This is the random text that I wish to send", L"text/plain");
I think the usage you give here looks correct.
Is your Casablanca the latest version ? Please check that out from here : http://casablanca.codeplex.com/
If you are sure your measurement is accurate, you may want to create a minimal repro and file a bug here : http://casablanca.codeplex.com/workitem/list/basic
I was having a similar problem, all my POSTs was arriving in blank on server , after a few hours work above it, i found a possible solution.
I changed the default content type to application/x-www-form-urlencoded and I started to pass the values like this Example data=text1&data2=text2
client.request(methods::POST,L"",L"data=text1&data2=text2", L"application/x-www-form-urlencoded");
The body parameter must be a json::value.
I cannot comment yet so I have to put my thoughts in an answer. I solved this problem like this: There is an overload of the request method that takes as a parameter the content type so that you do not have to change the code.
m_client->request(methods::POST, L"/statuses/update.json?" + url_encode(data),L"",L"application/x-www-form-urlencoded");
Obviously you would have to implement the url_encode method but that is not difficult. There is a pretty good implementation in "Cassablanca". A search on this site will alos turn up some good examples.

NetValidatePasswordPolicy issue on XP

My project has a requirement that it needs to check the password complexity before create the new account.
My code looks like:
NET_API_STATUS status;
NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG inputArg = {0};
NET_VALIDATE_OUTPUT_ARG* pOutputArg = NULL;
inputArg.ClearPassword = NewPass;
inputArg.PasswordMatch = TRUE;
status = NetValidatePasswordPolicy(DC, NULL, NetValidatePasswordChange,
&inputArg, (void**)&pOutputArg);
printf("status: %d, validationStatus: %d\n", status, pOutputArg->ValidationStatus);
NetValidatePasswordPolicyFree((void**)&pOutputArg);
I am working on windows XP.When I try to run, it prompt waring saying:
The procedure entry point NetValidPasswordPolicyFree could not be located in the dynamic link library NETAPI32.dll
From the MSDN it said the API is only valid in 2003 server and 2008 server.
Does it mean it can not work on XP?
Or can i find any other APIs to do the same thing as NetValidPasswordPolicy?
I googled a lot for this issue and found someone had asked similar question but it went unanswered :(. So, here I am trying my luck.
Even I tried to analyze 'NETAPI32.dll' in Reflector.exe, but while opening the .dll file it error out: Object reference not set to an instance of an object.
I am stuck badly and could not able to find any way. Any help will be appreciated :)
Issue has been solved :).
NetValidPasswordPolicy API from 'NETAPI32.dll' has requirements that it is not 'client' supported. Because of this requirement I am getting the warning: Entry point not found.
I tried my project on Windows 2003 server and it worked.
And my second question about 'Reflector.exe' is also invalid because 'NETAPI32.dll' is not .Net dll so Reflector wont recognize it.

Resources