Hi,
I need to compare two files and redirect the different lines to third file. I know using diff command i can get the difference . But, is there any way of doing it in python ?
Suppose I have a file, whose entire contents is:
\u1234
and suppose 1234 is the code for \alpha
is there a way to, in vim, have the "\1234" show up as a single \alpha symbol (and be treated as an \alpha symbol) ?
Thanks!
[This problem arises since I want to to use unicode names in g++]
I am using the CKEditor for my website along with PHP, and want to allow only <b>, <i>, <a>, and <img> tags. This is easy, however our problem is that a user could essentially add a <b> tag some where and then not close it resulting in all of the comments thereafter and the rest of that page being bolded.
How do we check and make sure that whatever tag is opened is now closed?
I have a search on my php page and it is ok.
With my search result, I highlighted the string target on my content.
$search_tag_text = @preg_replace("/($mysearch)/i", "<u style=\"color:red\">$1</u>", $row->txtContent);
Ok, but is it possible, after having found a string target on my content, to show 20 words before and 20 words after, instead listing all my content?
Any help will be appreciated.
I have a .NET PropertyGrid control which displays properties of some class. I want to change the color or font or background color(it doesn't matter just that they look different from the other displayed properties) of some property. I can do with writing custom editor but I was wondering
If an easier method exists?
If I use custom editor then how do i change the editor of built-in types like bool, int etc.
Thanks
hello I think the title says it all. I need to accomplish this result in android but it looks like there is no easy fix to my problem. Just to clarify a bit more: if I had to do it in html css I would write something like
<img src="Image URL" style="float:left; margin-right: 5px;" />
got it? ;)
thanks guyz
I have an app which acts almost like a daemon. Sometimes it quits on error and many times it prints an error msg then ask users to press any key to close.
How can i relaunch the app when either case happens? I am more interested in the 2nd case. I can do this in c++, C# or python. The script is an old python that i dont want to change (a newer c# version is in the works but not stable)
I have a table, whose fields are
id, name, link
the link holds the name of the page like "link" = "index.php". Now I want to update this field
and add "page=" in front of "index.php". Using this method I would like to update every entry in my table.
My desired SQL syntax need to be something like this
UPDATE mytable set link= 'page=' + <existing value of link> WHERE 1;
I am using 'WHERE 1;' to denote every row.
Anyone know how to accomplish this?
I have the following data:
t4.8k 1.84 1.86 1.83
t5.8k 1.82 1.84 1.8
t7.10k 1.79 1.8 1.77
t8.8k 1.8 1.84 1.76
I need to plot this in GNU plot using yerror bars.
Column1 - dataset name. This is the xaxis scale.
Column2 - Y-Mean
Column3 - Y-Max
Column4 - Y-Min
Here is the plotting code that I use:
plot "chameleonConfidence.dat" using xtic(1):2:4:3 title "Ratio of Time Taken" with yerrorbars
But this gives me the following error
Warning: empty x range [4.94066e-324:4.94066e-324], adjusting to [4.94066e-324:4.94066e-324]
"chameleonConfidence.gplot", line 15: x_min should not equal x_max!
Can someone help me with this?
I have a composite combobox control (textbox and a listbox):
Initially I have the cursor on the start, but when I select an item from the listbox and it gets displayed on the textbox then also the cursor remains at start position.
I want the cursor to be at the end. Please suggest/help.
I have no experience with windows application hooking, DLL injection etc. What is the simplest way to achieve that described in the title and nothing else?
Hi, I have an Ajax function which will retrieve some RSS feed script from server. I put this responsetext in a div using:
$("#divId").html(responsetext);
I want to execute the script inside the response. Currently, the RSS feeds not showing in the div. Is there any way to do that ? thanks..
Can't believe how difficult this seems to be all I want to is to validate a user inout using javascript to make sure that it is an email address. But can't get it to work:
I am using:
//validates a regulaer expression
Utilities2.prototype.validateEmail = function(stringToValidateArg)
{
alert('about to check regexp');
var regExpPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
alert(regExpPattern.test(stringToValidateArg));
}
But this always returns false, any ideas why is it because of the regular expression?
Hi,
I am generating the xsl-fo document for my XML content and then passing this content to one of the third party DLL that will generate the PDF. I have a requirement to display a test in 45 degrees angle. How to achive this?
Thanks
I'm trying to have the content of the an HTML textbox be selected fully onFocus.
I know the simple solution of putting a onfocus="this.select()" on the component but this is not a good solution because if a user double clicks into the area the selection is lost and in browsers like chrome it is rarely working like it should and just reverts into input form.
I have searched on Google for a little while and can't find a good solution, most suggestions are of this simple solution.
What I would like it is that the selection inside the textbox not change once selected and if possible the user should not be able to edit the content of the textbox, for example if you have used AdSense when you grab code from AdSense the selection never changes and your unable to alter the code in the textbox.
Any solutions would be appreciated.
So i have had a little hunt online about creating custom Facebook like buttons and custom twitter follow button but not really found a solution so thought i would ask here and see if anyone knows of a solution for this (currently i have coded some jQuery to get Facebook and Twitter counts using JSON which works but want some custom buttons as per below)
I have the count working all ok, just need to tackle the like and follow buttons - it is done in jquery at the moment so would like to continue to use that if this has to be done via that.
at the moment i use the API for each to get the count, if i can integrate into the current js i have to get the calls / functions i require would be good:
// grab from facebook
var facebook = $.getJSON('https://graph.facebook.com/'+f_page+'?callback=?', function(data) {
fb_count = data['likes'].toString();
fb_count_gt = data['likes'].toString();
fb_count = add_commas(fb_count);
$('#fb_count').html(fb_count);
});
// grab from twitter
var twitter = $.getJSON("https://twitter.com/users/"+t_page+".json?callback=?",function(data) {
twit_count = data['followers_count'].toString();
twit_count_gt = data['followers_count'].toString();
twit_count = add_commas(twit_count);
$('#twitter_count').html(twit_count);
});
Thanks in advance!
I know this is probably a very simple question, but can someone please walk me through how to take what a user inputs into a s:TextInput and use that as a variable in a JSON data request?
Basically, I want to have a user enter a search term, like "math" and then have that placed into a variable so I can use it in a JSON request.
Something like public var q:String, except that my search box (and hence user input) is on another "view" of the application.
I've just started with Flex Mobile applications and I might be way out of my league. Does anyone know how to do this?
Imagine I want a user to be able to copy-paste a selection of pixels from MSPaint into a browser-based app. Is this possible using JavaScript in any current browsers? Will it become possible in HTML5?
If not, is it feasible using something like Flex/Silverlight, or is it simply not possible at this time, and you'd have to save a file and manually upload it?
Hi!
I am working in the indexation of feeds from Internet.
I would like to remove tha html code which appears in some of them. I have used regular expression for the ones i have seen, but I would like to find some way to remove all of them automaticcally, because I don't know if I have seen all possible html code in my feeds.
Is there any possibillity??
I add an example of things I would like to remove:
/0831/oly_g_liukin_576.jpg" height="49" width="41" / BEIJING - AUGUST 15: Nastia Liukin of the...
Thank you!
I'm looking into updating LoopJ's autocomplete plug-in. I want to override one of the methods (highlight_term to be exact) however it looks like that method is private.
Hello,
I would like to come up with a simple application that would add a specific phrase into a specific location on a desktop application. I assume this isn't very hard, but I'm kind of new. Any help??
Thanks!
So what I am trying to do is make an application (just for fun, not a lot of purpose), where when you launch it a interface comes up consisting of
Username: textboxhere
Password: textbox2here
then a connect button, and when you fill out your information in the textboxs' then click Connect, it navigates to facebook.com and puts in your information that you defined in the textbox and logs you in.
Any ideas guys?