if I've string like
"{ partner_name = test_partner}" OR " { partner_name : test_partner }
its an example string will be very complex with several special characters included like =, [ , ] , { , }
what will be the best way to convert it into a python object - so I can process it
I tried with eval but it requires " ' " for string, but how can we…
I am trying to print a double value in my java code. but it is printing in matissa and exponent format which I dont want to. ie
for example:
instead of printing 1234567 it is printing 1.234567E6
how to avoid that.
i have to convert 60px X 60px images to png for my web site with imagemagick.
convert image.jpg image.png
But it's return an image with 4kbyte size.
I want get a size around 1kbyte.
How can i do?
thanks
I am trying to create a formatter that will convert the date format shown to an NSDate object:
NSString *dateStr = @"2010-06-21T19:00:00-05:00";
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZ"];
NSDate *date = [dateFormat dateFromString:dateStr];
The issue is the timezone…
I am doing some input/output between a c++ and a python program (only floating point values) python has a nice feature of converting floating point values to hex-numbers and back as you can see in this link:
http://docs.python.org/library/stdtypes.html#additional-methods-on-float
Is there an easy way in C++ to to something similar? and…
I am selecting a query in sql server 2005
SELECT 'Region' AS ELEMENT,(SELECT GeographyName,GeoID from @tmpTable FOR XML RAW, TYPE) FOR XML RAW('Root')
This will give the output in xml as
<Root ELEMENT="Region">
<row GeographyName="East" GeoID="2" />
<row GeographyName="West" GeoID="3" />
<row…
Hi
can we assign null value to struct type of variable?
struct MyStruct
{
}
MyStruct var = null;
is this is possible in C# .net?
if not ? then how C# is allowing Nullable < T struct type of variable can be assigned as null?
Hi am trying to convert the following xml into object using Xstream parser.
I tried using the below code to convert the xml but am getting
Duplicate field ERRORS
---- Debugging information ----
field : ERRORS
class : com.avidev9.Fees.GCSFeesResponse$DebitsWSDS
required-type :…
Hi
I am interested by converting some code from C++ to C (mostly because i need to use the library with/from other C program and other language) . C is a better gateway for that
I am interested to replicate few C++ concept like inheritance for inst .
Does anyone know good references or has already work on…
Can anyone please help in convert amount from number to words international which should consider all conditions i.e. Billion, Trillion etc. in DB2 database
I may get killed for this but I have been trying for a few days using Prototype to show a hidden div when hovering over another div. I have this working fine in jquery but I could use some help porting it over to prototype.
The code sample:
<script type="text/javascript">
$(document).ready(function(){
…
Overloading __eq, __lt, and __le in a metatable always converts the returning value to a boolean.
Is there a way to access the actual return value?
This would be used in the following little lua script to create an expression tree for an argument
usage:
print(_.a + _.b - _.c * _.d + _.a)
->…
Does Scala provide a built-in class, utility, syntax, or other mechanism for converting (by wrapping) an Iterator with an Iterable?
For example, I have an Iterator[Foo] and I need an Iterable[Foo], so currently I am:
val foo1: Iterator[Foo] = ....
val foo2: Iterable[Foo] = new Iterable[Foo] {
def…
I have build a generic datacontainer and now I want to manipulate data depending on their type. However, I get an incompatable types warning. What am I doing wrong?
Type _Value;
public void set(Type t) throws Exception {
if (_Value instanceof Integer
&& t instanceof Integer) {
…
I have 1 NSMutableArray and I want to convert whatever data in array will be in NSString.
tell me code for that. Array is nothing but object of NSMutableArray class.
Hi all I am working on an accelerometer bma220 , and its datasheet says that data is in 2's complement form.So what i had to do was getting that 8 bit data in any 8 bit signed char and done.
the bma220 have an 8 bit register of which first 6 bits are data and last two are zero.
void…
Hi, I'm building a Rails app that does conversion tracking on outside sites. I'd like to allow users to paste an image tag in their conversion pages (like AdWords), and whenever that image is requested, a conversion registers in my app.
respond_to do |format|
if @conversion.save
…
I need to know this Batch Script into Bash :
@echo off
set /p name= Name?
findstr /m "%name%" ndatabase.txt
if %errorlevel%==0 (
cls
echo The name is found in the database!
pause >nul
exit
)
cls
echo.
echo Name not found in database.
pause >nul
exit
I am new to the Linux…
I have a strange runtime error in my C code. The Integers comparison here works fine. But in the Decimals comparison, I always get that the second number is larger than the first number, which is false. I am pretty new to C and programming in general, so this is a complex…
My app uses sql2000 and a select statement it uses will sometimes fail. Once a week or so the select returns the error
'Error Converting data type varchar to numeric'
SQL:
sum(case when ISNULL(form_prsn_id, -1) = irpd_prsn_id
then…