Hi!
Is there a straightforward way of determining the number of decimal places in a(n) integer/double value in PHP? (that is, without using explode)
Thanks,
Erwin
Can one please explain with example what does $obj-$a()-$b mean? I've used PHP OOP quite a long time and have seen in some places this structure and not just this $obj-$a(); In what cases should I use it?
Thanks in advance!
Creating a Drawable that is completely empty seems like a common need, as a place holder, initial state, etc., but there doesn't seem to be a good way to do this... at least in XML. Several places refer to the system resource @android:drawable/empty but as far as I can tell (i.e., it's not in the reference docs, and aapt chokes saying that it can't find the resource) this doesn't exist.
Is there a general way of referencing an empty Drawable, or do you end up creating a fake empty PNG for each project?
Hi,
our Webpage:
http://www.checkdent.com/mobile/sv.php?id=12332181087788749
looks fine on Android G1, but comes resized on the Google Nexus
(higher resolution)
Half part of the Page is outside of the View!
I implemented as mentioned at several places the:
target-densityDpi=device-dpi
< meta content="minimum-scale=1.0, width=device-width, , target-
densityDpi=device-dpi, maximum-scale=0.6667, user-scalable=no"
name="viewport" /
it works great within the 'android browser' but in my Webview
Application it still resize!!
What can i Do?
Regards Chris
Silly question, I want to format an integer so that it appears with the 1000's separator (,), but also without decimal places and without a leading 0.
My attempts so far have been:
String.Format("{0} {1}", 5, 5000); // 5 5000
String.Format("{0:n} {1:n}", 5, 5000); // 5.00 5,000.00
String.Format("{0:0,0} {1:0,0}", 5, 5000); // 05 5,000
The output I'm after is:
5 5,000
Is there something obvious that I'm missing?
I'm working with a time sensitive desktop application that uses p/invoke extensively, and I want to make sure that the code is not wasting a lot of time on CAS stackwalks.
I have used the SuppressUnmanagedCodeSecurity attribute where I think it is necessary, but I might have missed a few places. Does anyone know if there is a way to monitor the number of CAS stackwalks that are occurring, and better yet pinpoint the source of the security demands?
I have an israeli spreadsheet reading right to left. When I read the values (using VBA) it places a question mark (?) at the beginning and end of the text, in other words it wraps the text with the question mark (ie ?0123456?).
If you type Range("A2").value or .value2 or .text the results are the same.
Any idea on how to prevent this?
While perusing an application that I'm documenting, I've run across some examples of bang notation in accessing object properties/methods, etc. and in other places they use dot notation for what seems like the same purpose.
Is there a difference or preference to using one or the other? Some simple googling only reveals limited information on the subject with some people actually using it in opposite cases. Perhaps there is a coding standards section from MS somewhere that indicates the method of madness?
Closures are poor man's objects and vice versa.
I have seen this statement at many places on the web (including SO) but I don't quite understand what it means. Could someone please explain what it exactly means?
If possible, please include examples in your answer.
Thanks.
string listOfItemPrices = items.ToSemiColonList(item = string.Format("{0:C}", item.Price.ToString()));
I am simply trying to format the price here to 2 decimal places. Ok, so the string.Format doesn't implement IFormattable? Ok not sure how to get around this so that I can format the decimal (price) here.
Hi, I'm trying to use libsox into another program of mine, but I can't seem to compile libsox with MinGW or find any places with working binaries. I downloaded the source from the official site http://sox.sourceforge.net/ but I don't know which files to include in the project to compile it. I can't compile it with all the files included in the 'src' directory and I think I only need to compile the functions listed here: http://sox.sourceforge.net/libsox.html but I can't seem to find it. Can anyone help?
I used this DQL in Doctrine
$q->update('product')
->set('quantity','?')
->where('id=?');
$q->execute(array(20,5));
I check the server for the query and this the generated sql
UPDATE product SET quantity = '20', updated_at = '5'
WHERE (id = '2010-04-26 14:34);
So I need to know why the arguments aren't in the correct places?
In terms that an OOP programmer would understand (without any functional programming background), what is a monad?
What problem does it solve and what are the most common places it's used?
I read it in lots of places including here that it's better to make structs as immutable.
What's the reason behind this? I see lots of Microsoft-created structs that are mutable, like the ones in xna. Probably there are many more in the BCL.
What are the pros and cons of not following this guideline?
Hi guys I'm retrieving emails and some of my emails have utf encoded text. However even though my page is encoded as utf 8 - in some places when I try to out put utf text I get funny characters like :
=?utf-8?B?Rlc6INqp24zYpyDYotm+INin2LMg2YXYs9qp2LHYp9uB2bkg2qnbjCDZhtmC?=
=?utf-8?B?2YQg2qnYsdiz2qnYqtuSINuB24zaug==?=
Whereas in other areas of the same page it displays fine. WHats going on?
Anyone know the right places to hook into ghostscript, so that when interpreting a ps file, I can get logs of all calls of the form:
draw_character(float x, float y, string font_name, int char_id); ?
Basically I want to take a postscript file, and get a list of where all characters are drawn to the screen.
Thanks!
Are there any tech recruiters who specialize in international placement? Any websites? I've looked around on Craigslist, but it seems like a lot of the ads in English are for American companies looking to outsource to remote workers. This doesn't seem like something that would help me.
What are some good places to start?
I've written a simple JS function that places the cursor at the end of the contents of an input box when it receives focus (the most common action in the box being to append). I haven't checked in IE, but when there is more text than is visible, even moving the cursor to the end of input doesn't scroll the view to the end of input in firefox 3.6.
Any idea how to do this?
P.S. And no I'm not using JQuery, nor is it an option ;)
1) Refcounted pointers need stack variables to have constructors / destructors called at predictable places.
2) Objective-C, afaik, does not support the above.
3) The cocoa libraries are bound in Objective-C, not C++.
Thus, my question: is there a easy way to use the Cocoa libraries, yet still have most of my app in C++ (and thus use my refcounted pointers)?
Thanks!
(iPhone in the title since this is mainly targeted at the iPhone)
Hi all,
In my project I have seen that at many places developer has just nullify the DataReader object after use and hasn't close or dispose..
I want to know the advace effect of doing so, I mean nullifying the datareader and not closeing them.
Thanks and Regards,
Tanmay.
I am passing variable to template in web.py and have the same condition in some places. Like this:
$if myvar=="string1":
$passed argument1
............
$if myvar =="striung2":
$passed argument2
If say myvar is "string1" and I pass passed = "AAA" then I have AAA argument1 on my page, but the other if statements get replaced by empty string?
How to avoid that? I.e. how to leave other statements intact?
We're getting the error "The user does not have permission to perform this action" during times of heavy load (regularly, when a trim job occurs). The error clears up when the service accessing sql server is restarted, so it's obviously not a real permissions problems.
There's a possibility that the problem is occurring when we're trying to query
dm_tran_active_transactions and sys.dm_tran_session_transactions.
Any ideas of good places to start looking?
thanks for any insights...
I'm still pretty new to using Autofac and one thing I miss in the documentation and examples is how to make it easy to get to the configured container from different places in a web application.
I know I can use the Autofac controller factory to automatically resolve constructor injected dependencies for controllers, but how about the other stuff you might need to resolve that is not injected yet.
Is there an obvious pattern I am not aware of for this?
Thank you!
Hi,
Is it possible, by using ANT, to create 1 war-file out of two separate eclipse java web application projects? Besides from just copying the right files to the right places i would have to be able two create one single web.xml. Also some other files that exists in both projects should be united into one file.
Thanks
Pich
Where are the most common places where you've gotten an org.hibernate.LazyInitializationException in Grails, what was the cause and how did you solve it ?
I think this one exception comes up a lot for novice, so if you'd provide more examples, it would be great.