hi , I am trying to write " hi " in persian using unicodes like this :
print('\uFEB3\uFEFC\uFEE1') but it prints from the left side and in reverse order like " ih "
( in persian or farsi language we write from right to left ) how can I fix …Topic by fonzaliin Software Development
Computer languages Worldwide, Jan 2015
Meassured by the number of inquiries on Google
(a mixture of "I am interested" and "I am lost")
----------------------------------------------------
Rank Language Share(%) Trend(% vs a year ago)
----------------------------------------------------
1 Java 24.7 -0.4
2 PHP 11.7 -1.2
3 Python 10.6 +0.9
4 C# 8.9 -0.3
5 …
Reply by sneekula
I got infected right after a Java and Adobe update on my Windows7 machine.
folder \jnihmpibahpjjmcodbopcpdaelkbpjnc is most likely a random generated folder.
Note on malware **PriceLess** (pops up as Chrome extension, highlights strings for ads):
PriceLess is in folders:
C:\Users\HomeGroupUser$\AppData\Local\Chromatic Browser\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2
C:\Users\HomeGroupUser$\AppData\Local\Comodo\Dragon\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2
C:\Users\HomeGroupUser$\AppData\Local\Google\Chrome\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2
C:\Users\HomeGroupUser$\AppData\Local\Google\Chrome SxS\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 …Topic by sneekulain Information Security
Update:
PriceLess has so far stayed away from my Chrome Web Browser extensions. However I can still find references to it, for instance if I save a file without extension then the file manager lists "PriceLess" as the file type. Like I claimed before frigging Windows7 is like Swiss cheese, …
Reply by sneekula
I'm hoping that people will post unusual or little known facts here. It would be proper to include a link to a source for confirmation. Here's a start.
Speedy Gonzales was banned by the Cartoon Network for being an offensive stereotype, only to be returned after mass protest by the …Topic by Reverend Jimin Community Center
After the Swiss Federal Bank floated the Swiss Franc against the Euro, the Franc shot up so much that many Swiss take the short trip to Germany to literally buy things at half price.
Reply by sneekula
Hello friends.
I want to create a list of sublists
E.G.
i = 0
pack = []
list = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
while i < 17:
sublist = list[list[i]: list [i + 3]]
pack = pack + sublist
i += 1
print (pack)
the output is:
Type "copyright", "credits" or "license()" for …Topic by koutyin Software Development
i = 0
pack = []
mylist = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
while i < 17:
sublist = mylist[i : i + 3]
pack.append(sublist)
i += 1
print (pack)
Reply by sneekula
Hello friends.
I want to create a list of sublists
E.G.
i = 0
pack = []
list = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
while i < 17:
sublist = list[list[i]: list [i + 3]]
pack = pack + sublist
i += 1
print (pack)
the output is:
Type "copyright", "credits" or "license()" for …Topic by koutyin Software Development
Hello!
I have a file with a list and 3 functions in it; view, append and sort functions.
I want to use pickle to save data changes in to another file inorder to retrive it next time.
I have a list, when i call function VIEW, i see the primary …Topic by Niloofar24in Software Development
I would use **with**, it closes your files properly. Also use a protocol for larger files:
import pickle
fname = "films.db"
with open(fname, "wb") as fout:
# default protocol is zero
# -1 gives highest prototcol and smallest data file size
pickle.dump(favorite_movies, fout, protocol=-1)
This simple isprime(number) function checks if the given integer number is a prime number and returns True or False. The function makes sure that the number is a positive integer, and that 1 is not considered a prime number.
To find out if an integer n is odd one can …Topic by vegaseatin Software Development
def print_timing(func):
"""
a decorator function to time another function
time.clock() works on Windows systems only
you can use time.time() instead, but it gets updated less
frequently and can give 0.0 results on faster functions
"""
def inner(*arg):
"""*arg are the arguments of function …
Reply by sneekula
## solution 1: fast enough response, simple function, fail fast
from time import clock
def isanaword(k,s):
""" goes through the letters of second word (s) and returns it
if first word (k) contains exactly same letters in same number
"""
for c in s:
pos = k.find(c)
if pos==-1: return …Topic by marcelocentin Software Development
To work with the clipboard see:
https://www.daniweb.com/software-development/python/code/487653/access-the-clipboard-via-tkinter#post2142575
Reply by sneekula
## solution 1: fast enough response, simple function, fail fast
from time import clock
def isanaword(k,s):
""" goes through the letters of second word (s) and returns it
if first word (k) contains exactly same letters in same number
"""
for c in s:
pos = k.find(c)
if pos==-1: return …Topic by marcelocentin Software Development
Hello Daniweb!
I learn in the Computer Sciences Circle, [Click Here](http://cscircles.cemc.uwaterloo.ca/)
in the chapter 8.
there strings, for exemple "sse" and "assessement" or "an" and "trans-panamian bananas", and we just need to count the occurences of thr furst in the second.
My wrong code is
Hello Daniweb!
I learn in the Computer Sciences Circle, [Click Here](http://cscircles.cemc.uwaterloo.ca/)
in the chapter 8.
there strings, for exemple "sse" and "assessement" or "an" and "trans-panamian bananas", and we just need to count the occurences of thr furst in the second.
My wrong code is
I took the liberty to time some of the approaches:
''' str_count_sub_timing_hperf.py
timing functions that count the number of sub_strings in a string
using high performance time.perf_counter()
new in Python 3.3 and higher
'''
import time
def count_tony(text, sub):
return sum(text[n:].startswith(sub)
for n in range(len(text) - len(sub) + 1))
I know this sound weird but What will happen if the earth fell into the sun some kids say why does the moon not fall down well thats a beautiful question the moon is constantly falling but what will really happen if the earth stopped its orbit and fell into …Topic by RobertHDDin Community Center
Slowing down the Earth to a speed that would make it fall into the Sun within a few days time, would flatten it like a ripe tomato hitting a wall.
Reply by sneekula
After you got the basics of Python under your belt, the best way to get a good knowledge of the language and improve your coding skills is to start on a project you are interested in. Maybe an image viewer, a slide show, computer generated random or fractal art, a …Topic by vegaseatin Software Development
If you go to:
http://en.wikipedia.org/wiki/List_of_countries_by_inflation_rate
you can extract the 10 countries with the highest inflatuion rate.
You end up with this tab delimited data string:
data = '''\
Uruguay 8.11 2014 November
Turkey 8.9 2014 November
Egypt 10.61 2014 June
Argentina 24.2 2014 November
Ukraine 13 2014 December
Syria 13.6 …
Reply by sneekula
I know this sound weird but What will happen if the earth fell into the sun some kids say why does the moon not fall down well thats a beautiful question the moon is constantly falling but what will really happen if the earth stopped its orbit and fell into …Topic by RobertHDDin Community Center
Is it possible to solve this problem in c++?
Write a program that counts the numbers from 3 to 117. But for multiples of three add 3 instead of 1 and for the multiples of five add 5 instead of 1. For numbers which are multiples of both three and …Topic by ivelin Software Development
Hello Daniweb!
I learn in the Computer Sciences Circle, [Click Here](http://cscircles.cemc.uwaterloo.ca/)
in the chapter 8.
there strings, for exemple "sse" and "assessement" or "an" and "trans-panamian bananas", and we just need to count the occurences of thr furst in the second.
My wrong code is
''' str_find_sub_index.py
explore
s.find(sub[ ,start[,end]]) returns index or -1
'''
text = "trans panamanian bananas"
sub = "an"
start = 0
count = 0
while True:
ix = text.find(sub, start)
if ix < 0:
break
# move up start in function find()
start = ix + 1
count += …
Reply by sneekula
Is it possible to solve this problem in c++?
Write a program that counts the numbers from 3 to 117. But for multiples of three add 3 instead of 1 and for the multiples of five add 5 instead of 1. For numbers which are multiples of both three and …Topic by ivelin Software Development
After you got the basics of Python under your belt, the best way to get a good knowledge of the language and improve your coding skills is to start on a project you are interested in. Maybe an image viewer, a slide show, computer generated random or fractal art, a …Topic by vegaseatin Software Development
Hi everybody.
How can i creat e text file to use as a database in python?
I want to save my project's data changes into hard disk. What should i do?Topic by Niloofar24in Software Development