- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
26 Posted Topics
Re: Just write your own with python like normal programmars do, it the pythonic approach. | |
I tried to do it with iframes but when I click a link in the child wesite then it leaves the parent website how can I keep the parent website but still interact with the child website? | |
I make webpage with iframe that displays the parent webpage but it only can do it about 10 times is there a way to make it infinite or control the exact precise number of recursions? | |
Re: http://hsim.pw AKA https://howsecureismypassword.net/ | |
First am I missing any other notable ones? I only want to know about crossplatform standalone source-based modules, so no Gui IDEs. Tkinter Pyjamas wxPython PyGObject (Gtk's successor) Qt I already know that `Tkinter` is the default so it is the obvious choice for crossplatform because of its licensing and … | |
path = './file.txt' os.remove(path) import os `os.remove(path)` is equal to `os.unlink(path)`, so how can I delete the file if it just becomes unlinked? Also I haven't tried to yet, but does `'./file.txt'` work as is or do I must provide the full path? Or do I just need to use … | |
Re: `a` is declared to be an array of `int` type and of size `10`. A maximum of `10` numbers can be written into the array. The variables `n`, `i` and `sum` are declared to be variables of `int` type where `n` is to collect the number of values to be … | |
Can someone explain this what it is doing? if ( condition1 && condition2 && condition3 && condition4 && condition5 ) { code } It doesn't do what I want it to do but this does. if ( condition1 ) { if ( condition2 ) { if ( condition3 ) { … | |
How can I return the indexes of RBG? Say `p` is my *Numeric Python array*. >>>x = 58 >>>y = 72 >>>p[y][x] array([255, 255, 255], dtype=uint8) I don't know what a *Numeric Python array* is or how to handle them but I found how to convert it to `['255', '255', … | |
how do I do pattern matching for something like `/^(.*)text/` and `/text(.*)$/`? | |
Why does the size autoresize and how can I stop it? <!DOCTYPE html> <style>td{border:1px solid black;width:100px;}</style> <table> <tr> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> </tr> </table> If there only one `<td></td>` then it displays as 100px but when they exceed the screensize they just bulk up by size reduction. Like why … | |
how to `.replace()` the `'error'`? only use `a` and `b` var str = 'bla bla anything error anything bla bla'; var a = 'anything', b = a; im not good with regular expressions so im asking for how to do this with variables so i can set them up all … ![]() | |
my [previous question](http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/477450/convert-str-to-var) about this dealt with global vars but unfortunatley the `window` of opportunitys doesn't work with this next example because it alerts 4 times instead of only 1 test("a","b","c"); function test(var0,var1,var2,var3) { for(var i=0; i<4; i++) { if(window["var"+i]===undefined) {alert("test");} } } this may not be very clear so … | |
this is my attempt var test=["a","b","c"]; var var0="a"; for(var i=0; i<1; i++) { test.splice(test.indexOf(test[window["var"+i.toString()]]),1); } alert(test); it alerts "a,b" but I want it to alert "b,c" ref:http://stackoverflow.com/questions/5613834/convert-string-to-variable-name-in-javascript | |
It is possible to read/write the binary of any file with using Python? `open(file, "b")` only works for windows `"rb"` `"rb+"` `"wb"` `"wb+"` `"ab"` `"ab+"` works but `.read()` just prints the file contents not its binary | |
How can I display a string at any x and y coordinated position of a webpage? Using only JavaScript, unless I have to have the text already included in the HTML and then hide or reveal it using javascript? I can already do that but I can't use x and … | |
Re: Maybe this can help? http://www.w3schools.com/asp/met_opentextfile.asp Or am I confused about the files location? These links should be helpful. [What is ASP.net?](http://www.javascriptkit.com/howto/aspnet.shtml) [ASP and JavaScript](http://www.webdeveloper.com/forum/showthread.php?29056-ASP-and-JavaScript) [Using JavaScript Along with ASP.NET](http://msdn.microsoft.com/en-us/library/aa479011.aspx) [ASP Tutorial - JavaScript](http://www.tizag.com/aspTutorial/aspJavascript.php) [Build an ASP.NET JavaScript Generator](http://visualstudiomagazine.com/articles/2012/11/01/javascript-generator.aspx) [asp.net javascript generic function](http://stackoverflow.com/questions/17530600/asp-net-javascript-generic-function) [JavaScripts: The Official Microsoft ASP.NET Site](http://www.asp.net/mvc/overview/javascript) [JavaScript and … | |
for example I don't know what this is called ยป `[('cat', 'meow'), ('dog', 'ruff')]` if I try `for l in [('cat', 'meow'), ('dog', 'ruff')]: print l` I am using l for lady luck lucy not I for I or the number 1 + maybe even | pipe for smoking it … | |
Is there a way to make a [drop-down list](https://en.wikipedia.org/wiki/Drop-down_list) that lists all of the textfiles in the same folder as my webpage is in? I only want the textfiles because I have other filetypes in there but while typing this, it makes me wonder if I can read the webpages … | |
I am using variables for my numbers. I require the smallest number and so I use `min()` to achieve that but if I have multiple values it will only take them in chronological order. var a = 98 ; var b = 82 ; var c = 61 ; var … | |
So I have a string of the English alphabet for example. But I don't know the alphabet very well but I do know that it starts with "abc" and that it ends in "xyz". I want to remove letters "b" to "x". I want to do something like `str = … | |
with terminal is there a way for me to get a list of names that are already taken? like for things like variables and filenames `import` so I can't accidentally name something that will make a bug | |
I want to learn about `def` because that looks very the most intriguing how you can make it kind of like reusable but when I was learning I had come some problems with understanding def main(): #renewable code main() if __name__ == "__main__": main() I don't understand what `__name__` and … | |
this time I have only one textfile and I want to remove all duplicate lines so that each and every single line in it is unique unto itself. with open("textfile") as w: for line in w: W = line with open("textfile") as d: c = 0 for line in d: … | |
Re: try using `raw_input()` [instead](http://en.wikibooks.org/wiki/Python_Programming/Input_and_output) and then it is to be believed that there is to be an error expected from within your line 13 o:< | |
textfileA = one word per line textfileB = multiple words per line textfileC = words that I have manually found already if words from textfileA also exist in textfileB, I need to replace the words in textfileB with "error" and write the replaced words from textfileB to new lines in … |
The End.