You have four lists. One is the master list and the others are specialty lists. There is no guarantee that a person will be added to anything but the master list, and may be added to only one of the specialty lists. However, when you do a create_assignment, you remove the person from every specialty list. I suggest you either test to see if the person is in a list before doing the remove, or put each remove into a try/except block. Probably more concise if you just do the test.

if micleft_assign in mic_list:

It's been out for several weeks. If you want to know what is new then google "what's new in windows 10 2019 update". Aside from a minor VPN problem there is nothing that should stop you from updating.

That's pretty low level stuff that you should be able to handle just by rereading your class notes. If you don't know how to flowchart a simple if-then structure then you've probably been sleeping in class.

What, specifically, is giving you problems?

"Driver Hell" is real

To be fair, it's much easier for Apple to minimize driver problems when they have complete control over the hardware. Microsoft can only provide the interface, then hope that the hardware manufacturers follow the rules when it comes to writing the drivers. Of course, that also depends on Microsoft providing proper (complete) documentation, and we know their record on that score.

I posted code that will do that. It's the only solution you have so far so use it until something better comes along. I tested it with the xml text that you provided, and requesting the fields you specified. I loaded the test data with

txtXML.Text = My.Computer.FileSystem.ReadAllText("D:\test.xml")




cheikh06 commented: thank you very much it works well with your function +0

Dang. I always complain when other people do this and now I did it. I left out the import when I posted the code. Please add the following:

Imports System.Text.RegularExpressions

I'll see if I can figure out the Linq version. I'll post it later if I have any luck.

cheikh06 commented: Thank you for your help with this function but it returns me not found +0

I've never had much luck working with XML and I'm sure there is a better way to do this via Linq but you could try a regular expression approace as in

Private Function GetField(name As String) As String

    Dim pattern = name & "=""(.*?)"""
    Dim rex = New Regex(pattern)
    Dim match = rex.Matches(txtXML.Text)

        Return match(0).Groups(1).Value
    Catch ex As Exception
        Return "not found"
    End Try

End Function

Pass it a field name like "supercollection name" (case sensitive) and it will return a field value as a string. If you want someone to post a Linq solution you'll have to post a complete xml sample document.

rproffitt commented: This is my story. Client hands me XML, Microsoft XMLreader blows up. I parse it with my own code. +15

For future reference, Code Snippet is meant for posting working and documented snippets of code. It is not to be used when you are posting a piece of code that you are having problems with. Please post under Discussion/Question.

You are allowed to edit your post within 30 minutes of iniitially posting it.

Gloak commented: I don't like it... I was planning to delete and post the same thing again... but I can't. +2

It's not my favourite interface but you can't please everyone. Personally, for short posts I just create the post in TextPad then copy/paste into Daniweb. For anything longer I create the post in MarkdownPad, then copy/paste. It allows me to get the formatting right before posting and it also keeps me from losing a partial post if something locks up.

Do you really think this 9-year-old post warrants further input?

rproffitt commented: Some think it does. I disagree with cause here. My findings were the lack fo Pb in the solder. +15

I know nothing about the package you are using, but since the problem is with a conversion you could try taking

return int(projectionMatrix.reshape(projectionMatrix.shape[0] / self.numberOfDotsPerFrame, self.numberOfDotsPerFrame, 2))

and break it down into components like

a = projectionMatrix.shape[0]
b = self.numberOfDotsPerFrame
c = projectionMatrix.reshape((a/b, b, 2)


return int(projectionMatrix.reshape(a / b, b, 2))   

That might give you more information on the exact problem.

Have you considered it might be because your key has a space? Look at the following:

>>> data_2012 = {}
>>> data_2012['DeathRate '] = "some data"
>>> data_2012['DeathRate ']
'some data'
>>> data_2012['DeathRate']
Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
KeyError: 'DeathRate'

You might avoid spurious spaces by using

data_2012[key.strip()] = value

As I continue my conversion from vbScript to Python I am finding the gotchas. For example...

A lot of my utility scripts take a file name or a file pattern as a parameter. My script, bitrate.vbs, for example allows me to invoke it as

bitrate file
bitrate pattern

Technically file and pattern are identical since specifying a file is really just specifying a pattern that matches up to one file. To get file listings in vbScript I would just spawn a dos dir command and grab the output from stdout. In Python, however, they provide what I thought was a great module named glob. So a lot of my code looked like

for file in glob.glob(pattern):

I had rewritten five scripts before I got bitten. Let's take a folder that has videos named like

Piano Recital [1994].mp4
Awards Day [1994].mp4
Betula Lake [1983].mp4

glob.glob("*.mp4") gives the expected result

['Awards Day [1994].mp4', 'Betula Lake [1983].mp4', 'Piano Recital [1994].mp4']

so if I were to run bitrate *.mp4 I would process the expected set of files. But if I want the bitrate of only one file and type bitrate "Awards Day [1994].mp4" I get nothing because the result of `glob.glob("Awards Day [1994].mp4") is


And there is a (semi) valid reason for this. glob allows you to use character classes (a subset of regular expressions) in file patterns and [ and ] are used to delimit character classes. Fortunately, glob also provides an escape method in case your file name contains these delimiters. ...

I've only looked at a few pages

Then you have read more of the report than most of the Republicans in either House.

rproffitt commented: So there's a chance I could win a House seat? +0

I installed pyCharm and found it difficult to get used to. I found the debugging capabilities of Visual Studio 2019 much more intuitive.

As a further note, there is a py.exe and a pyw.exe in the C:\Windows folder which are the executables for the 3.7 python. Nice of Microsoft to rename them so that when I went looking for conflicting python.exe versions they didn't show up. <rude word> off Microsoft.

rproffitt commented: "Embrace, extend, extinguish." I can hear it now. "We changed it for security reasons." And thanks since I didn't know that. +15

It's a combination of syntax and addressing. Try

const int NUMSTUDENTS = 10;

int main()
    int marks[2][NUMSTUDENTS];
    printf("Enter the marks of the %d students :\n",NUMSTUDENTS);

    for (int i = 0; i < NUMSTUDENTS; i++)
        printf("\nEnter the marks of student :%d", i+1);
        printf("\nAssignment Mark :");
        scanf("%d", &marks[0][i]);
        printf("Exam Mark :");
        scanf("%d", &marks[1][i]);
    for (int i = 0; i < NUMSTUDENTS; i++)
        printf("Student No :%d\n", i+1);
        printf("Assignment Marks :%d\n", marks[0][i]);
        printf("Exam Marks :%d\n", marks[1][i]);
    return 0;

Please note that I replaced the literal 10 with NUMSTUDENTS. You should really break the habit of hard coding literals. If you had a longer program with a 10 sprinkled throughout you could easily bury yourself in bugs if you later had to change the 10 to some other value. And you might end up changing a non-related 10 by mistake. The const NUMSTUDENTS is clear and unambiguous.

Malpractice makes malperfect.

I set PYTHONPATH to d:\include and I can do

from include import getargs


import getargs

but I'd have to refer to the function as getargs.getargs(...). If I want to avoid the double name I have to do

from getargs import *

but I'd prefer to have an import statement that includes the word include to make it easier (grep) to identify my includes.

grep -i "from include import" *.py
pietvo commented: from include.getargs import getargs +0

There is a lot of the same old mindless drivel about SEO, backlinks and such, and a lot of homework posting. There was one interesting discussion a while back in the former geeks-lounge re Quebec's proposed religious symbols legislation. Aside from java questions (which I am not qualified to answer) there hasn't been much going on outside of pharma-banning and necro-posting.

it just told me no such command exists

You'd either have to:

  1. Run it from the folder containing the executable
  2. Run it from another folder but fully qualify the executable
  3. Place the executable in a folder contained in your PATH environment variable

I have a folder namedf D:\Utils and have added it to PATH. That way any custom command line apps I write or download can be placed there and accessible from anywhere.

You use it like it says.

nlist_it filename.ext

Run it with the name of a text file as a parameter and it will list that file to the console. I compiled and ran it and it works as it is supposed to.

By the way, no book will teach you a language in 21 days.

rproffitt commented: Or how to use the command line or what the command line is and all you can command on the command line. ;) +15

Welcome to Daniweb.

In keeping with tradition, Microsoft has released the latest update before resolving a number of outstanding issues. But at least they now provide a more centralized location for getting update information. The home page (dashboard) can be found here and the specific page for the latest update can be found here.

superhai commented: good +0
Steven1142 commented: I believe they have also launch a software to run after the updates +0

Agreed. There are computing problems for which you want to carefully pick:

  1. The most efficient algorithm
  2. The most optimized programming language
  3. The fastest hardware/OS platform

But to worry about the above for the OP's problem is a complete waste of time.

What kind of help are you looking for? If you need it ASAP then I suggest you provide the following ASAP

  1. Proof that you have put some effort into doing it yourself
  2. Indication as to where you are having a problem

So far the only effort I have seen is you copying/pasting your homework assignment.

Generally, a control will have a Visible property. Just set it to False.

rproffitt commented: Nice when controls over the years have begun to have commonalities like that. +15

You can use Virtual CloneDrive by Elaborate Bytes. It is freeware. I used it for years on Windows 7. It allows you to mount an iso (actually several formats of images) as a drive.


I had pretty much come to the same conclusion.

Better for what?