Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
93 views

import psycopg2 # establishing the connection conn = psycopg2.connect( database="CONNE py", user='postgres', password='asdf', host='localhost', port= '5432' ) cursor=...
prem's user avatar
  • 19
1 vote
2 answers
79 views

First of all I produced a simple html file with image mapping: <!doctype html> <html><head><meta charset="utf-8"><title>xxx</title></head> <body&...
Lode Fabri's user avatar
-2 votes
1 answer
107 views

I have some json that looks like this: "lines": { "0010": { "ProvCountyCode": "047", "ProvNo": "770887", "...
Mark Ainsworth's user avatar
5 votes
1 answer
150 views

Consider the following snippet: from collections import UserDict class D(dict): ... d = D(foo="bar", baz=42) print(d.popitem()) # ('baz', 42) class UD(UserDict): ... ud = UD(foo="...
maejam's user avatar
  • 53
-4 votes
0 answers
38 views

This post is followup to Nested dict with parent/child relation,, which was closed due to duplication. However, after 3 days....I will give it a try again. To problem is following. I am trying to sort ...
erotski's user avatar
  • 53
Advice
2 votes
5 replies
84 views

I am working with a dictionary in Python and trying to use the .items() function to get the key-value pairs. I saved the result in a variable l, but when I try to access the first element using l[0], ...
Talha's user avatar
  • 1
1 vote
1 answer
61 views

I am trying to fetch JSON data from an HTTP API and convert it into an in‑memory table in DolphinDB. The JSON response is an array of objects, and I want to store it as a table where each object ...
Gerard Kane's user avatar
Advice
0 votes
4 replies
112 views

i would like to ask for some kind of projects in python that will help me get better at handling dict and lists i'm still not feeling very comfortable with these. If anybody knows a site for training ...
iShareInspiration's user avatar
0 votes
0 answers
125 views

Note: Someone in the first iteration of this question said that CheckForMagicPoint() is being called every frame, but it is not, as checkingForMagicPoints is only set to true when someone is using the ...
4D-PASTA's user avatar
1 vote
1 answer
60 views

How do you turn a list of lists (2-dimensional) into a list of dicts in Ansible? I don't see how I can map it. Take this list: parent_list: - - "value1-1" - "value1-2" - - &...
hydrian's user avatar
  • 155
2 votes
2 answers
88 views

My database includes treatments (treatment_id) that are given to patients at different times during the day (due_time). I would like to display this in a GUI where each treatment has its own row and ...
James Agnew's user avatar
1 vote
3 answers
71 views

I'm tying find good a way to split multiple FQDN domain names from a list of domains in ansible. I need to split the domain name and the unqualified name into a dictionary. input_fqdns: - 'host1....
hydrian's user avatar
  • 155
-4 votes
1 answer
98 views

To what json object will the following java objects get converted / serialized when using jackson mapper? List<String> textList = new ArrayList<>; textList.add("one"); textList....
Andreas Panagiotidis's user avatar
Best practices
3 votes
10 replies
242 views

I have two Python dictionaries, d1 and d2. Let them be: d1 = {'a': 1, 'b': 2} d2 = {'a': 3, 'b': 4} Those dicts would be united as a new one, say new_dict: new_dict = {1: {'a': 1, 'b': 2}, 2: {'a': 3,...
Carlos Gouveia's user avatar
-3 votes
3 answers
120 views

I have created a map like this: map<string, map<string, map<int, vector<int>>>> example; I can insert a value to this map like this: example["Stack"]["OverFlow&...
user32366208's user avatar

15 30 50 per page
1
2 3 4 5
5751