What is the best was to determine if an NSString is empty? Right now I am using the following:
if (string == nil || [string isEqualToString:@""]) {
// do something }
Thanks for any advice.
Hi Guys I have this Table
I need to replace the First Letter in ACCT_NAME with the First Name of ACCT_SHORT_NAME. Records like the Higliighted(RAFFMAN) should not be changed. I have tried:
select acct_name, ACCT_SHORT_NAME,replace(acct_name, substr(acct_name, 1, 1), ACCT_SHORT_NAME)
from tbaadm.gam where schm_type = 'TDA' and rcre_user_id = 'SYSTEM' and substr(acct_name,2,1) = ' '
I am getting:
This means that am Picking the whole value in ACCT_SHORT_NAME. WHat is the best way to do what am trying to do?
more file
param1=" 1,deerfntjefnerjfntrjgntrjnvgrvgrtbvggfrjbntr*rfr4fv*frfftrjgtrignmtignmtyightygjn 2,3,4,5,6,7,8,
rfcmckmfdkckemdio8u548384omxc,mor0ckofcmineucfhcbdjcnedjcnywedpeodl40fcrcmkedmrikmckffmcrffmrfrifmtrifmrifvysdfn drfr4fdr4fmedmifmitfmifrtfrfrfrfnurfnurnfrunfrufnrufnrufnrufnruf"**
#
need to match the content of param1 as
sed -n "/$param1/p" file
but because the line length (very long line) I cant match the line
what’s the best way to match very long lines?
I'd like to write small scripts which feature incremental search (find-as-you-type) on the command line.
Use case: I have my mobile phone connected via USB, Using gammu --sendsms TEXT I can write text messages. I have the phonebook as CSV, and want to search-as-i-type on that.
What's the easiest/best way to do it? It might be in bash/zsh/Perl/Python or any other scripting language.
I have been looking around at different ways to connect to URLs and there seem to be a few.
My requirements are to do POST and GET queries on a URL and retrieve the result.
I have seen
URL class
DefaultHttpClient class
And there were some others in apache commons
which method is best?
Is there a best-practice when it comes to where to put the logging functionality in an MVC application, for example a Zend Framework application (Zend_Log)? Should I put the logging in the controller or in the model? Or in both?
If in both, should they have the same logger or a separate one?
Well, I'm pretty much trying to figure out how to pull information from a webpage, and bring it into my program(in Java). For example, if I know the exact page I want info from, for the sake of simplicity a Best Buy item page, how would I get the appropriate info I need off of that page? Like the title, price, description? What would this process even be called? I have no idea were to even began researching this :'(
Windows XP, IE 7
If the data in one of the column in table is more than say 800 bytes, it seems to print partial pages. Previews also appears same (span into multiple partial pages).
What is the best way so that large number of rows with wide coulumns (fixed width) are printed properly without giving blank or partial page.
Used table with thead and colgroup with width in 14%.
I'd like to learn database applications in C# and I'm about to select some framework. I heard many recommendations of NHibernate, however I haven't decided yet.
Anyway, I'd like to know if there's any real-life example (with sources) of NHibernate in C#, to learn best practices etc.? I know all of them are probably covered in the docs, but working example helps a lot understanding the proper development pattern.
I want to run my ruby script x times a day (the number might change) on my linux box. What would be the best way to do so if I do not what it happen at the same time? I want the time (hour and minute) to be random
I am trying to fumble through python, and learn the best way to do things. I have a string where I am doing a compare with another string to see if there is a match:
if paid[j].find(d)>=0:
#BLAH BLAH
If 'd' were an array, what is the most efficient way to see if the string contained in paid[j] has a match to any value in 'd'?
My WebApp needs to authenticate user before allowing any sort of access. The scenario I'm trying to implement is a login page with username and password fields. Once user hits "send" button, a sign like "Verifing..." should be shown up while an RPC call verifies credentials. In case of success, load the main app screen.
What is the best way to implement that?
What is the best way to export a gridview into an Excel spreadsheet? This seems easy
except that my Gridview doesn't have an export attribute. What is the quickest way to do this?
hi
my users upload photo and all uploads recorded in mysql with the date info. i want to limit uploads by the months. user may just upload 3 pics in a month. what is the best way to do this ?
cheers
Considering the fact that all applications will interact with the web project (which will use the cloud or web services)..
Is there any way to share my class models between applications?
If yes, what is the best way to do it?
About sending / receiving data from the Webservice, serialize and deserialize, how can I do this in a simple way without having to manually populate the objects?
Any information about this applications would be really helpful!
I'm trying to resolve a reflection warning in Clojure that seems to result from the lack of type inference on function return values that are normal Java objects.
Trivial example code that demonstrates the issue:
(set! *warn-on-reflection* true)
(defn foo [#^Integer x] (+ 3 x))
(.equals (foo 2) (foo 2))
=> Reflection warning, NO_SOURCE_PATH:10 - call to equals can't be resolved.
true
What is the best way to solve this? Can this be done with type hints?
Hi,
I have a simple Ruby on rails application that I want to integrate with an existing php website. I only want that users who's been authenticated by the php application would have access to my Ruby on Rails application (it should appear to the user as the same website, in the same domain, though it can be a different sub-domain if I chose to)
What's the best way to do that?
Thanks for the help,
Li
I am trying to get the src of all of the images in a page. But some pages use absolute paths and some do not. So I am wondering whats the best way to do this?
right now I am using this.
$imgsrc_regex = '#<\s*img [^\>]*src\s*=\s*(["\'])(.*?)\1#im';
preg_match_all($imgsrc_regex, $html, $matches);
i have two select using as a dropdownlist for country/state
everything works as i expected but when i do a postback then i lost the values from the above what is the best way to retain the values and can you show me with an example please?
thanks.
Hi All,
Does anyone have a resource for C++ memory optimization guidelines? Best practices, tuning, etc?
As an example:
Class xxx {
public:
xxx();
virtual ~xxx();
protected:
private:
};
Would there be ANY benefit on the compiler or memory allocation to get rid of protected and private since there there are no items that are protected and private in this class?
Each of my users has a (possibly) different TZ defined in their .bashrc. I have a Perl script that displays date/time and want it to have it display with their profile time zone.
Does anyone know the best way to do this?
Hello:
I listen much about new Microsoft terminologies such as WPF, WCF, WWF, ASP.NET MVC, Silverlight, entity framework, LINQ. I would like to see in a visual map:
1) how these products interrelate
2) Which are complements of which.
3) Order of priority to learn
I think all the names that I mentioned, together with the use of Visual Studio applies to web developments.
I need a good answer to guide my efforts of Web development in the best way.
Thanks.
Does anybody know any module in Python that computes the best bi-partite matching?
I have tried the following two:
munkres
hungarian
However, in my case, I have to deal with non-complete graph (i.e., there might not be an edge between two nodes), and therefore, there might not be a match if the node has no edge. The above two packages seem not be able to deal with this.
Any advise?