How to increase digitcount in Digital Gauge? - jscript

I'm trying to use application that was developed using .NET.
This application uses Dundas Gauges (third party included in my application).
Application uses jscript.net. I'm trying to use Digital gauge.
The problem that I have:
The number count is limited to 5. In my case I have 6 digits to display. If I provide 5 digits it works, if I provide 6 digits .. instead of displaying those numbers I see 'ERROR'
My question:
How could I increase allowed digit count? I used this code:
var digitGauge : GaugeControl = GaugeControl( form.All( "digitGauge" ) );
digitGauge.Value = 123456;
Note: I was looking for property DigitCount for variable digitGauge .. but it does not exist.
Could someone help me and correct my code?
Thanks

I am taking off this question. I decided not to use this type of gauge

Related

how can I config the ar drone to detect tags using node.js?

I am using parrot ar drone 2.0 and trying see if it detects the oriented roundel. This is a part of my code:
client.config('CAD_TYPE_ORIENTED_ROUNDEL_BW', 12);
client.config('general:navdata_demo', 'FALSE');
and later i have:
console.log('cameraSource:' + d.visionDetect.cameraSource);
console.log('tag_count:' + d.visionDetect.nbDetected);
console.log('tag_type:' + d.visionDetect.type);
But the number of tags and everything remains zero despite the drone moving above the tag.
I am a bit new to node.js so can somebody please tell me what the problem is?
Apparently you need to type all configurations in lower case letters.
so with this configuration it can detect it.
client.config('detect:detect_type', 12);
number 12 corresponds to the black and white oriented roundel.

Datastage: String to Timestamp to milli seconds conversion

I'm trying to insert timestamp with milli seconds into a database. I tried following steps but haven't had any luck.
Extend field value to milli seconds , with length 26 and scale 3.
Used StringToTimestamp(timestampInString,"%yyyy-%mm-%dd %hh:%nn:%ss.3"), Resulting null value in output.
Modified the default time Stamp in job properties to %yyyy-%mm-%dd %hh:%nn:%ss.3
Design :
Sequential file --> TX --> destination (SQL/Seq file)
Could you please assist a solution for this?
What you tried looks good so far with one exception:
length 26 and scale 3
Using Db2 for example you would need to specify length 26 precision 6.
26 and 3 do not fit as
%yyyy-%mm-%dd %hh:%nn:%ss has length of 20
Specifying microsenonds is extended attriute is also necessary.
Have a try and provide more details of the target system if you still have problems
try below command in transformer stage and set the target data type as per the requirement, it will give the required result:
StringToTimestamp(Columnname,"%yyyy-%mm-%dd %hh:%nn:%ss.3")
Most important thing is to override the default NLS settings in the job with expected format (%yyyy-%mm-%dd %hh:%nn:%ss.3) which you have already completed.
Now, for the microseconds part which is not being displayed, you can enable the Microseconds extended attribute for the field in the target stage used.
Also you can refer this link from IBM which explains a similar scenario

Get numbers of all screens in Xlib

I've been googling for quite a long time and I just can't find any information on how to get screen_number for every screen connected to computer. Here I found a list of macros and some of them (like for example ScreenOfDisplay(display, screen_number) ) use argument screen_number. However there is no such macro that could give me a list of those numbers (one for every connected screen). I know how to get number of default screen (DefaultScreen() ) and count of all screens ( ScreenCount() ) but what about other screens? I noticed that screen_number of default screen is 0, although I have only one screen connected to my computer so I can't really test what happens when there are more of them. I think that screen_number could be assigned in a very simple way which is screen_number=0 for first screen,screen_number=1 for second,screen_number=2 for third and so on but as I said... I can't test wheather it's true and even if I had multiple screens how could I be sure that it works like this for all computers .Please ,if anyone of you has more experience with X11 and knows all details about how it works,tell me if I am right.
The ScreenCount(dpy) macro and int XScreenCount(Display*) function both return the number of screens connected to the display. Valid screen numbers are 0 to ScreenCount(dpy)-1. Macros in Xlib.h confirm:
#define ScreenCount(dpy) (((_XPrivDisplay)dpy)->nscreens)
#define ScreenOfDisplay(dpy, scr) (&((_XPrivDisplay)dpy)->screens[scr])
Your source (2.2.1. Display Macros) provides enough information. Normally the default screen-number is 0, e.g., when connecting to the local host you could use :0.0 as indicated in the documentation for XOpenDisplay.
That is "normally". If you run VNC, normally that runs on a different display (the first 0 in the simple connection string shown).
But (reading the documentation), when an application calls XOpenDisplay, it asks for the given screen-number (which the X server may/may not honor):
screen_number
Specifies the screen to be used on that server. Multiple screens can be controlled by a single X server. The screen_number sets an internal variable that can be accessed by using the DefaultScreen() macro or the XDefaultScreen() function if you are using languages other than C (see "Display Macros").

How to generate a pin code in Symfony

I'm working right now on a symfony2 web app and I need to generate automatically and randomly pin-code composed by 6 alphanumeric characters example:
14gkf8
kfgh88
this code will be sent by mail to the use, that's how he will connect to the platform.
anyone have an idea how to make it or there is maybe a ready tool to do it ? thank you
You can generate random codes with the following code:
substr(bin2hex(openssl_random_pseudo_bytes(100)), 0, 6)
Online demo.
openssl_random_pseudo_bytes() will generate random binary data, bin2hex() will transform this binary data as hexadecimal data (e.g. 5c3aa…e55) and substr(…, 0, 6) will keep only the 6 first characters. Since hexadecimal uses values from 0 to 9 and a to f, there is 16 different characters available at each position, so it gives 16^6 = 16,777,216 possibilities (with 0 to 9 and a to z it's 36^6 = 2,176,782,336, only ± 130 times more). If the user doesn't need to type the key, you can use more characters, for example with 12 characters you have many more possibilities: 16^12 = 2,814×10¹⁴.
You can use uniqid() to generate a unique alphanumeric string

Increasing the number of suggests shown in omnibox

Is it in anyway possible to increase the number of suggests that your extension may show in the omnibox?
By default it looks like 5 rows is the limit. I've read about a command line switch to change the number of rows (--omnibox-popup-count) but I am really interested in dynamically being able to set this in my extension.
5 rows isn't really enough for the information my extension want to show.
[Update 2018 - thanx version365 & Aaron!]
» Not hardcoded anymore! chrome://flags/#omnibox-ui-max-autocomplete-matches . Credit goes to #version365 answering below: http://stackoverflow.com/a/47806290/234309 « – Aaron Thoma
..[historical] detail: since the removal of --omnibox-popup-count flag (http://codereview.chromium.org/2013008) in May 2010 the number [was] hardcoded:
const size_t AutocompleteResult::kMaxMatches = 6;
a discussion two years later on the chromium-discuss mailing list about the 'Omnibox default configuration' "concluded"
"On lower performing machines generating more result would slow down the result display. The current number look like a good balance."
[which is not a very valid argument, considering the probably infinitesimal overhead retrieving more items than the hard-wired number]
why the heck is there no chromium fork that removes stupid UX limitations like this (or the no tabbar in fullscreen mode)^^
Since there is no more --omnibox-popup-count flag; you can use another flag which is new.
chrome://flags/#omnibox-ui-max-autocomplete-matches lets you select a maximum of 12 rows.
In fact there is no more --omnibox-popup-count flag
http://code.google.com/p/chromium/issues/detail?id=40083
So I think there is no way to enlarge the omnibox.

Resources