NSChat

Rules → spiff.io/nschat.rules —  Discussion for iOS and OS X ...
Feb 27, 2017 01:44
I'm trying to split a string using regular expressions while retaining the regex used to split, but I haven't been able to figure out how to do it. Additionally, NSRegularExpression doesn't seem to work well on swift 3, at least while in the playground that is. whenever I use it I get an error saying that NSRegularExpression is an unresolved identifier, even when I am just copying supposedly swift 3 compliant code
Feb 27, 2017 01:43
Hey, I was wondering if I can have some help with the following question: stackoverflow.com/q/42476395/1993598
 
Jul 28, 2016 01:42
hey, how could i use a bash script to pass an argument to a python script for example that is already running
 

Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Jul 22, 2016 03:58
ok so i've figured out that i can use re.findall(r'[A-Z]{3}[0-9]{3}:+([A-Z]*)',classes, re.X) on that string, but for some reason it only returns the string "THIS" instead of the desired "THIS COURSE IS ABOUT CHINESE" how can I get it to do the capital letters search while ignoring whitespace?
Jul 22, 2016 03:43
hey, another question. I want to be able to get all continuous capital letters between the triple letter/triple #. For instance, if I had a string like, "CHI110:THIS COURSE IS ABOUT CHINESE blah blah blah" I would want it to return "THIS COURSE IS ABOUT CHINESE" how would I go about doing that
Jul 22, 2016 03:26
@JGreenwell thanks man :)
Jul 22, 2016 03:18
but for some reason searchObj.group(0) only returns CHI110 instead of the expected output of CHI110 CHI120 when I try searchObj.group(1) I am informed that this group doesn't exist. Am I making an obvious mistake or what?
Jul 22, 2016 03:17
and i set up an object for search with linesearchObj = re.search(r'CHI[0-9]{3}\b', classes, re.M|re.I)
Jul 22, 2016 03:16
the string is fdafasfas CHI110 dadfsafs CHI120 kj
Jul 22, 2016 03:16
ok this is driving me insane. I have a random string I made:
classes = "fdafasfas CHI110 dadfsafs CHI120 kj"
and I search this string with the linesearchObj = re.search(r'CHI[0-9]{3}\b', classes, re.M|re.I)

if searchObj:
Jul 22, 2016 02:37
nvm just found it thanks for all the help @RobertGrant and @ZeroPiraeus
Jul 22, 2016 02:33
thanks. is there a code for only capital letters
Jul 22, 2016 02:19
like lets say i had a text document and i am looking for all things that say AAA###. i know the AAA sequence, but I don't know the numbers
Jul 22, 2016 02:18
hey is there a way to do a search in python that finds some three letter code and then three numbers
Jul 21, 2016 21:01
I asked this question 17 days ago stackoverflow.com/questions/38190045/… and it would be super helpful to have some pointers on how to fix the python output so that php doesn't return a blank
Jul 21, 2016 21:01
How can I force a python function to wait before allowing it to output to sto
Jul 21, 2016 20:16
@HEADLESS_0NE u could use a for loop that goes thru and tests if the value is 2.00 <= secs < 3.00
Jul 21, 2016 19:33
IDLE
Jul 21, 2016 19:32
@Oasiscircle that's so weird works perfectly from terminal
Jul 21, 2016 19:31
hmmm.... working from idle
Jul 21, 2016 19:27
from multiprocessing import Pool

def f(x):
return x*x

if __name__ == '__main__':
p = Pool(5)
print(p.map(f, [1, 2, 3]))
Jul 21, 2016 19:27
just doing the example from the documentation
Jul 21, 2016 19:25
ok so the import error is gone but this program is taking forever to run... it's still running lmao any idea what is wrong?
Jul 21, 2016 19:23
@user2357112 ayyy lmao i named the program i am working on that cuz this is my first time experimenting with this. lemme rename and retry
Jul 21, 2016 19:22
everything but pool lol
Jul 21, 2016 19:22
['builtins', 'doc', 'file', 'name', 'package', 'f', 'multiprocessing']
Jul 21, 2016 19:19
don't have a module named dummy. running on an osx system... that shouldn't cause the issue though...
Jul 21, 2016 19:18
super weird
Jul 21, 2016 19:17
`
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from multiprocessing import Pool
ImportError: cannot import name Pool`
Jul 21, 2016 19:17
and got the error
Jul 21, 2016 19:17
i put in from multiprocessing import Pool into the shell
Jul 21, 2016 19:17
@Oas
Jul 21, 2016 19:16
lemme try some stuff in the shell
Jul 21, 2016 19:15
im using python 2.7.10
Jul 21, 2016 19:14
is there an issue with the line from multiprocessing import Pool in python 2? I copied the first example from [this documentation][docs.python.org/2/library/multiprocessing.html] and just got an error
Jul 4, 2016 18:23
I have a python script that basically does a lookup for the price of a textbook on amazon and then returns the price. it works well when run thru IDLE/terminal, but when I try to execute the script thru php echo exec("python file path $variables"); I only get a null value in return. I'd really appreciate some help lol
Jul 4, 2016 18:21
hey, does anyone know if beautiful soup runs asynchronously in python 2
Aug 29, 2014 02:05
can someone give me a tutorial where i can learn how to make a python 2 cgi script which stores user credentials in a mysql file
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Jul 7, 2016 20:17
hey, is there any way to get ouptput from an asynchronous server script thru php or do i need to fix the script's callback
Jul 4, 2016 18:27
hey, bit of a php noob. running a python script thru php with echo exec... but for some reason I'm getting a null value instead of the terminal output. The script works perfectly when run thru terminal. Can someone please check this out? stackoverflow.com/questions/38190045/…
 

MySQL and relational databases

Ask your question, and then hang around a while to see if an e...
Aug 29, 2014 05:49
if u can just give me some links to help me start out that would be great
Aug 29, 2014 05:48
i am just learning so i guess the best part to start would be how to edit mySQL with a python cgi script
Aug 29, 2014 05:48
@TehShrike creds for username and password
Aug 29, 2014 02:06
can someone give me a tutorial where i can learn how to make a python 2 cgi script which stores user credentials in a mysql file
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Aug 29, 2014 02:08
k thank you so much @MikeM.
Aug 29, 2014 02:06
k
Aug 29, 2014 02:05
what would be a better chat
Aug 29, 2014 02:05
was thinking about the web
 

Web Developers

Room to discuss javascript and jquery, php and mysql issues. b...
Aug 29, 2014 02:08
can someone give me a tutorial where i can learn how to make a python 2 cgi script which stores user credentials in a mysql file