Is there an easy way to present time (hh:mm) as a decimal value?
Example, 01:08 should become 1,13.
I have an asp:textbox masked (ajax) as time with the mask format "99:99". Next to this box I need to present the entered value as decimal.
<asp:TextBox ID="time" runat="server" /> hh:mm ([time in decimal format])
<ajaxToolkit:MaskedEditExtender runat="server" Mask="99:99" TargetControlID="time" MaskType="Time" />
Hello,
I recently found this very interesting article on APNS and Emoji characters: EASY APNS - Just for fun
It contains a list with all supported Emojis. However, I couldn't get them to display in my push notifications. All I get is the code, not the image. For example, if I add \ue415 (a smiley) to my message, I never see the image, just the code.
Any idea what I'm doing wrong?
Thanks in advance.
I am developing a my application on rails.It has 400 or more models.
And some model contains more than 200 rows just for relationships.
so it's too hard handle it.
Is there any ways i can handle my application more proper and easy ways.
I am trying to make an AJAX call from several domains to a single one which will handle the request. Enabling Cross domain in Firefox and Chrome was easy by setting the header on the handling server:
header("Access-Control-Allow-Origin: *");
But this doesn't help enabling it in Internet Explorer. When I try:
httpreq.send('');
it stops with error Access denied.
How can this be enabled in Internet Explorer?
I have an application which uses a javascript based rules engine. I need a way to convert regular straight quotes into curl (or smart) quotes. It'd be easy to just do a string.replace for ["], only this will only insert one case of the curly quote.
The best way I could think of was replace the first occurrence of a quote with a left curly quote and every other one following with a left, and the rest right curly.
Is there a way to accomplish this using javascript?
Unix configuration files come in all shapes and forms. I know that Webmin has a Perl API that makes it easy to parse and modify most common configuration pro grammatically, while preserving changes that might have been made by hand.
Are there any other libraries that has similar functionality, perhaps for other languages (Python, Ruby, C, C++, etc)?
Good Day,
I need to determine which version of Microsoft Excel is installed on a Windows PC. I'm working with Apache POI but can't figure out an easy way to do this.
Anyone know if Apache POI has a built in functionality to do this? Any ideas how to do this using Java code?
Thanks in advance.
I have a bunch of zip files I want to unzip in Linux into their own directory. For example:
a1.zip
a2.zip
b1.zip
b2.zip
would be unzipped into:
a1
a2
b1
b2
respectively. Is there any easy way to do this?
Hi,
I would like to get all combination of a number without any repetation.
Like 0.1.2, 0.2.1, 1.2.0, 1.0.2, 2.0.1, 2.1.0.
I tried to find an easy scheme but couldn't find so I drawed a graph/tree for it and this screams to use recursion.
But I would like to do it without, if this is possible.
So could anyone please help me how to do that?
Thank you in advance,
Andreas
Hi all,
I have an associative array in awk that gets populated like this...
chr_count[$3]++
When I try to print my chr_counts I use this:
for (i in chr_count) {
print i,":",chr_count[i];
}
But not surprisingly, the order of i is not sorted in any way.
Is there an easy way to iterate over the sorted "keys" of chr_count?
This is probably easy, but I'm trying to convert from a source which provides colors in RGB strings to an output in BGR strings in Java. I've been busting my brain and time on shifting and Long.decode and Long.toHexString.
Feel free to also throw alpha values in there (RGBA - ABGR), though I think I can extend the principles.
Im after a plugin to do autocomplete like facebook does in that you can select multiple items - similar to how tagging a stackoverflow question works.
Here are a couple I ran into:
http://wharsojo.wordpress.com/2008/02/18/jquery-facebook-autocomplete
http://www.emposha.com/javascript/fcbkcomplete.html
http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/
Have you tried any of these? Were they easy to implement and customize?
Hey guys,
I want to use the value of an objects property to name the property of another object. Easy to do in PHP:
$object1->property = 'name';
$object2->{$object1->property} = "value";
echo $object2->name; //outputs "value"
But in Javascript I can't figure out how to do this. The curly braces are used a different way.
Anyone know the php equivalent in javascript?
Thanks :)
I have a plan to make a game using OpenGL for 3D world view, and CALayer(or UIView) for HUD UI.
It's easy to imagine performance degrade from mixing them, but the document which mention this impact disappeared: http://developer.apple.com/iphone/library/technotes/tn2008/tn2230.html
I cannot find the document on current version of SDK reference.
And I got this document: http://gamesfromwithin.com/gdc-2010-the-best-of-both-worlds-using-uikit-with-opengl
If you experienced about this, please let me know about performance impact on current SDK.
I have an double array
alist[1][1]=-1
alist2=[]
for x in xrange(10):
alist2.append(alist[x])
alist2[1][1]=15
print alist[1][1]
and I get 15. Clearly I'm passing a pointer rather than an actual variable... Is there an easy way to make a seperate double array (no shared pointers) without having to do a double for loop?
Thanks,
Dan
Hi.
Extending methods to any instance is really easy:
public static string LeaveJustNumbers(this string text)
{
return Regex.Replace(text, @"[\D]", "");
}
...
string JustNumbers = "A5gfb343j4".LeaveJustNumber();
But what if i want to extend methods to a sealed class like string, to
work like:
string.Format("Hi:{0}","Fraga");
Is there any way to do it?
Hi,
I'm having trouble customizing the way GXT's grid elements appear.
there are a few things I'd like to do and I simply don't know how.
No column head fields.
separate font size, color, type, etc. by column or by rows
Can anyone posy me easy how to please?
Hi,
I would like to provide two buttons that will zoom in and out in my silverlight application.
Basically, I would like them to do exactly the same as clicking Zoom In and Out via the browser. (Or holding CTRL and scrolling the mouse wheel).
Is there an easy way to do this or will it be easier to use Scaling?
Regards,
Lloyd
Hi,
I have some input like this:
" aaaaa bbb \n cccccc\n ddddd \neeee "
And I need to sanitize it like this:
"aaaaa bbb cccccc ddddd neeee"
Basically:
Trim all blank spaces at the beginning and end of the string
Strip all new lines
Strip all spaces when there is more than one, but always leave ONE space between words
Is there any easy way to do this or I'll have to process the string, char by char and copy the appropriate chars to a different variable?
Hi,
I would like to get all combination of a number without any repetation.
Like 0.1.2, 0.2.1, 1.2.0, 1.0.2, 2.0.1, 2.1.0.
I tried to find an easy scheme but couldn't find so I drawed a graph/tree for it and this screams to use recursion.
But I would like to do it without, if this is possible.
So could anyone please help mw how to do that?
Thank you in advance,
Andreas
I use ToolBar for my WPF application. As I understand, there is no easy way to make it floating. I just want to remove element which I don't want to be displayed: several dots in the left side of ToolBar. Is there any Properties to customize view of ToolBar? Or, maybe, it's possible to redefine a ToolBar Template?
I need some with help with PowerShell, please. It should be pretty easy:
I have a list of subdirectories, with a xml file in each one. I want to open each xml file and print the value of one node. The node is always the same, as the xml files are actually project files (*.csproj) from Visual Studio.
I already got the list of files: get-item ** \ *.csproj
How do I proceed?