Jump to content
The search index is currently processing. Activity stream results may not be complete.

All Activity

This stream auto-updates

  1. Yesterday
  2. Thanks. It works. How does this[this.config.branch](); exactly work? Basically calling string()? I mean normally, "alert"() wouldnt work but this.config.branch is also string. why is there this and then square brackets?
  3. Will do. Another question, can I make a few of my own tables and how can I make them stay and not delete once browser is refreshed? Is that possible. I need a few VERY simple tables to demo SIMPLE joins. This is VERY intro course. Thanks for answering by the way.
  4. My best suggestion is start posting the code you've written starting with your code concerning JOIN. SQL is not browser dependent.
  5. Hello All, I'm using this for my class but have issues: 1. Joins - They seem to work sporadically - so not in Firefox but Chrome. Sometimes they error out even in Chrome. Suggestions? 2. I want to make a few tables to illustrate the different joins - right now the tables are not that different so you can join but students don't see the difference. Can I make a few of my own and if so will they stay. Seems to get wiped out when web refreshed. 3. Any suggestions for how to use in my class to make a nicer experience would be SO HELPFUL AND MUCH APPRECIATED! Jill
  6. You can redirect a web page via JavaScript using a number of methods. window.location.replace(...) is better than using window.location.href, because replace() does not keep the originating page in the session history, meaning the user won't get stuck in a never-ending back-button fiasco. If you want to simulate someone clicking on a link, use location.href If you want to simulate an HTTP redirect, use location.replace JavaScript redirect example: // similar behavior as an HTTP redirect window.location.replace("http://stackoverflow.com"); // similar behavior as clicking on a link window.location.href = "http://stackoverflow.com";
  7. Last week
  8. I think it should work if you use strings instead. Selecting methods dynamically is going to be pretty confusing to anybody who has to maintain your code. I think it's a practice which should be avoided. ... ... constructor(){ this.config = { "branch": "branchA" }; this.classVar = {"a":1} } main(){ this.classVar["b"] = 2; this.branchB(); this[this.config.branch](); } ... ... var myClass = new MyClass(); myClass.main(); myClass.config.branch = "branchB"; myClass.main();
  9. Hi! Sorry if it is wrong word in the title. I am not sure how to call it in english if I do var x = functionName and then x() to call it. Just to clarify this is what I meant bycalling by pointer. What I just described works normally. For example you can do x = alert and then use x() to actually call alert. Now In my case I want to get the same thing work in class. How do I do that? class MyClass { constructor(){ this.config = {"branch": this.branchA}; this.classVar = {"a":1} } main(){ this.classVar["b"] = 2; this.branchB(); this.config.branch(); } branchA(){ alert(this.classVar["a"]); } branchB(){ alert(this.classVar["b"]); } } var myClass = new MyClass(); myClass.main(); myClass.config.branch = myClass.branchB; myClass.main(); // I want this.classVar to be accessible in both branchB calls In this example first call from main to branchB works as I want but 2nd call complains that TypeError: this.classVar is undefined. How do I fix that? Basically I want to have main method that has code that gets executed every time and then n possible alternations which are decided by configuration.
  10. lakshitha

    bug

    You answered like this? print("yes") if 5 > 2 else print("no")
  11. >>> x = float(2.8) >>> type(x) <class 'float'> >>> x = 2.8 >>> type(x) <class 'float'> Both answers are correct !
  12. def sortList(myList): myList.sort() evens = [] odds = [] for i in myList: if (i % 2) == 0: evens.append(i) else: odds.append(i) print(evens + odds) numbers = [5, 7, 2, 6, 1, 3, 44, 14, 9] sortList(numbers)
  13. Use pyinstaller ! more : https://www.pyinstaller.org/
  14. You have to use web scraping modules like BeautifulSoup for do this job. import urllib2 from bs4 import BeautifulSoup url = "www.example.com" html = urllib2.urlopen(url) soup = BeautifulSoup(html) img_src = soup.find('div', {'class':'captcha-image'})['style'] #Hereafter, you can select the base64 encoded string.
  15. Exactly, You used an unexpected character after \ (backslash) in your python file. Please, can you publish your code here? If you are , I can give the best solution.
  16. Make sure what you already installed those package via Pip Find out .py files of those modules and place them in directory of your .py file Reinstall Python in your PC
  17. Hi Lara, If you want to print illegal something in Python, you should use escape character. >>> print("I am using \" illegal \" something.") I am using " illegal " something. else if you want to print two backslashes (\\) in string, you must use r before string. >>> print(r"This will insert two \\ (backslashes)") This will insert two \\ (backslashes)
  18. SOLVED - the w3-select class had forced 100% width, I created a new class using the same values but without the width part/restriction.
  19. https://www.w3schools.com/w3css/w3css_input.asp Hi, I'm using w3css and have a problem with a select field. Ive got a form (obviously) with a big TABLE - rows/columns. in one of the TD fields Ive got a bit of text, and then a SELECT field. The options within the select field are January, Feb, mar etc.. December Now - The select field is appearing BELOW the text i want - even thougfh the width of the TD field can obviously contain both the text & select fields in one line. i'm trying [CODE]<select class="w3-select" style='display: inline-block; float: left;' name="MYNAME" onchange="this.form.submit()">[/CODE] However i cant get the select field to be the same line as the proceeding text . any advice ? EDIT: the SELECT field fills the whole width of the TD field. So i can see that the words & select could easily fit on 1 line
  20. Never mind! I found a solution! I used wrong method. Now, I corrected method, Now, it won't go to sub number anymore. If you want to see my solution, let me know, I can put in those code in next reply.
  21. Knowledge of CSS is limited. How do I remove the width via Wordpress theme?
  22. min-width: is wrong that value will never work and if you haven't bothered to remove any width properties that restrict the width from being responsive, surprise surprise, still won't work.
  23. The solution works on the menu. Thank you. But now let's go back to the initial question; the language menu. I wrote; .selected .nturl { white-space: nowrap !important; min-width: auto !important; } Unfortunately it has no effect here.
  24. ??? thats what it does? I suggest you use an array to store values, with an extra storage of currentcount, use that to check if zero or above. If you look through database field it will return to original value each time. You can also set a default value of 0.
  25. Hi! Have this query SELECT * FROM gpstrackerclubs GROUP BY flightnumber ORDER BY id DESC Gives me flightnumber 1..4 and thats fine But must return flighnumber 1...4 with the newest record for every flightnumber
  1. Load more activity
×
×
  • Create New...