Quantcast
Channel: User Sourav Kannantha B - Stack Overflow
Browsing latest articles
Browse All 69 View Live

Comment by Sourav Kannantha B on How to add conflict resolving scripts in...

@sytech Comments will be retained. But approvals will be lost. There is one 'Approve' button in Gitlab MR UI isn't it?

View Article


Comment by Sourav Kannantha B on Python how to know script was executed...

@blueteeth I updated the question to give more clarity. Please check.

View Article


Comment by Sourav Kannantha B on When running two tail commands in...

@Barmar Shell exists immediately. But ssh connection stays on till all pipes are closed AFAIK. For example, ssh remote 'cat /etc/hosts &' runs fine.

View Article

Comment by Sourav Kannantha B on git commands hanging forever in mounted...

@Philippe yes, filesystem is mounted properly. All normal commands are working fine.

View Article

Comment by Sourav Kannantha B on `git lfs prune` is not pruning all lfs objects

@LeGEC --force might think it can safely delete only one file. But shouldn't it mention there a 'n' local objects? Or is there a better way to see how many local objects are there? And perhaps, which...

View Article


How does exec* functions manage multithreaded process?

In POSIX standards, calling exec* in a thread will cause the entire process to be replaced with a new process, resulting in termination of all threads of the process.But how does exec* terminate all...

View Article

How do I create an app to customize notification panel for Android?

I want to customize notification panel in my device. Specifically, I want to move quick tiles to bottom of the panel instead of top as it is easily accessible there. But if search Google for 'Android...

View Article

Is there a safeunlink syscall in Unix?

There is an unlink syscall in Unix, which takes a path as argument, and unlinks that path from inode.Suppose this case. I will open a file, access the contents, and then decide that it should be...

View Article


What is parent directory of a process?

In lsof output, it mentions 3 types of directories, cwd, rtd and pd. I understand cwd and rtd. But what is pd aka., parent directory for a process? I tried lsof | grep ' pd ', but I got no output. So...

View Article


pip3 command is failing

I did pip3 install jira and now every pip3 command is failing with:Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 33, in vendored...

View Article

xfuncname not working in my .gitconfig file?

I know that there is a question with same title: Why isn't my xfuncname working in my .gitconfig file?. But it didn't solve my problem.This is my .attributes file:*.drd diff=drdThis is my config...

View Article

Is it possible to stop the editor from popping up once git prepare-commit-msg...

I am writing a prepare-commit-msg hook, which interactively prompts the user about some data and creates a commit message in a predefined format. In almost all cases, there is no need for the user to...

View Article

Is it possible to know which editor git is going to use programatically?

Is it possible to know which editor git is going to use programmatically? Something like this is possible?$git which editor/usr/bin/nanoBasically, I wanted to invoke a custom editor only for git commit...

View Article


How the kotlin coroutine is implemented under the hood?

Kotlin coroutines are one of the key features in the language. I was curious how they implemented it. So I wrote this kotlin code snippet,CoroutineScope(Dispatchers.IO).launch { someFun(6) // A suspend...

View Article

How to make clang-format not add new line before opening brace of a function...

When I auto-format with Clang-format, it is always inserting a newline before brace when requires clause is there.Thisconstexpr auto size() const noexcept requires(!Unique) { return...

View Article


Image may be NSFW.
Clik here to view.

Why text-based regex engines cannot handle lazy quantifiers?

I have came across many times that, text-based regex engines cannot support lazy quantifiers. But I could not find why. But I came to know that, they internally use DFAs, and they do not backtrack.Then...

View Article

Understanding sequential consistency fence in C++

I was reading about memory orders in C++. I could understand relaxed and acquire-release models a well. But I'm struggling with sequential-consistency.If I am not wrong, from cppreference,...

View Article


Failed to get default debug keystore location

I changed my project default location in Android Studio Settings from /Documents/Android Studio projects to /Documents/AndroidProjects. Then I moved an existing project from former to latter in file...

View Article

Comment by Sourav Kannantha B on In Unicode why क़ is excluded from...

@Luuk "The list of script-specific composition exclusions constituted a one-time adjustment to the Unicode Normalization Algorithm, defined at the time of the composition version in 2001 and unchanged...

View Article

auto formatting using yapf to put parameters on multiple lines in condensed...

Related to this. But instead of putting all arguments on single line, I want to put them onto multiple lines in condensed form.Basically I want to transform:def f(arg1: typ1, arg2: typ2, ..., ...)...

View Article

Answer by Sourav Kannantha B for Why does Python not allow Generics with...

As mentioned in this answer, unfortunately it is not possible to type check generics at runtime. But if your use case to assert types for type checkers like my in case, this is what I came up with:def...

View Article


Answer by Sourav Kannantha B for Python dataclass from a nested dict

I came across this apischema library. It provides both serialization and deserialization of data-dataclasses.Here is an example:from apischema import deserialize, serialize# Define a schema with...

View Article


Comment by Sourav Kannantha B on How to differentiate address sanitizer error...

@StephenNewell what you are suggesting is a workaround. I'm expecting an actual solution to this issue

View Article

Answer by Sourav Kannantha B for Force gnu make to rebuild objects affected...

Above answer is preferable than this answer. But when I encountered same problem, before finding the above solution I implemented it in the following way.flagstamp.sh:#!/bin/bashFLAGS=$1FLAGFILE=$2#...

View Article

Comment by Sourav Kannantha B on How to start a process with multiple threads...

@SergeyAKryukov I asked this question back when I was learning inner mechanisms of operating system deeply. When a operating system starts a process, it creates one thread for that process. If I want...

View Article


Comment by Sourav Kannantha B on Mixing cdef and regular python attributes in...

Can you please mention the Cython version in which __dict__ support was added? Because I'm still getting the error in my local even after adding cdef dict __dict__.

View Article

Fatal Python error: GC object already tracked when invoking set constructor

I have following Python2 function in a big Python-Cython project (print statements added for debugging):import gcdef e_closure (startstate):"""Return all states reachable from startstates on epsilon...

View Article

How to add custom definitions in header file flex lexer?

I was writing a reentrant lexer using flex. To pass additional information about the matched token, I was using yyextra like this:// my_lexer.h#include <stdbool.h>typedef enum { NUMBER, STRING;}...

View Article

Comment by Sourav Kannantha B on clang-format causing unnecessary line breaks...

Note that, (just for testing) if I change some | to +, it will stick after lambda declaration. But instead if I change all | to + it will be formatted the same again.

View Article



Comment by Sourav Kannantha B on Is clang-tidy '-checks=clang-analyzer-*' a...

@irowe Code can change any day. Shouldn't I depend on a behaviour only if it's documented?

View Article

Comment by Sourav Kannantha B on How do I rebind keyboard shortcuts in VS...

@Floomi, is there a similar solution for intellij?

View Article

Keep VSCode and Intellij shortcuts in sync

In my Windows laptop I use both VSCode and Intellij for different tasks. I prefer to use VSCode keymap for both with some customizations. I'm using VSCode Keymap plugin in Intellij. But it only applies...

View Article

In VSCode is there a way to switch ends in selection?

In VSCode editor (not terminal) while selecting text, usually anchor end will be fixed and expand/shrink happens only from cursor end. Now, is there a operation available in VSCode to switch anchor and...

View Article

Browsing latest articles
Browse All 69 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>