What is a regex I can write in bash for parsing a line and extracting text that can be found between two | (so that would be ex: 1: |hey| 2: |boy|) and keeping those words in some sort of array?
Is there a way to show HTML code-snippets on a webpage without needing to replace each < with < and with >?
In other words, is there some tag which simply says "Don't render html until you hit the closing tag?"
It looks like I'm missing something.
When using Jython to run my Python code in Java, Java bytecode files are generated (test.py - [email protected]).
Can I run these classes directly using java?
In other words, I want to make this:
$ java test@py [additional cp args]
work.
The intent: writing Python code and not having to give away source code.
Tell why you think Python, Perl, Ruby, etc is easiest for plugging in modules from other languages with minimal though.
To clarify, an example: I want to write business logic in Python, but use functionality that conveniently exists as a Perl module.
In other words, which language "just works" with the most modules?
char *pointer1;
char *pointer2;
pointer1 = new char[256];
pointer2 = pointer1;
delete [] pointer1;
In other words, do I have to do delete [] pointer2 as well?
Thanks!
Hi All,
In the below code,
using (SqlDataReader dr = com.ExecuteReader(CommandBehavior.CloseConnection))
{
while (dr.Read())
{
_emailTemplate.EmailContent = dr["EMAILCONTENT"].ToString();
_emailTemplate.From = dr["EMAILFROM"].ToString();
_emailTemplate.Subject = dr["EMAILSUBJECT"].ToString();
}
}
I understand CommandBehavior.CloseConnection will close the connection object when datareader is closed. In the above code, when we use using with SqlDataReader, will it close the datareader before disposing it? in other other words, if i use using statement do i need to close the datareader manually?
I'm using PHP and I've never really done anything with Javascript or JQuery or AJAX. I'm just wondering if there are any available solutions to accomplish the same effect of auto-completion that SO uses for entering tags.
There are plugins which can handle one word but I haven't seen any that handles multiple words.
Also, I hear JQuery is hosted on google code. Is it a good or bad idea to link directly from that?
I have a huge .bib file generated automatically from Papers for Mac and all the capitalization in the .bib is already the way I want it, but it doesn't have {} brackets on word like RNA.
Is there a way to force BibTeX to keep the capitalization rather than change some words to lowercase?
I'm familiar with printing time difference in milliseconds:
long time = System.currentTimeMillis();
//do something that takes some time...
long completedIn = System.currentTimeMillis() - time();
But, is there a nice way print a complete time in a specified format (eg: HH:MM:SS) either using Apache Commons or even the dreaded platform API's Date/Time objects? In other words, what is the shortest, simplest, no nonsense way to write this in Java?
I tried Unity and MEF and plain old new. And I am a bit confused as to when exactly you need to use any of these "patterns". Why would I choose to use MEF or Unity if using new is simpler and satisfies my needs.
MyObject a = new MyObject();
In other words, what needs justify the use of MEF or Unity?
I never really know how to name VBA modules. Should I:
Use a prefix, like basName or modName.
Not use a prefix, like Module. (But avoid restricted words)
Something else
Given a dictionary of words and an initial character. find the longest possible word in the dictionary by successively adding a character to the word. At any given instance the word should be valid word in the dictionary.
ex : a - at - cat - cart - chart ....
Hi,
I am planning to work in TRIE data structure for which I need a dictionary database or a text or word file containing the entire list of english words. It doesnt matter if the size is huge. Larger the better.
How to sort string names in array on ascending order .
I tried sort method but it fails to sort on name basis .
def words = ["orange", "blue", "apple", "violet", "green"]
I need to achieve like this :
["apple", "blue", "green", "orange", "violet" ]
thanks in advance.
I have tons of data in directory called reports. While doing git merge with another branch I am getting lots of conflicts for files under reports directory. I would like git merge to ignore files under reports.
In another words I would like all the data from reports from master and not from lab branch.
Is that possible?
This is what I am doing right now.
git checkout master
git merge lab
hey guys
im somehow confused in using proper functions to escape and create a slug
i used this :
$slug_title = mysql_real_escape_string()($mtitle);
but someone told me not to use it and use urlencode()
which one is better for slugs and security
as i can see in SO , it inserts - between words :
http://stackoverflow.com/questions/941270/validating-a-slug-in-django
thanx in advanced
C/Obj-C Developers- I am looking for a way to listen for a specific word or small set of words to be spoken and fire an event. Needs to be able to run on the iPhone/iPad ... Looking for ideas?
The idea is rather simple. Some datawindow (not web datawindow) varchar fields contain detailed descriptions. I was wondering if it is possible to provide the following (wikipedia-like) functionality to users: The ability to click (or dbl-click or whatever) on specific words of the text, while reading (which somehow should be indicated as clickable - it would be perfect if they could be colored blue but I don't think this is possible) and open a relevant window (or response). Do you think something like this could be implemented?
Hey guys,
Lets say you have a grid like this (made randomly)
Now lets say you have a car starting randomly from one of the while boxes, what would be the shortest path to go through each one of the white boxes? you can visit each white box as many times as you want and cant Jump over the black boxes. The black boxes are like walls. In simple words you can move from white box to white box only..
You can move in any direction, even diagonally.
I know how to make the mouse event work. I know how to make the keypress event work. Now what I can't figure out is how to make one button respond to both keypress and/or mousevent. In other words, a button that you can click or press "enter" for it to work.
This seems really basic but on googling all I can find is basic "how to do a keypress" stuff.
Is there an easy way to set the Localizable property to true for newly created usercontrols / forms? The scope of the setting should ideally be a solution or a project.
In other words I want to say that this project/solution should be localizable, and then if I add a new form or control VS should automatically set the property to true.
What is a regex I can write in bash for parsing a line and extracting text that can be found between two | (so that would be ex: 1: |hey| 2: |boy|) and keeping those words in some sort of array?
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?
I have texts that most of the time fit in a div, but sometimes it doesn't fit. There is no way to determine how many characters/words/paragraphs fit in the div, so I can't cut it off that way.
The div had a fixed height and width, so can we do something with that? Or do you have any suggestion how to get everything in the div, the correct way?