How do you lay out your custom binary file format?

Every application has its own custom binary file format (e.g. .mpq, .wad). On top of that, its commonly zipped.So, my question is, how do you artfully/skillfully layout the binary contents of your | Continue reading


@stackoverflow.com | 4 days ago

How to Think in SQL?

How do I stop thinking every query in terms of cursors, procedures and functions and start using SQL as it should be? Do we make the transition to thinking in SQL just by practise or is there any m... | Continue reading


@stackoverflow.com | 6 days ago

How to avoid Java code in JSP files?

I'm new to Java EE and I know that something like the following three lines<%= x+1 %><%= request.getParameter("name") %><%! counter++; %>is an old school way of coding and i... | Continue reading


@stackoverflow.com | 7 days ago

Why is subtracting these two times (in 1927) giving a strange result?

If I run the following program, which parses two date strings referencing times 1 second apart and compares them:public static void main(String[] args) throws ParseException { SimpleDateForma... | Continue reading


@stackoverflow.com | 11 days ago

Why doesn't my processor have built-in BigInt support? (2010)

As far as I understood it, BigInts are usually implemented in most programming languages as arrays containing digits, where, eg.: when adding two of them, each digit is added one after another like... | Continue reading


@stackoverflow.com | 13 days ago

Why should I always enable compiler warnings?

I often hear that when compiling C and C++ programs I should "always enable compiler warnings". Why is this necessary? How do I do that? Sometimes I also hear that I should "treat warnings as err... | Continue reading


@stackoverflow.com | 14 days ago

Why does allocating a single 2D array take longer than multiple 1D arrays?

I thought it would be quicker to create directly, but in fact, adding loops takes only half the time. What happened that slowed down so much?Here is the test code@BenchmarkMode(Mode.AverageTime)@ | Continue reading


@stackoverflow.com | 14 days ago

What Is a Memory Fence?

What is meant by using an explicit memory fence? | Continue reading


@stackoverflow.com | 19 days ago

Why were JavaScript atob() and btoa() named like that?

In Javascript, window.atob() method decodes a base64 string and window.btoa() method encodes a string into base64.Then why weren't they named like base64Decode() and base64Encode()?atob() and bt... | Continue reading


@stackoverflow.com | 20 days ago

How to set proper orientation in 3D model in Augmented Face?

I am trying to put earings on the face using arcore augmented face. I am editing the 3D model in blender and adjusting the model according to canonical_face_mesh.fbx .But my 3d model is rendering | Continue reading


@stackoverflow.com | 22 days ago

What are five things you hate about your favorite language?

There's been a cluster of Perl-hate on Stack Overflow lately, so I thought I'd bring my "Five things you hate about your favorite language" question to Stack Overflow. Take your favorite language and | Continue reading


@stackoverflow.com | 29 days ago

Using HTTPS? The URL may not be fully encrypted, hence can be tracked

Are all URLs encrypted when using TLS/SSL (HTTPS) encryption? I would like to know because I want all URL data to be hidden when using TLS/SSL (HTTPS).If TLS/SSL gives you total URL encryption th... | Continue reading


@stackoverflow.com | 1 month ago

Why does HTML think “chucknorris” is a color?

How come certain random strings produce colors when entered as background colors in HTML? For example:<body bgcolor="chucknorris"> test </body>...produces a document with a... | Continue reading


@stackoverflow.com | 1 month ago

Is there a regular expression to detect a valid regular expression?

Is it possible to detect a valid regular expression with another regular expression? If so please give example code below. | Continue reading


@stackoverflow.com | 1 month ago

How to zip directories of a current folder in Python?

How can I create a zip archive of a directory structure in Python? | Continue reading


@stackoverflow.com | 1 month ago

What's the Point of This Macro?

I have a header file which contains#define PROTOTYPE(s) sWhat is the point of that? Seems like it would just replace the input with itself.EDIT:There are TONS of other directives around it,... | Continue reading


@stackoverflow.com | 1 month ago

Conflict-Free Replicated Data Types (CRDT) vs. Paxos or Raft

When is it a good idea to use something like CRDT instead of paxos or raft? | Continue reading


@stackoverflow.com | 1 month ago

Chrome v76 Manifest V3 Changes CORS Requests

My web client application is setting HTTP POST requests via fetch API. I see that OPTIONS preflight requests are sent via debugging proxy (Charles Proxy), but they are not displayed in Google Chr... | Continue reading


@stackoverflow.com | 1 month ago

Why is strlen so complex in C?

I was looking through the code to do strlen here and I was wondering why the code needed to be so complex? For example, why wouldn't something like the following work (as well)?unsigned long strlen( | Continue reading


@stackoverflow.com | 1 month ago

How to update a submodule to a specified commit via GitHub rest API?

There are two github repos: A & B. A will have B as its submodule.https://github.com/org_name/A.githttps://github.com/org_name/B.gitA: B@defad9 // a submodule in AHere's the case, | Continue reading


@stackoverflow.com | 1 month ago

What is the optimal algorithm for the game 2048? (2014)

I have recently stumbled upon the game 2048. You merge similar tiles by moving them in any of the four directions to make "bigger" tiles. After each move, a new tile appears at random empty positio... | Continue reading


@stackoverflow.com | 1 month ago

What should interactive shells do in orphaned process groups?

The short question is, what should a shell do if it is in an orphaned process group that doesn't own the tty? But I recommend reading the long question because it's amusing.Here is a fun and exci... | Continue reading


@stackoverflow.com | 1 month ago

CSS 100% height with padding/margin

This has been driving me crazy for a couple of days now, but in reality it's a problem that I've hit off and on for the last few years: With HTML/CSS how can I make an element that has a width and/or | Continue reading


@stackoverflow.com | 1 month ago

Why is the result of ('b'+'a'+ + 'a' m+'a').toLowerCase() 'banana'?

I was just practising JavaScript when one of my friends came across this JavaScript code:document.write(('b' + 'a' + + 'a' + 'a').toLowerCase());The above code answers "banana"!Can an... | Continue reading


@stackoverflow.com | 2 months ago

What does it mean that quicksort in Ruby is not stable?

Was playing with some Ruby code to re-order pixels of an image and came across a weird effect.The code below loads up an image, reads the pixels into an array, re-orders the pixels (using Array.s... | Continue reading


@stackoverflow.com | 2 months ago

Why is the result of ('b'+'a'+ + 'a' + 'a').toLowerCase() 'banana'?

I was just practising JavaScript when one of my friends came across this JavaScript code.('b' + 'a' + + 'a' + 'a').toLowerCase()The above code answers "banana". Can anyone explain why? | Continue reading


@stackoverflow.com | 2 months ago

Is CSS Turing Complete?

CSS isn't, insofar as I know, Turing complete. But my knowledge of CSS is very limited. Is CSS Turing complete?Are any of the existing draft or committees considering language features that mi... | Continue reading


@stackoverflow.com | 2 months ago

Illuminating discussion about jar files

As an intern, I use company code in my projects and they usually send me a jar file to work with. I add it to the build path in Eclipse and usually all is fine and dandy.However, I got curious to... | Continue reading


@stackoverflow.com | 2 months ago

Why is there a `null` value in JavaScript?

In JavaScript, there are two values which basically say 'I don't exist' - undefined and null.A property to which a programmer has not assigned anything will be undefined, but in order for a prope... | Continue reading


@stackoverflow.com | 2 months ago

Stack over Flow's How to Design a Good Question

Stack Overflow | The World’s Largest Online Community for Developers | Continue reading


@stackoverflow.com | 2 months ago

When and why are database joins expensive?

I'm doing some research into databases and I'm looking at some limitations of relational DBs. I'm getting that joins of large tables is very expensive, but I'm not completely sure why. What does ... | Continue reading


@stackoverflow.com | 2 months ago

Why do people want SQL over Elasticsearch?

Is there a Sql driver on top of Elastic Search which allows you to query ES using SQL syntax? It better supports more complex sql query, like join between two tables.Same question for Solr as well. | Continue reading


@stackoverflow.com | 2 months ago

Prefer Composition over Inheritance?

Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition? | Continue reading


@stackoverflow.com | 2 months ago

How would you pick a uniform random element in linked list with unknown length?

How would you pick a uniform random element in linked list with unknown length in one pass or if not two passes? | Continue reading


@stackoverflow.com | 2 months ago

Why does Rust not optimize code assuming that mutable references cannot alias?

As far as I know, reference/pointer aliasing can hinder the compiler's ability to generate optimized code, since they must ensure the generated binary behaves correctly in the case where the two | Continue reading


@stackoverflow.com | 2 months ago

Stackoverflow Is Down

Stack Overflow | The World’s Largest Online Community for Developers | Continue reading


@stackoverflow.com | 2 months ago

Vim Sessions [StackOverflow]

Depending on my task in Vim I have several tabs open.How can I save different sessions for later use? | Continue reading


@stackoverflow.com | 2 months ago

Pluginable cross-platform software design

I want to design a cross-platform (Android, iOS, and Web) plugin-able software that means everyone can easily develop a plugin for it and users can pick plugins from the marketplace and install it.... | Continue reading


@stackoverflow.com | 2 months ago

Gcloud the zone does not have enough resources available

I failed to start my instance (through the web browser), it gave me the error: "The zone 'projects/XXXXX/zones/europe-west4-b' does not have enough resources available to fulfill the request.... | Continue reading


@stackoverflow.com | 2 months ago

Image Processing: Algorithm Improvement for 'Coca-Cola Can' Recognition

One of the most interesting projects I've worked on in the past couple of years was a project about image processing. The goal was to develop a system to be able to recognize Coca-Cola 'cans' (note... | Continue reading


@stackoverflow.com | 2 months ago

Is there a way to figure out poetry style of text on a text/markdown file?

There is a markdown/text file that has poetical phrases in between normal paragraphs, like so:Mr. Lewes reaches this conclusion: "If, therefore, we reflect what a poem _Faust_ is, and that it con... | Continue reading


@stackoverflow.com | 2 months ago

Can We Make a “Class Level Relationship” in Laravel? (vs. Object Level)

Consider the following scenario:There are couple of entities in my Laravel application like the following:PostPageImageVideoAll the above entities can have CustomFieldValues, which is anot... | Continue reading


@stackoverflow.com | 3 months ago

Is there a reason for C#'s reuse of the variable in a foreach?

When using lambda expressions or anonymous methods in C#, we have to be wary of the access to modified closure pitfall. For example:foreach (var s in strings){ query = query.Where(i => i.P... | Continue reading


@stackoverflow.com | 3 months ago

C++: Initializing variables variable in an “if” statement

I read that in C++17 we can initialize variables in "if" statements like thisif (int length = 2; length == 2) //execute somethingInstead ofint length = 2;if (length == 2) //do someth... | Continue reading


@stackoverflow.com | 3 months ago

Is it unsafe for the JavaScript client to set the CSRF token?

It seems to me that the primary goal of CSRF is to confirm that the client making the request is the client we expect.The solution I've commonly seen is:Server generates random CSRF Token Server | Continue reading


@stackoverflow.com | 3 months ago

What is a stack map frame?

I've recently been looking at The Java Virtual Machine Specifications (JVMS) to try to better understand the what makes my programs work, but I've found a section that I'm not quite getting...Sec... | Continue reading


@stackoverflow.com | 3 months ago

Indexable Search with Grep

I have over 200mb of source code files that I have to constantly look up (I am part of a very big team). I notice that grep does not create an index so lookup requires going through the entire source | Continue reading


@stackoverflow.com | 3 months ago

Why is subtracting these two times (in 1927) giving a strange result? (2011)

If I run the following program, which parses two date strings referencing times 1 second apart and compares them:public static void main(String[] args) throws ParseException { SimpleDateForma... | Continue reading


@stackoverflow.com | 3 months ago