Help:( whats wrong with this bit
remainder = sum1 % 10
if remainder == 0 :
Help:( whats wrong with this bit
remainder = sum1 % 10
if remainder == 0 :
Dear Stacktoverflow, can you show me an example of how to use a QScrollBar? Thanks.
I need to reload my page using window.location.reload() but I am facing logout. I am using spring security jquery
I want to parse different format large csv file and generate pdf based upon the csv file values. how to do this?
Is there any way (like Jenkins REST API or Python module) to set the existing jenkins build's build description ?
Many thanks :)
I am using Scikit-Learn and Pandas libraries of Python for Data Analysis. How to interface Python with data visualization tools such as Qlikview?
Can I change the way Python 2 creates a new process, like what set_start_method
does in Python 3 on UNIX based OSes?
Using Python 2.7 and PyQt4. So I need a way to make a text of the QPushButton editable when click on it, like on QTextEdit.
i need some packages for data mining programming.Can you tell me which packages are good and also need trusted sites which contain the packages?
I have a python script that I want it can search for updates and if there is an update, it downloads it and installs it.
I am having One method that Methon return two date Object (eg : (datetime.date(2016, 6, 20), datetime.date(2016, 6, 26))). How to store this into single cell in a table?
Is there a way to type the increments on the x and y axes in Latex font, instead of just Arial?
Likewise, the legend?
My python in cygwin environment is: sys.platform == "win32"
But I want to use pexpect.spawn(...) method which is not available on win32 platform.
Please tell me which features you wish your current Python debugger had. I'm creating a new Python IDE/debugger and am looking forward to challenging requests!
I need to know mouse scrollX value not by left window's border, but by element that has triggered an event. Thank you, i rely on you guys!
I know docker events
command can listen docker events, but how to watch docker events
's output and run command when have new output?
I spent most of the day yesterday searching for a clear answer for installing pip. I can't find a good solution.
Can somebody help me install it?
I have date string (2013-03-10 19:43:55)
and want to convert it in this format (Mar 10, 2013 | 7:43 pm)
using JavaScript or jQuery. How can I do this ??
What would be the best way to attach an event so on change of a select option a URL. Store the href in an attr and grab it on change?
I would like to retrieve data of spreadsheet by searching for the spreadsheet by name. I wonder how it works?
result = service.spreadsheets().values().get(title=spreadsheetTitle, range=rangeName).execute()
I'm trying to write data into a cell, which has multiple line breaks (I believe n), the resulting .xlsx has line breaks removed. Is there a way to keep these line breaks?
I have two psv (pipe-separated) files, I need to compare the data columnwise.
How can I compare those two files, is it possible to compare two psv files through Robot??
How would you unit test the nested function f1() in the following example?
def f():
def f1():
return 1
return 2
Or should functions that need testing not be nested?
How can I get table meta data (Last Modified Time) in Big Query using Python?
I will use the BigQuery table only if its last modified datetime is greater than some datetime.
I am using python 3.4, and every time I use scitools
, I get this error:
File "<stdin>", line 1, in <module>
ImportError: No module named 'scitools'
I want to see if I can access an online API, but for that I need to have Internet access.
How can I see if there's a connection available and active using Python?
I would like to install matplotlib
to Python 2.7 with a script that I wrote in Python 3:
os.system('c:\Python27\python.exe c:\Debug2.py')
But nothing happens.
am trying to adjust the delay time of bootstrap slider. How can i adjust that please check the link http://bootsnipp.com/snippets/featured/responsive-bs-carousel-with-hero-headers
I have something like this
उत्तराखंड |2
स्टेट |3
इंफ्रास्ट्रेक्चर |1
डेवलपमेंट |1
कॉर्पोरेशन |2
लि. |3
I want to achieve this:
1->इंफ्रास्ट्रेक्चर,डेवलपमेंट
2->उत्तराखंड,कॉर्पोरेशन
3->कॉर्पोरेशन,लि.
I can't import FuncAnimation from matplotlib.animation. When I try to do it I get the error :
ValueError: insecure string pickle
I use matplotlib 1.5.1, Python 2.7, Mac OSX 10.11.3 , in Jupyter Notebook.
When i run makemigrations
command, i got this error:
Traceback (most recent call last):
...
django.db.migrations.exceptions.NodeNotFoundError: Migration products.0002_auto_20160618_1143 dependencies reference nonexistent parent node (u'products', u'0001_initial')
Is there a way to use the jQuery UI Datepicker widget to select multiple dates?
All help is appreciated! If its not posable to use the jquery UI datepicker then is there something similar that does?
I have following dataframe
:
A B
0 1 5
1 2 3
2 3 2
3 4 0
4 5 1
How I can get by condition values of column A
?
For example all values that great then 3 and less then 6.
What's the difference between exit(0)
and exit(1)
in Python?
I tried looking around but didn't find a specific question on these lines. If it's already been answered, a link would be sufficient.
I want to display listbox along with full numbers pagination ? anyone have idea how to combine both of them
Is it possible to start another notebook from the current notebook? I know how to create and save the current notebook but I cannot launch another notebook from the current one. %run does not work while starting another notebook
Hostgator has a great way of making the footer collapse and only show the headers with accordion type dropdown for the links below it, when it's in mobile mode. How can I achieve the same?
Thanks Anton
I'm testing some python code that parses command line input. Is there a way to pass this input in through IDLE? Currently I'm saving in the IDLE editor and running from a command prompt.
I'm running Windows.
I can’t find the documentation on what the names of the three parameters are when $.ajax
fails.
Right now, I’m just using:
.fail(function(A, B, C) {
I have a string
"{a:'b', c:'d',e:''}"
What would be the most convenient way to make it to a dictionary
{'a':'b', 'c':'d', 'e':''}
I am adapting someone else's script to my site. The use MooTools; I use jQuery. Their code has the following line:
new FX.Scroll(window).toElementCenter('obj');
How would I do this in jQuery?
I am writing some Java Webdriver code to automate my application. How can I correctly check whether the page has been loaded or not? The application has some Ajax calls, too.
I have declared an implicit wait for WebDriver.
So I have a python .whl package, and I want to get the development status (dev, beta, release etc.) of it, is it possible to do that without scanning and parsing the setup.py file and only with the given package?
I want to get user input multiple times and store the input data together in a string until the user presses Enter twice. I think a for
loop can work, but I don't know how to do it.
Is it possible to plot a vertex at a particular position on the xy-axis by specifying coordinates? I want to have a square lattice of vertices without the edges between them (and then add edges later as I see fit).
Thanks
Would it be possible to import songs from my desktop and play them on my micro:bit? I have configured my speakers for it and they work - but could it play actual songs? If so, how would I go about doing it?
I have following dataframe.,
company,sector,marks
a,b1,21
b,b2,27
c,b2,20
a,b3,70
I have to display no of company,sector and sum of marks how do we take unique column value length in pandas
I have added watermark image in this document manually. Is there any way to add image as watermark in Microsoft document using Java or JavaScript(jquery) programming language ?
New to python. I have a variable called 'score' which changes constantly throughout the running of the program. Is there a way to show the variable at all times in a window/place so that the user can see their score changing? Thanks!
I am looking to host a basic Websocket server.
The code I want to see running is : FastFlicker
Do you know how and where I can host this application online?
What is its time and space complexity?
I haven't been able to find an authoritative answer elsewhere on the web.
Also, not sure why, but StackOverflow won't let me post this question until I write more text in this box.
I'm experimenting with the Google cloud storage backup feature for an application.
After downloading the backup files using gsutil, how can they be loaded into a local development server?
Is there a parser available for these formats (eg, protocol buffers)?
I have set of 5000 data points of like_so_ (x,y,z) for eg (0,1,50)
where x=1,y=2,z=120.with help of these 5000 enteries,i have to get an equation in
which given x and y ,equation should be able to get value of z
I just finished writing code to make a plot using pylab in Python and now I would like to superimpose a grid of 10x10 onto the scatter plot. How do I do that?
def my_fun(x):
z = 0
for item in x:
m = x.count(item)
if m > z:
z = m
return z
y = ["cat", 4, "dog" , "cat" , 2, "cat", 2]
print (my_fun(y))
The ouput of the code is 3
. Can someone explain how?
I need to add this meta-tag in the head section of the page as i need the page to force IE7.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
I am using DNN 5.6
How can i do this?
I want to remove a matching substring from a string in python .
Here is what I have tried so far:
abc= "20160622125255102D87Z2"
if "Z2" in abc:
abc.rstrip("Z2")
print(abc)
But this doesn't work. Kindly help
Does anyone has idea how can get Nagios alert over phone call using Python or any other method? Please share with me.
But except Pager-Duty which we are already using so am planning to create an alternate of PD.
Thanks in advance
I want to add a space to the first character of a string using jquery.
For example, I have a number "92030"
and I want to replace it with "9 2030"
Is there a simple way to do it with jquery ?
I have Spyder installed as part of the Anaconda Python analytics package and I'm finding the editor to be very slow. There's always a half-second lag time between key presses and the letter showing up on screen. I'm using Spyder on a fairly new i7 MacBook.
I'm trying to query html using the request python module and this is taking forever:
ad = re.findall(r'([^>]+)><a class=" td-n"([^>]+)>', str(soup_url))
Why is that so and how can I optimize this?
def both_positive(x, y):
"""
Returns True if both x and y are positive.
>>> both_positive(-1, 1)
False
>>> both_positive(1, 1)
True
"""
If x > 0 and y > 0:
Return True
Else:
Return False
What am I doing wrong?
How do I code a program that receives a NFA-l and throws the equivalent DFA in a .txt. I need to make this in Python, and I have no idea what to do. I can't implement the algorythm, because I have no clue how. Pls send help
i have how many images in gallery.i would like to implement a previous and next button that i can movement between images. i have found this simple but it doesn't work(accepted answer). please you try. ٍsimple link
I am having problems with my jQuery object which I recieve from Ajax function.
console.log(data) ==> dumps {"isUnique":true}
and
console.log(data.isUnique) ==> dumps undefined
How should I get these "isUnique" data?
I must use beautifulsoup, but i don't know which parser I have to take. I hesitate between lxml and html.parser, or why not both. How to know if a web page is lxml compliant ? How to know if a web page is html parser compliant ? Many thanks
I have a python function, for example:
def fun():
a = 1.0
b = a*2+1
return b
But I want to debug it in ipython, so I want to watch all the variable a and b, like a global variable, how can I do this?
I am very new to web design.
I wanted to use vivus.js plugin animation for my svg, but i can't seem to make it work. i have added the vivus script in my svg code as well. can anybody help me with the code? thank you
Cant find method from REST and streaming API docs for fetching entire set of user IDs from accounts created at a given date. Similar question asked here at twittercommunity in 2014 but still unanswered...
Sorry for bad english.
I have a raspberry pi hotspot running with internet shared through ethernet. I also have django installed and running with a basic application. I want to use django to redirect any http request to a different url based on the previous url. How can I go about doing this?
I am trying to use the AnythingSlider to play two songs. I want the arrows to be disabled for 30 seconds so that you have to listen for 30 seconds before you can go to the next song. Does anyone know how to put a delay on the Anything Slider options?
How can I check the existence of an element in jQuery?
The current code that I have is this:
if ($(selector).length>0) {
// Do something
}
Is there is a more elegant way to approach this? Perhaps a plugin or a function?
I am new to python and I am trying to execute a cleartool lock
command.
Here is my code:
def lock_label(lname):
os.system('cleartool lock lbtype:' + lname'@vob:/cm_data/jupsw')
lname is my variable name
Please I'm new to pandas and want to obtain a multiple time series plot with the dataframe below using TIMESTAMP as index.
TIMESTAMP shf_1 shf_2 shf_3 2016-06-18 09:20:00 24.98201 40.98293 18.75554 2016-06-18 09:25:00 24.59746 37.85617 18.11409 2016-06-18 09:30:00 24.93322 40.07658 20.18585 2016-06-18 09:35:00 25.79265 40.91981 21.60389 2016-06-18 09:40:00 26.49355 45.02221 23.86291 2016-06-18 09:45:00 25.65839 42.93957 23.56091 2016-06-18 09:50:00 28.22184 47.68266 25.76584 2016-06-18 09:55:00 28.68465 49.86813 26.68878 2016-06-18 10:00:00 25.28899 48.88993 26.958 2016-06-18 10:05:00 22.24257 43.74584 24.88566 2016-06-18 10:10:00 21.02077 39.90298 23.48933
I am recently doing project in nlp using python. Where I need to preprocess a excel file which contains text with many row and column. I could became able to stem only simple sentence only. And couldn't able to stem whole excel file at once. How can I do that?
Given an array [1, 2, 3, 4]
, how can I find the sum of its elements? (In this case, the sum would be 10
.)
I thought $.each
might be useful, but I'm not sure how to implement it.
I am trying to install pandas library and have a problem with pip (the picture below). I`ve changed the name of computer (login, main directory) but nothing have changed.
UnicodeDecodeError: "ascii" codec can`t decode byte 0Xd2 in position 0: ordinal not in range <128>
s=input("Enter a sentence: ")
emp = "" vow=0 for i in s: if i.isspace() == False: emp = emp+i else: for j in emp: if j in 'aeiouAEIOU': vow=vow+1 print("The number of vowels in",emp,"are",vow) emp = "" it only gives vowels for first word.
I am a beginner. I want to read two inputs (probably from a slide down menu) from a web page and use them as variables to execute python program, then return the result to a database and also display it on the webpage. I`m using mySQL for database management.
If I set the popup minWidth to 440 px (example), will the width automatically grow with the content? Do I have to write extra code to make it dynamically growing?
dialogDiv.dialog({
title: "Confirm Delete",
autoOpen: false,
modal: true,
draggable: false,
resizable: false,
closeOnEscape: false,
minWidth: 440,
minHeight:220,
separate.py
class foo():
print 'a bunch of time consuming work'
class tryme():
print 'try me'*
main.py
from separate import *
foo()
It however printed both:
a bunch of time consuming work
try me
I'm working in python in ubuntu. I have an object named packet which I don't have access to its fields. I want to somehow get its address in memory and write to an offset of that address. something like (in c): address=&packet address+=offset *address=0
any suggestions?
I am trying to append variable inside for loop (cname[0].decode('utf-8')). In php we could do like this :
TotalData .= ",".$cname[0];
How we could achieve same thing using python ?(ouput be 1,2,3,,4)
for cname in match:
TotalData .= ","+cname[0].decode('utf-8');
print TotalData
How can I use the .trigger()
-event together with .stopPropagation()
? I need to simulate a submit event without triggering the submit event.
$('.form .submit').trigger('click', function (e) {
e.stopPropagation();
});
does not work. Is there any way to achieve this?
This works, in powershell:
Start-Process chrome.exe -ArgumentList @( '-incognito', 'www.foo.com' )
How can this be achieved from Python?
EDIT: Like this!
import subprocess
subprocess.Popen(["C:Program Files (x86)GoogleChromeApplicationchrome.exe", "-incognito", "www.google.com"])