"X does not name a type" error in C++
I have two classes declared as below: ``` class User { public: MyMessageBox dataMsgBox; }; class MyMessageBox { public: void sendMessage(Message *msg, User *recvr); Message receiveMessage(); ...
How to check type of variable in Java?
How can I check to make sure my variable is an int, array, double, etc...? Edit: For example, how can I check that a variable is an array? Is there some function to do this?
- Modified
- 22 Oct at 04:51
How to convert String object to Boolean Object?
How to convert `String` object to `Boolean` object?
Why am I getting AttributeError: Object has no attribute?
I have a class MyThread. In that, I have a method sample. I am trying to run it from within the same object context. Please have a look at the code: ``` class myThread (threading.Thread): def __in...
- Modified
- 13 Sep at 23:59
How can I use an ES6 import in Node.js?
I'm trying to get the hang of ES6 imports in Node.js and am trying to use the syntax provided in this example: ### Cheatsheet Link I'm looking through [the support table](http://node.green/), but I...
- Modified
- 12 Oct at 19:39
Pandas create empty DataFrame with only column names
I have a dynamic DataFrame which works fine, but when there are no data to be added into the DataFrame I get an error. And therefore I need a solution to create an empty DataFrame with only the column...
Java code for getting current time
I am searching code in `java` for fetching or synchronizing my local PC system time into my application.
How do I update Anaconda?
I have Anaconda installed on my computer and I'd like to update it. In Navigator I can see that there are several individual packages that can be updated, but also an `anaconda` package that sometime...
Write to .txt file?
How can I write a little piece of text into a `.txt` file? I've been Googling for over 3-4 hours, but can't find out how to do it. `fwrite();` has so many arguments, and I don't know how to use it. Wh...
Redirecting to URL in Flask
I'm trying to do the equivalent of `Response.redirect` as in C# - i.e.: redirect to a specific URL - how do I go about this? Here is my code: ``` import os from flask import Flask app = Flask(__name_...
CSS text-overflow: ellipsis; not working?
I don't know why this simple CSS isn't working... ``` .app a { height: 18px; width: 140px; padding: 0; overflow: hidden; position: relative; margin: 0 5px 0 5px; text-align: center; t...
Pseudo-terminal will not be allocated because stdin is not a terminal
I am trying to write a shell script that creates some directories on a remote server and then uses scp to copy files from my local machine onto the remote. Here's what I have so far: ``` ssh -t user@...
Your branch is ahead of 'origin/master' by 3 commits
I am getting the following when running `git status` ``` Your branch is ahead of 'origin/master' by 3 commits. ``` I have read on some other post the way to fix this is run `git pull --rebase` but ...
- Modified
- 30 Oct at 02:43
How to deal with floating point number precision in JavaScript?
I have the following dummy test script: ``` function test() { var x = 0.1 * 0.2; document.write(x); } test(); ``` This will print the result `0.020000000000000004` while it should just print `...
- Modified
- 18 Jul at 21:35
Initialize a byte array to a certain value, other than the default null?
I'm busy rewriting an old project that was done in C++, to C#. My task is to rewrite the program so that it functions as close to the original as possible. During a bunch of file-handling the previ...
- Modified
- 23 Jul at 13:34
How to reload/refresh jQuery dataTable?
I am trying to implement functionality whereby clicking a button on the screen will cause my [jQuery dataTable](http://datatables.net) to refresh (as the server-side data source may have changed since...
- Modified
- 3 Jun at 03:37
How do I get the color from a hexadecimal color code using .NET?
How can I get a color from a hexadecimal color code (e.g. `#FFDFD991`)? I am reading a file and am getting a hexadecimal color code. I need to create the corresponding `System.Windows.Media.Color` in...
How to Select a substring in Oracle SQL up to a specific character?
Say I have a table column that has results like: ``` ABC_blahblahblah DEFGH_moreblahblahblah IJKLMNOP_moremoremoremore ``` I would like to be able to write a query that selects this column from sai...
Parse string to date with moment.js
I want to parse the following string with moment.js and output day month year (14 march 2014) I have been reading the docs but without success [http://momentjs.com/docs/#/parsing/now/](http://momentj...
- Modified
- 4 Mar at 22:42
React Hook Warnings for async function in useEffect: useEffect function must return a cleanup function or nothing
I was trying the `useEffect` example something like below: ``` useEffect(async () => { try { const response = await fetch(`https://www.reddit.com/r/${subreddit}.json`); const json ...
- Modified
- 30 Sep at 23:5
How can I upload files to a server using JSP/Servlet?
How can I upload files to server using JSP/Servlet? I tried this: ``` <form action="upload" method="post"> <input type="text" name="description" /> <input type="file" name="file" /> <input...
- Modified
- 27 Oct at 19:55
error: request for member '..' in '..' which is of non-class type
I have a class with two constructors, one that takes no arguments and one that takes one argument. Creating objects using the constructor that takes one argument works as expected. However, if I crea...
- Modified
- 24 Jun at 05:42
add an element to int [] array in java
Want to add or append elements to existing array ``` int[] series = {4,2}; ``` now i want to update the series dynamically with new values i send.. like if i send 3 update series as `int[] series...
Add leading zeroes to number in Java?
Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,"%3d") or something...
- Modified
- 1 Apr at 04:59