Questions

Tool to generate JSON schema from JSON data

We have this json schema [draft](https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-03). I would like to get a sample of my JSON data and generate a skeleton for the JSON schema, that I can r...

How to calculate the SVG Path for an arc (of a circle)

Given a circle centered at (200,200), radius 25, how do I draw an arc from 270 degree to 135 degree and one that goes from 270 to 45 degree? 0 degree means it is right on the x-axis (the right side) ...

14 Nov at 19:1

Can I apply a CSS style to an element name?

I'm currently working on a project where I have no control over the HTML that I am applying CSS styles to. And the HTML is not very well labelled, in the sense that there are not enough id and class d...

9 Apr at 17:21

HashMap with multiple values under the same key

Is it possible to implement a HashMap with one key and two values? Just as HashMap<userId, clientID,timeStamp>? If not, is there any other way to implement the storage of multiple values e.g. one key ...

24 Feb at 13:55

C# switch on type

> [C# - Is there a better alternative than this to 'switch on type'?](https://stackoverflow.com/questions/298976/c-sharp-is-there-a-better-alternative-than-this-to-switch-on-type) C# doesn't s...

2 Apr at 02:18

Table is marked as crashed and should be repaired

I am getting this error in wordpress phpMyadmin ``` #145 - Table './DB_NAME/wp_posts' is marked as crashed and should be repaired ``` When I login to phpMyadmin, it says wp_posts is "in use" My we...

15 Dec at 15:8

Wait until a process ends

I've an application which does ``` Process.Start() ``` to start another application 'ABC'. I want to wait till that application ends (process dies) and continue my execution. How can I do it? Ther...

8 Jan at 17:46

MSSQL Error 'The underlying provider failed on Open'

I was using an `.mdf` for connecting to a `database` and `entityClient`. Now I want to change the connection string so that there will be no `.mdf` file. Is the following `connectionString` correct? ...

Pythonic way to check if a file exists?

Which is the preferred way to check if a file exists and if not create it?

13 Feb at 22:42

MVVM: Tutorial from start to finish?

I'm a C#/Windows Forms programmer with more than 5 years experience. I've been investigating WPF using the MVVM (Model-View-ViewModel) design pattern. I have searched the Internet for tutorials. I hav...

27 Oct at 12:20

How do we count rows using older versions of Hibernate (~2009)?

For example, if we have a table Books, how would we count total number of book records with hibernate?

4 Nov at 18:43

XPath: How to select elements based on their value?

I am new to using XPath and this may be a basic question. Kindly bear with me and help me in resolving the issue. I have an XML file like this: ``` <RootNode> <FirstChild> <Element attribute1="...

24 Sep at 08:46

Difference between "\n" and Environment.NewLine

What is the difference between two, if any (with respect to .Net)?

4 Oct at 19:20

rsync error: failed to set times on "/foo/bar": Operation not permitted

I'm getting a confusing error from rsync and the initial things I'm finding from web searches (as well as all the usual chmod'ing) are not solving it: ``` rsync: failed to set times on "/foo/bar": Op...

16 Aug at 13:8

Will using 'var' affect performance?

Earlier I asked a question about [why I see so many examples use the varkeyword](https://stackoverflow.com/questions/335682/mvc-examples-use-of-var) and got the answer that while it is only necessary ...

23 May at 12:3

Is it possible to make an ASP.NET MVC route based on a subdomain?

Is it possible to have an ASP.NET MVC route that uses subdomain information to determine its route? For example: - - Or, can I make it so both of these go to the same controller/action with a `userna...

Quick unix command to display specific lines in the middle of a file?

Trying to debug an issue with a server and my only log file is a 20GB log file (with no timestamps even! Why do people use `System.out.println()` as logging? In production?!) Using grep, I've found a...

27 Apr at 09:11

window.onload vs <body onload=""/>

What exactly is the difference between the `window.onload` event and the `onload` event of the `body` tag? when do I use which and how should it be done correctly?

17 Aug at 22:6

How do you render primitives as wireframes in OpenGL?

How do you render primitives as wireframes in OpenGL?

26 Sep at 03:39

Integrating Python Poetry with Docker

Can you give me an example of a `Dockerfile` in which I can install all the packages I need from `poetry.lock` and `pyproject.toml` into my image/container from Docker?

Objects are not valid as a React child. If you meant to render a collection of children, use an array instead

I am setting up a React app with a Rails backend. I am getting the error "Objects are not valid as a React child (found: object with keys {id, name, info, created_at, updated_at}). If you meant to ren...

20 Sep at 15:49

Namespace "stuck" as Terminating, How I removed it

I had a "stuck" namespace that I deleted showing in this eternal "terminating" status.

27 Jul at 15:22

Could not connect to Redis at 127.0.0.1:6379: Connection refused with homebrew

Using homebrew to install Redis but when I try to ping Redis it shows this error: ``` Could not connect to Redis at 127.0.0.1:6379: Connection refused ``` I tried to turn off firewall and edit co...

15 Jan at 02:41

jquery 3.0 url.indexOf error

I am getting following error from jQuery once it has been updated to `v3.0.0`. `jquery.js:9612 Uncaught TypeError: url.indexOf is not a function` Any Idea why?

20 Nov at 09:15

Service located in another namespace

I have been trying to find a way to define a service in one namespace that links to a Pod running in another namespace. I know that containers in a Pod running in `namespaceA` can access `serviceX` d...

23 Jan at 17:44