Serving the Quantitative Finance Community

Search found 5 matches

by Piyushbhatt
December 1st, 2022, 8:39 am
Forum: Programming and Software Forum
Topic: insert psycopg2 python dictionary as json
Replies: 4
Views: 4031

insert psycopg2 python dictionary as json

I want to insert a python dictionary into my postgresql database as a json file (via python and psycopg2). I have this: thedictionary = {'price money': '$1', 'name': 'Google', 'color': '', 'imgurl': 'http://www.google.com/images/nav_logo225.png', 'charateristics': 'No Description', 'store': 'google...
by Piyushbhatt
November 7th, 2022, 11:08 am
Forum: Programming and Software Forum
Topic: Why can't slots be used alongside decorators in Python to guarantee encapsulation?
Replies: 2
Views: 4632

Why can't slots be used alongside decorators in Python to guarantee encapsulation?

According to what I've read, Python does not strictly enforce Encapsulation from here . As shown below, slots are commonly utilised for quicker attribute access and memory savings. However, encapsulation may be strongly maintained using slots and decorators, as seen in the following code: class GetS...
by Piyushbhatt
July 14th, 2022, 1:24 pm
Forum: Programming and Software Forum
Topic: How to trim a string after a specific character in java
Replies: 1
Views: 3837

How to trim a string after a specific character in java

I'm new to the java programming language and  I was going through a couple of blogs on wiki and  Scaler   on the topic  trim in java and  wanted to understand the logic behind how to trim a string after a specific character in java  I have a string variable in java having value: String result="...
by Piyushbhatt
July 12th, 2022, 4:07 pm
Forum: Programming and Software Forum
Topic: Why there is no stack interface in the collection framework?
Replies: 2
Views: 5551

Why there is no stack interface in the collection framework?

Why there is no stack interface in the collection system in java? Java Collection framework gives numerous connections (Set, List, Queue, Deque) and classes (ArrayList, Vector, LinkedList, PriorityQueue, HashSet, LinkedHashSet, TreeSet). So, why not a stack interface?
by Piyushbhatt
July 8th, 2022, 9:23 am
Forum: Programming and Software Forum
Topic: Python tricks that can be used in java
Replies: 1
Views: 2827

Python tricks that can be used in java

The little things in python that I love, I'm unfamiliar how to do them in java and I would appreciate any help. string equivalence:  Hello in hello123 would print true, but in java I only know of .equals() , not in. Is there any way to obtain all java methods that can be used on a string, in python,...