Why assertion instead of if statement ? Which is better to use ?
Why assertion instead of if statement ? Which is better to use ?
Never assertion instead of if statement. The two have fundamentally different intents. Using assert to control program flow is a bad idea
Similar Messages
-
Which is better to use spotlight or finder
I have been a Mac user for six years. Still, I am unsure how to find things most easily on my computer. I was searching for a folder I knew I had, using its exact name in Finder, and I could not locate it. I used it in Spotlight and found it right away. I've not used Spotlight too much, but should I use that instead of Finder?
No rule on which is better to use, I suppose it is matter of preferences.
You can certainly expand or restrict what Spotlight searches (indexes) for you via Spotlight's preferences.
Here is a good free app that IMHO does a good job, EasyFind, at finding contents along with file names quite well.
https://itunes.apple.com/us/app/easyfind/id411673888
from this group
http://www.devontechnologies.com/download/products.html -
Which is better to use in a corprate enviornment for back up Windows 2008 Vs. Mozy
Which is better to use in a corprate enviornment for back up Windows 2008 Vs. Mozy
Hi,
Microsoft provide the built-in backup utility Windows Server Backup to backup Windows server 2008. For more detailed information, please refer to the articles below:
Windows Server Backup Step-by-Step Guide for Windows Server 2008
http://technet.microsoft.com/en-us/library/cc770266(v=ws.10).aspx
Save big bucks without risk: Get the most from Windows Server 2008 Backup Utility
http://www.techrepublic.com/blog/data-center/save-big-bucks-without-risk-get-the-most-from-windows-server-2008-backup-utility/
Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
For Microsoft does not provide any third party software, you need to check with the third party software yourself.
Regards,
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
TLFTextField or TLF, which is better to use in CS5?
Hi,
I have been developing content using TLF with CS4 and in Flash Builder. Recently when I switched to CS5, there was this cool TLFTextField. So now I wonder, TLFTextField or TLF, which is better to use in CS5? Almost all of my text will be dynamically generated. Please share your thoughts - possibly with pros and cons.
~ ShiyazI assume you've found TLFTextField in Flash Pro (I can't remember if Flash Builder made a TLFTextField class or not). Anyway, if you're considering using Flash Pro, here's some background on the TLFTextField class:
This class was created primarily for backwards compatibility with Classic Text coding. If you used Flash Pro CS 4 or earlier versions, and you wrote ActionScript for your text objects, you were using TextField objects. So, when you upgraded to CS 5, and you decided to convert all your old Classic text objects to the new TLF objects, all your code would have broken were it not for TLFTextField class. TLFTextField implements the TextField API so that your existing TextField code can be used in the TLF environment.
So, if you're an ActionScript programmer who is already comfortable programming using the TextField API, it certainly makes sense to continue doing so but using TLFTextField objects. However, if you want to take advantage of the new TLF features, the old API doesn't really give you the ability to do that. So, the TLFTextField provided a new API:
function get textFlow():TextFlow;
The TextFlow class is the top level class of the TLF model objects. Using that object, you can then set attributes on your text just as if you were working with TextFlow in Flash Builder. So, in essence, TLFTextField provides backwards compatibility, continued use of the familiar API set, and access to the TextFlow model class.
Another nuance to be aware of is that if you choose to embed fonts, TLF requires the newer "DF4" (for DefineFont4, based on the SWF Tag name) vs. the older "DF3" fonts that TextField requires. For text on the stage, Flash Pro will do all the tricky work for deciding when to embed DF3 and when to embed DF4 fonts, but just be aware that mixing Classic text and TLF text when using embedded fonts can cause a "double tax" on your SWF size because it may embed the same font both as DF3 and DF4.
Good Luck!
Rusty -
Which one better to use - jsp:useBean or import statement
Hi,
I just want to know that which one is better to use jsp:useBean or import statement .
I can instantiate and call method of myclass -
1) by importing the class through import tag in jsp as <%@page import="myclass"%. or
2). by using <jsp:useBean tag....
i have these two option to do the same thing. i know that basically useBean is used to call setter and getter method of bean class and but it can be used to call a normal java file that have some logic .
so what should i used , which one is better and why?
useBean provides scope and object instance so no need to create object by new operator. and with import you have to create an instance .
but which tag should i use in my jsp?
i am confused???ok, means i can use jsp:useBean tag for all my
classes that are not actually bean. so it will be
instantiated at run time and provide efficiency .No. Jsp:useBean is used for java bean components.
>
but when should i use import statement in my jsp and
it happen at translation time so will it create any
type of burden for my code if i import multiple
classes.For non-java beans, you need to import the classes, period.
It's not a burden, it's a necessity. -
Which is better to use: BEx query or Web Application as an iView in portal?
Hi gurus!
Are there any experienced opinions, which is better - publish a BEx query in portal or publish a BEx Web Application in portal? Is it easier to alter the layout attributes etc. if I create a BEx Web Application first before publishing?
What is the way of fixing for example filter item height if I publish BEx query in portal - is there a Web Application that it uses anyhow which I can fix? Or can I use in that case iView -properties in portal?
Thankful for advice
Sariok, means i can use jsp:useBean tag for all my
classes that are not actually bean. so it will be
instantiated at run time and provide efficiency .No. Jsp:useBean is used for java bean components.
>
but when should i use import statement in my jsp and
it happen at translation time so will it create any
type of burden for my code if i import multiple
classes.For non-java beans, you need to import the classes, period.
It's not a burden, it's a necessity. -
Which is better to use Store Procedure or Views in Crystal Reports ?
Hi,
which one is more better to use Store Procedure or Views in Crystal Reports ?
Thanks.It depeneds on the requirement. Well, but from performance point of view as u know that stored procedures are already compiled on DB side, they would be more efficient. Views are handled differently. Here CR has nothing to do with it.
But if the stored procedure u r using is having 2 Select statements, CR will only display the results from the first select statement. In that case you need to use Views as one can use more than one views in the report and join them.
Using a Generic view which is created by the DBA for a larger audience will result in performance issues meaning if a View "V" has 25 fields and View is based on 5 tables and ur report is using only 5 fields which are coming only from 2 tables inside the view,in this case u will end up in joining 3 more tables unnecessarily.
Hope this helps! -
Jsf and applete-which is better to use to design recruitment intranet
Hi,
I'm interested in enhancing my skills on developing standard interface for my company.
Pls, Is it possible to design standard interface like the ones in accounting software with jsf. Or is better to use appletes
EmekaHere's a sample:
Global Variables
* Define structure for internal table
TYPES: BEGIN OF ty_zsd_ds03,
doc_number TYPE /bi0/oidoc_number,
fiscvarnt TYPE /bi0/oifiscvarnt,
ord_reason TYPE /bi0/oiord_reason,
END OF ty_zsd_ds03.
* Define internal table
DATA: t_zsd_ds03 TYPE SORTED TABLE OF ty_zsd_ds03
WITH NON-UNIQUE KEY doc_number fiscvarnt.
* Define work area
DATA: wa_zsd_ds03 TYPE ty_zsd_ds03.
Start Routine
SELECT
doc_number
fiscvarnt
ord_reason
FROM
/bic/azsd_ds0300
INTO TABLE
t_zsd_ds03
FOR
ALL ENTRIES IN source_package
WHERE
doc_number = source_package-doc_number
and fiscvarnt = source_package-fiscvarnt.
DELETE
ADJACENT DUPLICATES
FROM
t_zsd_ds03
COMPARING
doc_number
fiscvarnt.
Characteristic Routine
READ TABLE
t_zsd_ds03
INTO
wa_zsd_ds03
WITH TABLE KEY
doc_number = source_fields-doc_number
fiscvarnt = source_fields-fiscvarnt.
IF sy-subrc EQ 0.
result = wa_zsd_ds03-ord_reason.
ELSE.
CLEAR result.
ENDIF.
If you have multiple targets, then do the READ TABLE statement inside the LOOP AT results_package ASSIGNING <result_fields> statement. If it's successfuly, then you'd populate the wa_zsd_ds03-field, in this example, into <result_fields>-field if successful or CLEAR (initialize) the value in <result_fields>-field. -
Import Statement - Which is Better ???
Which import statement is better? Are there any performance advantages of calling the ones you need explicitly instead of using the shorthand (.*)?
import java.util.*
or
import java.util.Vector;
import java.util.TreeMap;there is no runtime performance difference. There could be a difference in compliation time if you use wildcards, but even that difference would probably be insignificant (plus, is compile time usually a concern in java?). The main advantage to importing only the classes you need, as the previous poster pointed out, is to reduce compilation ambiguities (e.g. does 'Date' refer to java.sql.Date or java.util.Date). For example, a recent poster just reported a problem where he imported java.beans.* and java.sql.* and, after upgrading to 1.4, none of his code compiles because both packages now have a Statement class, which causes ambiguities. As a general rule, it is best to import only the classes you need.
-
Which is better to use? connection.close() or connection = null
Hi,
can anybody let me know what is the difference between the following statements when intended to end the usage of it?
finally{
try{
if(con != null){
con.close();
}catch(Exception e){
System.out.println("Error in closing connection");
}OR
finally{
con =null;
}also can i set NULL to Resultset or Prepared statement instead of close() method?
Please let me know what will be the difference in each case.
Thanks in Advance.Doing this is a BAD idea.
finally{
con =null;
}It's likely to cause your application to completely stop working after a certain number of connections have been acquired and subsequently leaked.
Always make sure that all database connections are closed after use under all circumstances. -
Template or Stationery? Which is better to use for building pages?
I'm going to start building my tier 2 and tier 3 pages, and want the nav bar on every page to update with the new tier 2 pages that I add.
Will a template or stationery page update the nav bar? The content will change on each page, but as I add the tier 2 pages, those will become part of the navigation bar throughout the site. How do I do this, or maybe the better question is...which should I use, a template or stationery?
I'm using GoLive 6.
Thanks,
Kirstyn SierraNAVIGATION AS A COMPONENT:
Basically, you build your navigation into a separate file that only has the navigation links and save it as a Component. Then, in your site pages, you drop in the Component into the page where needed. Later, if you add a page, you add the link to your Component, which then goes through all the pages you dropped the Component into and updates them to match what you just saved. You then re-upload all your modified files so the copy online matches.
SITE TEMPLATE:
You build the entire page design template structure, putting everything where you want. You define "editable" regions in the template for the content that changes with every page (the main body content - basically everything except the basic structure and navigation) and save it into GoLive's Templates folder. You make new pages based on the template, and everything's locked except the part(s) that change on every page. You add the page-specific content to the editable region and save. Later, if you make a change on the master Template file, those changes are copied by GoLive into any page based on that template, but it ignores the "editable" regions so as not to override the page-specific content.
Either way you go, you'd need to read the manual for your version of GoLive for the specifics on how to set up Templates or Components (and post back here if you run into questions). I don't have a copy of GoLive 6 installed, so can't spout the details off the top of my head :-) -
Which is better to use in alv functions or oops concept
hi,
actually some people are using function modules
and some are using oops concept
which one is better
could anybody suggest
thanks,
kalyanI assume you've found TLFTextField in Flash Pro (I can't remember if Flash Builder made a TLFTextField class or not). Anyway, if you're considering using Flash Pro, here's some background on the TLFTextField class:
This class was created primarily for backwards compatibility with Classic Text coding. If you used Flash Pro CS 4 or earlier versions, and you wrote ActionScript for your text objects, you were using TextField objects. So, when you upgraded to CS 5, and you decided to convert all your old Classic text objects to the new TLF objects, all your code would have broken were it not for TLFTextField class. TLFTextField implements the TextField API so that your existing TextField code can be used in the TLF environment.
So, if you're an ActionScript programmer who is already comfortable programming using the TextField API, it certainly makes sense to continue doing so but using TLFTextField objects. However, if you want to take advantage of the new TLF features, the old API doesn't really give you the ability to do that. So, the TLFTextField provided a new API:
function get textFlow():TextFlow;
The TextFlow class is the top level class of the TLF model objects. Using that object, you can then set attributes on your text just as if you were working with TextFlow in Flash Builder. So, in essence, TLFTextField provides backwards compatibility, continued use of the familiar API set, and access to the TextFlow model class.
Another nuance to be aware of is that if you choose to embed fonts, TLF requires the newer "DF4" (for DefineFont4, based on the SWF Tag name) vs. the older "DF3" fonts that TextField requires. For text on the stage, Flash Pro will do all the tricky work for deciding when to embed DF3 and when to embed DF4 fonts, but just be aware that mixing Classic text and TLF text when using embedded fonts can cause a "double tax" on your SWF size because it may embed the same font both as DF3 and DF4.
Good Luck!
Rusty -
Which is better?Using standardised BAPI directly or creating different BAPI
Hello all
I need to get a Customer record .Here iam using bapi BAPI_GETCUSTOMER_DETAIL . So shall i use the standardized
BAPIi in my programme directly or create a different RFC using the standard one.
Which one is a better option to follow?
Thanks in advanceHi leo,
yes you can call bapi's from a java file ..
Sample code of how to do it can be found on help.sap.com ..
The link for the same [LINK|http://help.sap.com/saphelp_46c/helpdata/en/76/4a42f4f16d11d1ad15080009b0fb56/content.htm]
regards
Manthan. -
Which is better to use Shell Script or Alerts in OMS
HI
This is a point of confusion for me to decide that for monitoring the databases what should be used the Alerts Set in the Management Server or Shell scripts .
May I have your valuable suggestions with reason for supporting the suggestionOn the other hand, if you want is the basic/simple stuff (which should be true for most cases), I woule recommend using the standard alerts coming with OEM. One less thing to maintain. Though not pretty, but usable.
-
Paper or web layout which is better to use?
Hi again,
I am opening a new report using the wizard and it prompt me to: "choose the type of layout you want to generate"
a.) create both web and paper layout
b.) create web layout only
c.) create paper layout only
My question is when do I use web or paper layout? What is the use of each type or its advantage?
Thanks a lotHello,
http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_run.htm#i1008534
13.3 Deploying Your Reports
Once you've created your report, you can deploy it so that end users can view it.
This section describes how to deploy a report with a paper layout (that is, REP, RDF, XML, or JSP report) and how to deploy a report with a Web layout (that is, a JSP report).
Regards
Maybe you are looking for
-
I recently moved pictures from my ipad to my iphoto library on my Macbook Pro computer. I want to now use these photos to sell on EBay. What are the steps I need to do to move these from one place to the other. This needs to be in laymans terms as my
-
Re: Global Variables (what! More?!?)
[email protected] writes: One problem with using service objects for global variables is the flat namespace they expose.I thought that was the definition of a global variable. I could find no sanctioned way to provide a NameSpace that was global only
-
Where did my Entourage e-mails go? Help!!
A couple of days ago I exported a couple of thousand Entourage e-mails from one MacBook Pro to a newer one. When I imported, they all showed up in the "Received Today" folder since they were sent that day. But they were not in the inbox or outbox as
-
There appears to be a Time canvas attached to the Calendar popup....how does one use this?
-
Trying to do a simple analog out in LabView8 imported form LV7
I have a PCI-6733 DAQ board and I can set it's analog outputs in 'Measurement and Aquisition' so I know the hardware is working correctly. I can also create a simple VI in labview 7 to set those analog outputs. However, I dont' see any of the same