Dear all,
I'm a newbie in bash and I would like to pass as parameter to a python function all files in a directory that don't match a given pattern. sth. like:
$myscripts/myprog.py $myfiles/!(bonjovi)
The above example should retrieve all files that don't match to "bonjovi".
Best wishes
The regular expression class (rxregexp.dll) that comes with ooRexx (I'm on 4.0.0) is relatively low on function compared, say, with Python's re module (even at 2.5.2).
It appears to have no assertions, no facilities for group extraction, or for substitution. Greedy or lazy matching is a global pattern option, rather than flagged by an additional "?". Basically, a pre-PCRE regular expression engine.
Does anyone know if anything with more up-to-date function is available?
I have need to access subversion data (commit messages, files updated, revision numbers, dates modified, author, etc.) externally. Is this something for some sort of subversion hook or is there a decent third party package for this or some other "best practice" way to approach accessing subversion data externally (and by external I mean from a php/ruby or python script... external to subversion itself)?
In python I can construct a HTML string without worrying about escaping special characters like < or " by simply enclosing the string in triple quotes like:
html_string = """
<html>
<body>
<p>My text with "quotes" and whatnot!<p>
</body>
</html>
"""
Is there a similar way to do this in Java?
I am already pretty good at PHP and now want to expand my knowledge to desktop programming.. which language would be:
The one's I'm mainly looking into are: Java, C#, C++, Python
1) Easier to learn?
2) Most suitable for Making 3D games and applications with sockets?
One more thing - Although I'm looking to code for Windows, I may also want to do a bit of programming for Mac OS after a while.
Basically, I'd like to do the following, only using Common Lisp instead of Python:
print("Hello world.\r\n")
I can do this, but it only outputs the #\newline character and skips #\return:
(format t "Hello world.~%")
I believe I could accomplish this using an outside argument, like this:
(format t "Hello world.~C~%" #\return)
But is seems awkward to me. Surely I can somehow embed #\return into the very format string, like I can #\newline?
Yeah ehh, I'm nitpicking.
Thanks for any help!
Can I do that?
I'm afraid that this can be an overkill and eventually I'll end up with much less productivity than with traditional stack like Ruby/Python/you name it. I understand that you will start with much lower productivity if you start to work with new technology but .. is it potentially worth trying and finally switch to Erlang as the only tool for web development and all the backend stuff.
Or is Erlang more suitable for only some high performance backend tasks?
Is it possible to capture all the sound from a computer and have it pass through a equalizer before reaching the speakers?
How can you program a band pass filter on it?
EDIT: I'm trying to get this on Windows (with Python? heh) but if there is a generic, cross-platform approach that would be great.
Hi I did A Google search and couldn't find anything,
so I wanna learn Qt/C++ my University (I'm a first year CompSci Student) won't be teaching C++ next year which is a big disappointment
I already know Python
and dabbled in LaTeX, Javascript, C++
I'm currently helping out a free software project Clementine but it's programmed in Qt/C++ and I don't know enough of both to help out enough.
Is there any tips, Tutorial, howtos out there?
I need to get the minimum and maximum values in a collection of floating point values, after applying an absolute value conversion. In python I would do this
min(map(abs, [-5, -7, 10, 2]))
how can I perform the same operation in java in the most elegant way?
I need to learn programming ASP.NET with C# but I can't find a good online book to do so.
Is there an ASP.NET equivalent to Diving into python?
All of the books are quite expensive.
I already know Java and C++, are there any major differences between them and C#?
If so are there materials that cover only the differences and what I should learn?
hi everybody,
I need to do a countdown clock, that counts down the days, hours, minutes and seconds that are left to a date of my choice,Using jquery or google app engine(Python).
I created a timer using Javascript,But in that i used system time.
I need to use server time.Can any body give me ideas to build up a count down Timer using server UTC time.
I'm running the latest Mercurial and Python 2.6; IIS6 is using the wildcard ISAPI method to attach the site to the Mecurial hgwebdir_wsgi
[paths]
\ = \\COMP3254\TestRepo\*
[web]
baseurl = /
allow_push = *
push_ssl = false
style = monoblue
The setup works perfectly if I reference the local drive E:\repo* but doesnt work if I specify the network as above; I've given the server (MERCDEV01$) full permissions on the shared folder on COMP3254, I can't think of any other reason it wouldn't work.
Any ideas?
As far as I can see the key advantage of dynamic languages like Ruby or Python over Java/Scala/C# etc is "hot" applying of your changes to source code to the running application. What are the frameworks for JVM or .NET that support the same workflow - apply changes to configuration and source code on the fly? Can they also watch changes to custom configurations and notify application?
Note: Frameworks for dynamic languages on JVM/.NET like Grails or Compojure are out of scope here.
Does anyone have any clue why this doesn't work as expected.
If i use the python shell and do
team.game_set
or
team.games
It returns an error
AttributeError: 'Team' object has no attribute 'game'
If i create a Game object and call
game.home_team
it returns the correct team object
Heres my model
class Team(models.Model):
name = models.CharField(blank=True, max_length=100)
class Game(models.Model):
home_team = models.ForeignKey(Team, related_name="home_team")
How do you programmatically generate T-SQL CREATE statements for existing indexes in a database? SQL Studio provides a "Script Index as-Create to" command that generates code in the form:
IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name = N'IX_myindex')
CREATE NONCLUSTERED INDEX [IX_myindex] ON [dbo].[mytable]
(
[my_id] ASC
)WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
GO
How would you do this programmatically (ideally through Python)?
I'm trying to set up Subversion on Ubuntu Linux. It seems to be working, except that when I made one change and tried svn status, I found about 100 files had been changed, in the .metadata directory.
My ~/.subversion/config file currently contains the following line:
global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ .*.swp .DS_Store
What do I need to add to ignore the .metadata files?
The directory under consideration is used by Eclipse for Python development using PyDev, if that matters.
for instance in python it is possible to assign a method to a variable:
class MyClass
def myMethod(self):
return "Hi"
x = MyClass()
method = x.myMethod
print method() # prints Hi
I know this should be possible in Ruby, but I don't know what's the syntax.
Hi, guys,
I find stackoverflow is very friendly, professional and easy to use. Goole webiste is great too.
I knows little of web site development, since most of my time was working on C++.
There are many choices, so where is the start point, asp, jsp, python, php, etc?
Which technology I should use?
Which books are essential to website dev?
I have a python script that'll be checking a queue and performing an action on each item:
# checkqueue.py
while True:
check_queue()
do_something()
How do I write a bash script that will check if it's running, and if not, start it. Roughly the following pseudo code (or maybe it should do something like ps | grep?):
# keepalivescript.sh
if processidfile exists:
if processid is running:
exit, all ok
run checkqueue.py
write processid to processidfile
I'll call that from a crontab:
# crontab
*/5 * * * * /path/to/keepalivescript.sh
Thanks in advance.
So I know that C++ is strongly typed and was just wondering if there was any library (or any thing for that fact of the matter) that would allow you to make a variable that has no initial specific type like var in Python.