: All Posts
sometimes my file just freezes in my vi vim what happened
Sometimes when I edit my file using vi or vim my file just freezes Even if I type CtrlC or CtrlD it still freezes there I kill 9 ltpidgt from another terminal
Read more →
Step-by-step debugging with IPython
From what I have read there are two ways to debug code in Python With a traditional debugger such as pdb or ipdb This supports commands such as c for continue
Read more →
Storing Python dictionaries
Are there simple ways to store a dictionary or multiple dictionaries in for example a JSON or pickle file For example if I have some data like data data key1
Read more →
Truncating all tables in a Postgres database
I regularly need to delete all the data from my PostgreSQL database before a rebuild How would I do this directly in SQL At the moment Ive managed to come up
Read more →
Type StateListUser has no method getValueNothing KProperty and thus it cannot serve as a delegate
Im trying to get a value from LiveData with observeAsState in jetpack compose but I get a weird error Type StateltListgt has no method getValueNothing
Read more →
TypeError moduleinit takes at most 2 arguments 3 given
I have defined a class in a file named Objectpy When I try to inherit from this class in another file calling the constructor throws an exception TypeError
Read more →
Using Pythons ospath how do I go up one directory
I recently upgrade Django from v131 to v14 In my old settingspy I have TEMPLATEDIRS ospathjoinospathdirname file templatesreplace Put strings here like
Read more →
Validate phone number with JavaScript
I found this code in some website and it works perfectly It validates that the phone number is in one of these formats 123 4567890 or 1234567890 The problem is
Read more →
What causes a javalangArrayIndexOutOfBoundsException and how do I prevent it
What does ArrayIndexOutOfBoundsException mean and how do I get rid of it Here is a code sample that triggers the exception String names tom bob harry for int i
Read more →