An algo for creating numeric unque numbers
I am creating a client application which would be used to load some data in the Oracle database residing at a central server. This client application needs to generate unique id(that can be only long values) for populating the database.
How should we generate this unique id. I think that the algo should not be time stamp based a any users might want to generate this id at the same time.
Can anybody suggest me with a better alternative please??
thanks and regards
Pankaj Sanghi
Search for primary key generation methods.
I a few I can think of:
-UUID
-Each time check a table in the DB that has the max ID stored get and increment it
-Sequence Blocks (Generating blocks of id's, needs fewer database accesses)
-Stored Procedures (is dependant on your DB)
Similar Messages
-
Re-write numerical page numbers to roman numerals for an introduction?
Hi there everybody,
I've been attempting (for some considerable time!) to typeset and format a book. The book needs to have roman numerals running from the first title page (which is in reality left blank through using a secondary master page without page numbers). However, I didn't realise I would need to use roman numerals in the introduction, and instead started the page numbers from the first title page of the introduction. Therefore, my pages that are numbered by roman numerals (copyright page etc) stop at this point and in the introduction become numbers.
I need to change it so it is roman numerals up until the first page of the actual book, all through the introduction, but when I try to change it in the Numbers and Sections tab, it tells me that i've already used the numbers i've typed in.
Basically I would like to know how to take off the first set of roman numeral page numbers and start again??
I'm very confused!! Help would be MUCH appreciated.
LucyIs this any help?
Working with Page Numbers and Sections | Managing Pages and Books with Adobe InDesign CS6 | Que -
I have created numerous forms in Designer and for some reason, "Edit in Designer" from PDF, I cannot edit any of the fields in Design View.
Is it possible you accidentally put the fields on the master page?
-
IDOC Type for Tcode CC01 and CC02 (Create / Change Change Numbers)
We are trying to integrate Change Master from a 3rd party system to SAP R/3 4.72.What is the IDOC Type for Tcode CC01 and CC02 (Create / Change Change Numbers)
Thanks...
We have looked at this IDOC Type. However we are not very sure how the components (Material/BOM etc.) will be mapped into E1AEEFM segment in the IDOC. -
How can I create a new Numbers Document through AppleScript?
How can I create a new Numbers Document through AppleScript?
I try this:
tell application "Numbers"
make new document with properties {template name:"blank"}
end tell
But don't work.
Where can I find documentation about it?
ThanksIf you try to invent your own syntax, you are starting on very wrong basis.
The required syntax is defined by the Numbers AppleScript's dictionary.
This one doesn't know what is a template.
This is why, in the link posted by badunit, I use an other scheme to create a new document.
I know that it's awful but it's the only one available at this time.
Yvan KOENIG (VALLAURIS, France) samedi 4 juin 2011 11:25:25
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
Error when creating a new numbering series
I have a problem creating a new numbering series
i received the following error
next invalid serial number message 3535-3
i Controlled a period e the sequential numbering of series
For two period the indicator i the same "Standard" for the restaant period is the year
example
2004 Standard
2005 Standard
2006 2006
2007 2007
2010 2010
i controlled the sequent table
OFPR
OPID
NNM1
OACP
ThankHi,
Welcome you post on the forum.
How do you controlled the sequent table ?
Thanks,
Gordon -
'BAPI_GOODSMVT_CREATE' takes more time for creating material document for the 1st time
Hi Experts,
I am doing goods movement using BAPI_GOODSMVT_CREATE in my custom code.
Then there is some functional configuration such that, material documents and TR and TO are getting created.
Now I need to get TO and TR numbers from LTAK table passing material documnt number and year, which I got from above used BAPI.
The problem I am facing is very strange.
Only for the 1st time, I am not finding TR and TO values in LTAK table. And subsequent runs I get entries in LTAK in there is a wait time of 5 seconds after bapi call.
I have found 'BAPI_GOODSMVT_CREATE' takes more time for creating material document with similar issue, but no solution or explanation.
Note 838036 says something similar, but it seems obsolete.
Kindly share your expertise and opinions.
Thanks,
AnilHi,
please check if some of following OSS notes are not valid for your problem:
[Note 838036 - AFS: Performance issues during GR with ref. to PO|https://service.sap.com/sap/support/notes/838036]
[Note 391142 - Performance: Goods receipt for inbound delivery|https://service.sap.com/sap/support/notes/391142]
[Note 1414418 - Goods receipt for customer returns: Various corrections|https://service.sap.com/sap/support/notes/1414418]
The other idea is not to commit each call, but executing commit of packages e.g. after 1000 BAPI calls.
But otherwise, I am afraid you can not do a lot about performance of standard BAPI. Maybe there is some customer enhancement which is taking too long inside the BAPI, but this has to be analysed by you. To analyse performance, just execute your program via tr. SE30.
Regards
Adrian -
How do i check ensure that SAP checks for duplicate vendor invoice numbers?
Hi Experts -
How do I verify that SAP checks for duplicate vendor invoice numbers and blocks duplicate invoices from being paid?
Thanks!Hi
Pls chek the settigs by following the path
IMG>Materials Management>Logistics Invoice Verification>Incoming Invoice>Set Check for Duplicate Invoice.
Here you make the settings for creating a duplicate invoice check.
Moreever, in the vendor master, you need to tick the check box for duplicate invoice check.
I suggest you search the Forums before posting a query. There are lots of postings on this issue.
Thanks & regards
Sanil K Bhandari -
How to create numeric attribute using ABAP API
Hi experts
I'm trying to create a numeric attribute for a taxonomy table. In the how-to-examples there are only ways to create text attributes.
Those who have tried, please let me know the steps.
I have given below the code snippet which i tried to create numeric attribute. Please let me knw the missing link.
ls_num_attr_val-rating = 500.
APPEND ls_num_attr_val TO ls_ext_attr_info-characteristics.
ls_ext_attr_info-attr_info-attr_id-id = lv_attribute_id.
APPEND ls_ext_attr_info TO lt_ext_attr_info.
GET REFERENCE OF lt_ext_attr_info INTO lv_data.
ls_namevalue-value = lv_data.
ls_namevalue-code = 'ACCT'.
APPEND ls_namevalue TO ls_parameter-name_value_pairs.
lv_string = 'Customer 12'.
GET REFERENCE OF lv_string INTO lv_data.
ls_namevalue-value = lv_data.
ls_namevalue-code = 'CUST_NAME'.
APPEND ls_namevalue TO ls_parameter-name_value_pairs.
CALL METHOD lr_api->mo_core_service->create
EXPORTING
iv_object_type_code = 'ACCT_TYPE'
is_parameter = ls_parameter
iv_parent_id = 0
IMPORTING
ev_new_internal_id = lv_key.
Thanks
SwarnaDeepika
Edited by: SwarnaDeepika on Dec 19, 2009 4:38 PMHello Ashok,
[here|https://help.sap.com/javadocs/MDM/current/com/sap/mdm/examples/CreateField.html] is the Java API of the needed command.
There is also an example of how to create a field. You can use the class by replacing the strings for the server, repository, table, etc. to your needs.
If you want to create more than one field, simply use a loop, like the for-loop, while-loop, etc.
Hope this helps.
Best regards
Dominik -
(Need Help) How to create Numeric text box in SVG
Hello everyone,
Can any one help me to create Numeric TextField in SVG? I'm struggling to do this please someone help me as soon as possible....
Thanks In advance,
UlagaTo get the best answers, I think you probably need to break down your post into several different one with a separate question in each, along with the business problem you are trying to solve... but here's a few pointers for you to research...
Textbox - there's plenty of info in SDN on creating a custom control with a textbox e.g. Re: Text Editor on modulepool Screen and sample code in SAP too.
Attachments - If this is for an email, then GUI_UPLOAD might help and the BCS class is the newer way to send messages... check out Re: Offline Approval: RBBP_NOTIFICATION_OFFAPP Vs RSWUWFMLEC for example... if this is an attachment for an SAP object such as an FI Document or Purchase Order, then the Generic Object Services (GOS) could be what you want e.g. https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de5fb3
Jonathan -
Steps for Creating Report using LDB
hellow sirs
can u please tell Step by Step method for creating Reports using LDB method...
if possible with screen Shots..
thanking You
RahulHi,
Please refer the code below:
Use the PNP LDB for this program,
*: Report: ZP_POSTCODE :
*: Date : 2004 :
*: Description: Displays report of employees by postcode area, :
*: includes current travelling allowances (i.e. parking :
*: permit or transport card etc..) :
*: Use: Help encourage the use of car sharing and public :
*: transport where appropriate. :
REPORT zp_postcode.
type-pools: slis. "ALV Declarations
NODES: pernr.
INFOTYPES: 0000, 0001, 0002, 0006, 0008, 0014, 0105, 0121.
SELECTION-SCREEN BEGIN OF BLOCK pcode WITH FRAME TITLE text-s01.
SELECT-OPTIONS: so_pcode FOR p0006-pstlz.
SELECTION-SCREEN END OF BLOCK pcode.
TYPES: BEGIN OF t_output,
pernr TYPE p0001-pernr, "personnel name
anredtxt TYPE t522t-atext, "title (based on p0002-anred)
fname TYPE p0002-vorna, "first name
lname TYPE p0002-nachn, "last name
orgtx TYPE t527x-orgtx, "dept
fte TYPE p0008-bsgrd, "fte
parking(20) TYPE c,
payslip TYPE t526-sachn, "payslip address
telno TYPE p0105-usrid_long, "tel number(p0105-usrty = 0020)
email TYPE p0105-usrid_long, "email (p0105-usrty = MAIL)
postcode type p0006-pstlz,
END OF t_output.
DATA: it_output TYPE STANDARD TABLE OF t_output INITIAL SIZE 0,
wa_output TYPE t_output.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv,
gd_count(6) type n,
gd_outtext(70) type c,
gd_lines type i.
*START-OF-SELECTION.
START-OF-SELECTION.
clear: gd_count.
GET pernr.
* Infotype 0121 is used to store multiple contracts for personnel.
* Field p0121-hpern contains the personnel number for the main contract.
PROVIDE * from p0121 between pn-begda and pn-endda.
* Check if main contract
if p0121-pernr ne p0121-hpern.
reject.
endif.
ENDPROVIDE.
add 1 to gd_count.
concatenate 'Processing personnel data'(m10) gd_count into gd_outtext
separated by ' '.
* Display indicator for employee count
perform progress_indicator using gd_outtext.
* Retrieve datd from infotypes
rp_provide_from_last p0000 space pn-begda pn-endda.
rp_provide_from_last p0001 space pn-begda pn-endda.
rp_provide_from_last p0002 space pn-begda pn-endda.
rp_provide_from_last p0006 space pn-begda pn-endda.
rp_provide_from_last p0008 space pn-begda pn-endda.
rp_provide_from_last p0014 space pn-begda pn-endda.
* Check post code
CHECK p0006-pstlz IN so_pcode. "cp
* Post code
wa_output-postcode = p0006-pstlz.
* Personnel number
wa_output-pernr = pernr-pernr.
* Personnel title
SELECT SINGLE atext
FROM t522t
INTO wa_output-anredtxt
WHERE sprsl EQ sy-langu AND
anred EQ p0002-anred.
* First name
wa_output-fname = p0002-vorna.
* Last name
wa_output-lname = p0002-nachn.
* Organizational Unit text (dept)
SELECT SINGLE orgtx
FROM t527x
INTO wa_output-orgtx
WHERE sprsl EQ sy-langu AND
orgeh EQ p0001-orgeh AND
endda GE sy-datum.
* FTE
wa_output-fte = p0008-bsgrd.
* Parking / travel deducted?
CASE p0014-lgart.
WHEN '7180' OR '7181' OR '7182'.
wa_output-parking = text-002.
WHEN '7183'.
wa_output-parking = text-001.
WHEN '7171' OR '7172' or '7173' or '7174' or
'7175' or '7176' or '7177' or '7178'.
wa_output-parking = text-003.
ENDCASE.
* Payslip Address
SELECT SINGLE sachn
FROM t526
INTO wa_output-payslip
WHERE werks EQ p0001-werks AND
sachx EQ p0001-sacha.
PROVIDE * from p0105 between pn-begda and pn-endda.
* Telephone numbers
if p0105-usrty = '0020'.
wa_output-telno = p0105-usrid_long.
endif.
* Email address
if p0105-usrty = 'MAIL'.
wa_output-email = p0105-usrid_long.
endif.
ENDPROVIDE.
append wa_output to it_output.
clear: wa_output.
*END-OF-SELECTION.
END-OF-SELECTION.
describe table it_output lines gd_lines.
if gd_lines gt 0.
perform build_fieldcatalog.
perform build_layout.
perform display_alv_report.
else.
message i003(zp) with 'No records found'.
endif.
*& Form PROGRESS_INDICATOR
* Displays progress indicator on SAP screen
form progress_indicator using p_text.
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
* PERCENTAGE = 0
text = p_text.
endform. " PROGRESS_INDICATOR
*& Form BUILD_FIELDCATALOG
* Build Fieldcatalog for ALV Report
form build_fieldcatalog.
fieldcatalog-fieldname = 'PERNR'.
fieldcatalog-seltext_m = 'Personnel No.'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
* fieldcatalog-emphasize = 'X'.
* fieldcatalog-key = 'X'.
* fieldcatalog-do_sum = 'X'.
* fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'ANREDTXT'.
fieldcatalog-seltext_m = 'Title'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'FNAME'.
fieldcatalog-seltext_m = 'First Name'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'LNAME'.
fieldcatalog-seltext_m = 'Last Name'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'ORGTX'.
fieldcatalog-seltext_m = 'Department'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'FTE'.
fieldcatalog-seltext_m = 'FTE'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PARKING'.
fieldcatalog-seltext_m = 'Parking/Metrocard'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PAYSLIP'.
fieldcatalog-seltext_m = 'Payslip Add.'.
fieldcatalog-col_pos = 7.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'TELNO'.
fieldcatalog-seltext_m = 'Telephone'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EMAIL'.
fieldcatalog-seltext_m = 'E-mail'.
fieldcatalog-col_pos = 9.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'POSTCODE'.
fieldcatalog-seltext_m = 'Post code'.
fieldcatalog-col_pos = 10.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-zebra = 'X'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_output
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT -
Creating Alphanumeric Page Numbering
I have Adobe Acrobat X Pro for Windows. I want to create page numbering that reads A-1, A-2, A-3, etc. How do I do that? Thanks.
I see, you're probably asking about the Header/Footer feature. I don't see that there's an option for that style. People have used form fields for this, an approach that is best automated, both for creating the fields and populating them with the correct values. They can then be flattened to convert them to regular page contents. Post again if you'd like more info.
If you're able to edit the source document, it would be best to do it there and generate a new PDF. -
Best workflow for creating logsheets before ingesting.
I'm looking for the best workflow for creating detailed log sheets of my avchd footage before ingesting/transferring it to FCP. I have many hours of footage shot with my Sony NX5U and only want to ingest the necessary clips. I'm using FCP 6.5 on a MacPro tower. Thanks.
>I'm using FCP 6.5
NO you are not. You might be using FCP 6.0.5.
Well, the only way you can ingest only sections of tapeless media is by using Log and Transfer. And you cannot Log clips first, and transfer later. You cannot do the same thing you did with tape, make a Batch Capture list. So you would look at your footage in the FCP L&T interface, and you can send one to be transcoded while you move onto the next one to watch. That can happen at the same time.
But, there's another issue here. The Sony NX5U uses an AVCHD format that is slightly different than normal...not that there is a normal. But I discovered that importing clips up to 10 min in length work fine, but anything over 10 min, and it took 4-5 times longer to import. meaning a 30 min clip took just over two hours. It was something that ClipWrap2 addressed before FCP did...and they only addressed the issue with the FCP 7.0.3 update. FCP 6.0.5...or even the last update for that version, 6.0.6, doesn't address this. There might be issues in importing this footage into FCP 6.
And the other options...Avid Media Composer and Adobe Premiere...don't have a "log and transfer" type interface. They bring in the full clips only. With Premiere, you are stuck with them being full length. But with Avid, you acccess the footage via AMA (Avid Media Access), and then you'd make your selects on a sequence, and then consolidate/transcode only the footage on the sequence.
And no, there's no way to make a logging sheet for these apps either.
The best you can do is watch the footage, note the timecode, and manually enter those numbers when you go to bring in the footage. -
Simplest approach for creating database for small collection of data - new project design phase
Hello. I am at the design stage of a VB.NET project, which I hope will help me strengthen some skills I have learnt so far, and learn new ones. I have a couple of questions. Firstly regarding data types, is there a unified, standardised, all-convergent
data type available I can use? Secondly I've read about numerous avenues to create a database, namely binary serialisation, access-based, excel-based, notepad-based - The project I intend to create, will only require storage of a "relatively" small
collection of data, which may grow over time, but not significantly - so, taking this into account, which method is advisable for creating my database? (a beginner-friendly option is preferred). I have included a couple of images, with my questions, to give
a rough idea of what I'm planning to do. Thanks for your advice and suggestions.Type would be the type of recording, as in LP (Long Play - standard album), EP (Extended Play) or Compilation. Most would be LP.
Chris,
I have a start on this and I want to pause here to post what I have and to discuss it.
There’s a lot to talk about because you’re going from little knowledge of a class to a lot in a hurry. There is no real hurry
in any of this; if you don’t understand then let’s stop and talk about it – until you fully have a handle on it, adding more would only fuel the confusion.
I’ll add this at this juncture: There is no one single right way to do this. There are definitely some
wrong
(or maybe just simply ineffectual) ways, but certainly no single right way. A lot of what you’ll see in the following will reflect my preference; nothing more than that.
Also though, I’m doing some of this to expose you to it. By that I mean that I may or may not have done it this way all along,
but I decided that I want to open the doors, even though at first it’ll seem like you’re trying to get a drink of water from a fire hydrant. ;-)
I have it set up with two namespaces: CMJR and Common. The latter one is for use for what I’m considering to be a ‘common’ need
– things that you may use in several classes. In time, the routines for serialization will be there but no need to even talk about that now so it’s not there.
The code so far (which I’ll show by the end of this discourse) is about 500 lines. For a class library, that’s puny! Most of
what I have thus far is just a shell of what will be filled in later. I won’t at all be surprised that by time this is completed, that 500 lines can easily grow to 5000 lines or more.
Like I said yesterday, the great thing about doing it this way is that it’s done
your
way; the drawback is just how much there is to do though, so if nothing else, this will perhaps influence your decision on how you want to handle things like this in the future.
The namespaces/classes are laid out as:
CMJR
Music (a class)
Film (a class)
Games (a class)
Common
IDataSource (an interface)
IGenre (an interface)
Utilities (a class)
This
image shows the structure of things thus far. The reason why the enum “GenreType” isn’t expanded in that
image is because it’s hugely long! In fact I fully expect that you’ll likely delete most of those. I got them from someone else’s class library (about a decade ago) so it was convenient to use.
Let’s start from the inside and work toward the outside here:
What is an
enum?
An enum (enumeration) is a type all its own. It’s a constant (of integral type) that you define. You can think of it as “an
integer with a name associated with it” because in code, you’ll use it like a multiple-choice selection and [typically] you’ll use its name.
Any time there’s a need for some something to be “this or that”, an enum very often is a useful type to use. In what we talked
about yesterday regarding what the source of the data is (CD or PC), that’s what came to mind; select which of the two from an enum. I always include a “_String” property with these so that it can later be used in whatever will consume the class. Often it’s
nothing more than use the .ToString method of the enum itself, but remember that then enum is actually an integer, not a string.
In this library so far, I have three enums defined. Two of those are in each of two interfaces (discussed in a bit) and one
is specifically related to only the music, so it’s in the class “Music”:
Public Enum MusicFrom
LP
EP
Compilation
End Enum
The “type” that I asked about earlier is encompassed in that enum and you can more or less see how it works without any further
explanation.
Do understand that enum is only ‘useful’ for programming. We could use strings for all that it matters, but the problem with
doing that are many, including things like typos and capitalization. That’s not the case with an enum because you select one of the choices offered. In the one above, that would be either LP, EP, or Compilation. It can’t be anything else.
So if strings have this issue with typo’s and the like, what about if we just assigned it a number (an integer). Sure that’s
a better idea but are you really going to remember what 23 means? I doubt it, or not for long.
BUT – if we had a number that has a string associated with it, yea that’s a good idea!
Right! Now you know what an enum is. ;-)
Notice from the
class
diagram though – it’s not shown; I’m not using it all and that’s because I question its worth here, at least
for the current setup. I’ll explain what I mean:
As it’s currently set up, the basic unit of the class “Music” is a song. Even though there’s a title for the album, the album
– as a type – doesn’t exist. LP, EP, and Compilation refer to the album, not the song (in my opinion here) so I don’t see how it can be used.
If, however, we create a new type called “Album”, then I can see how it could be used. In something I worked on a while back
that’s exactly how I have it set up: An album is a “container for songs” and the album (a class in what I’m referring to from a few months back) has certain properties like a name and cover art, etc..
I don’t have this set up that way, but give that some thought.
What is an
interface?
Until quite recently I ‘knew of them’ but I never used them. There may or may not be merit in it here either but I wanted to
expose you to them.
From that link above:
“An
interface defines a set of members, such as properties and procedures, that classes and structures can implement. The interface defines only the signatures of the members and not their internal workings.”
The interface is a way in which you create a ‘code contract’. You don’t define what the methods, properties and events do in
the interface – you define that they have to be implemented if a class uses it.
It’s up to the class to actually put it to use (i.e., the code that’s executed in the member of the interface).
It’s a lot deeper than I’m discussing here – including a fair amount of ambiguity – so I won’t go any further than that for
now.
I have two interfaces set up and I have them in the “Common” namespace. They are “IDataSource” and “IGenre”.
IDataSource has an enum named “SourceType” and two read-only properties (see it later in the code).
The interface IGenre is likewise set up the same way and that’s where the long list of elements are in the enum named “GenreType”
that I talked about earlier.
I think it’s a good idea with Genre that it’s a “pick one of these” rather than simply a string and here’s why: If we later
add in a method to choose songs from a collection of them, one of the options might be of a particular genre. That’s not an uncommon request I would think. By using an enum, we don’t have to worry about your users mistyping when they add the data:
RockAndRoll
Rock and Roll
Rock
…etc., and imagine some of the typos your users might come up with, so by using an enum it’s definitive rather than guessing.
I said that an enum is ‘only for programming though’ so we’ll need to make it more usable later on. For example, I can also
build in methods to hand you back a string array of the string equivalent of those enums and then later a method to turn that string back into the actual enum member. By doing this then the method(s) which will use this will filter the data from the collection
to only include those with that particular genre.
Other than something simple, I’ve learned that once you get involved in a really long enum – like the genre that I showed above
– it’s better to create a class which, all on its own, has methods for handing you the string array and then handling the conversion back to an enum, so that’s a possibility too.
That’s for use in your UI so the blinders will start to come off at that point. ;-)
Continued in a subsequent post…
Still lost in code, just at a little higher level. -
NaN as default value for LabVIEW numeric control
TestStand 2010 SP1, LabVIEW 2011 SP1
This may be a "feature" but I also may be missing something here.
Reproduce my issue doing this:
Create a VI with a numeric double. Set the value to NaN. Make that the default value. Connect it to the connector pane. Try and call it from TestStand. The prototype will not reload. Why? NOTE: it only works for controls and not indicators.
Not sure if it's related to this because that's in .NET: http://forums.ni.com/t5/Measurement-Studio-for-NET/NaN-as-default-value-for-a-numeric-edit-control/t...
We have hundreds of VIs with the default set to NaN. We started seeing this issue when we just upgraded to the latest dev suite.
Thanks in advance,
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~The prototype reloads fine in TestStand 4.2.1 and LabVIEW 2010, as you probably already knew.
In TestStand 2010, the problem is that it doesn't reload only when you set to NAN? Or does it never reload no matter what the numeric value is?
What is your logic for using NaN values? Are these values that are not used in tests? We have a suite of over 50+ tests and I have never used NaN values as inputs.
Thanks,
PH
Maybe you are looking for
-
MBP takes 10 mins to start & locks in desktop
Hi all I have the the 2.2GHz C2D MacBook Pro with the dreaded 8600GT in it. Got it off eBay unfortunately. When I first got it, it took about 10 minutes to boot into Snow Leopard and then would sit at the desktop for a further few minutes before I co
-
Hi, I am looking for a good audio player with the option to play MP3 and Flac files. I have tried FLAC player but its capability for organizing and editing files according to composers and musical works is very limited. Any help will be appreciated.
-
Issue in Partner Profile config for Outbound IDOC
Hi Experts, I have requirement like, When ever there will be any change in a Sales Order an Outbound IDOC will get triggered though a output type. This IDOC will save a file in the Application Server. The Message Type i am using is ORDERS and the Bas
-
Tried everything, what now?
Ok, I turned on my iPOD the other day and got the folder icon with exclamation point. I have tried to reset, reformat, and restore, all normally and in disk mode, nothing is working. I have re-installed iTunes and updated the iPod software. When I us
-
When we upgraded our SAPGUI to 640 (from I believe 620), we noticed one new feature. In the ABAP editor in display mode, if you press the find button (or CTL F), you get a popup that asks for the string and has two radio buttons for the direction (