What do return 0,return 1 & return -1 mean and what they return to whom?

I have noticed that in main the function of c program return 0 , return 1 or return -1 is used. I searched for the same in internet and saw that return is equivalent to exit and 0 status means that the program succeeded. But my questions are — 1. How does it work?? 2. What 0,1,-1 stand for? 3. To whom these values are returned?

When a solarian uses the Reflection revelation to reflect an attack, do they apply the original attacker’s modifiers or their own?

The Reflection revelation states:

You can reflect ranged attacks back at your enemies. If you took the total defense action on your last turn, or if you were fighting defensively and spend 1 Resolve Point, as a reaction you can redirect a ranged attack that misses you. Select a new target within 30 feet and make a ranged attack roll with a –4 penalty. If your attack hits, the new target is damaged as if it had been the intended target of the original ranged attack.

Does this mean that when you hit, you apply all of the attacker’s modifiers (weapon specialization, deadly aim, etc.) or all of your modifiers? Or is it both, since you are also making an attack roll but they are doing the shooting?

What do game devlopers do when they have to port their DirectX games to PS4/Switch?

I’m not a game developer (hope to be one day though!) and was wondering how devs handle porting their games that use DirectX to PS4/Switch? From what I know neither supports DirectX, only OpenGL, and Vulkan. Do the devs just have to recreate their game with OpenGL or Vulkan? That seems like a lot of work. I’d imagine it would probably be a fairly common scenario, especially with AAA games so I’d assume that there would be something somebody has made to make it easier?

And as a side question that I’m sure has been asked before a dozen times, why choose DirectX over Vulkan? Vulkan seems much more portable and seems to perform on par with DirectX (compared to OpenGL at least), there doesn’t seem to be any obvious features that I have read about that DirectX has but Vulkan doesn’t. So on account of it being more portable wouldn’t Vulkan be better?

[ United States ] Open Question : Can a person legally claim you as a business expense if they sent you money over the internet, even if it wasn’t for work?

I am currently dealing with an issue that arose between me and my cousin, who owns his own business. I don’t want to go too much into detail, but basically he sent me some money (around $ 6,000) in 2018. Most of the money he sent was as a gift which i accepted because i was struggling financially and he offered to help. Recently, we’ve gotten into an argument and he’s trying to claim all of the money he sent me in 2018 on his tax returns. He said he is going to send me a 1099 form. I have worked 2 jobs all year (minus 2 months out of the year due to my move) and claim 0 allowances which should allow me to get a good refund this year given my circumstances. If he claims this money, chances are most, if not all. of my money will have to be paid back due to this reporting (I believe he is trying to claim me as a freelance writer for his website since i did some work for him for about a month total out of the year) He claims that since the money he sent came from his business account, it doesn’t matter what it was for that i have to pay taxes on it. My understanding is that you cannot claim gifts because they are not taxable. I know that he may be in some trouble with the IRS and is trying to write off as money expenses as possible. Can he legally claim these expenses (as work) even though we have no contract and he doesn’t have any information of mine except for my name?

7 Secrets About Keto Trim They Are Still Keeping From You

keto trim type of surgery. The price of keto trim for a container is $ 59.94, and the sum total with S&H is $ 69.99. And it actual price no scam no fraud. keto trim price FAQs Is this secure for use Along with insulin? Yes, It secure for use even if you are a diabetic. Which age of people can’t use keto trim? The Age below 20 can’t use this tablets. What type of work out have to follow? Walking everyday, not suggesting to do hard and…

7 Secrets About Keto Trim They Are Still Keeping From You

How are settings structured when they can be configured in diffferent ways?

Suppose of this question the following:

  • I’m in full control of this project
  • I’m writing a media player

Obviously, a media player will allow a user to adjust the volume, so I might have a class that looks like this:

public class Audio {       private int level;      // Constructor and other attributes left out      public int getCurrentVolume()     public void turnUp(int amount)     public void turnDown(int amount) } 

My media player will also allow you to take screenshots of current video, so I might have a class that looks like this:

public class Video {       private String screenshotsDirectory;      // Constructor and other attributes left out       public String getCurrentScreenshotDirectory()      public updateScreenshotDirectory(String newScrenshotPath) } 

Problem:

At some point, you’ll write and read the data from a file, the problem is, you have have to create a stream for each type.

FileWriter volumeWriter = new FileWriter("settings.txt"); volumeWriter.writer(audioObj.getCurrentVolume());  FileWriter videoWriter = new VideoWriter("settings.txt") videoWriter.writer(videoObj.getCurrentScreenshotDirectory()); 

It would be nice to pass the FileWriter object an abstract type, which means I could make an abstract class or interface called Settings, but as far as I can see the settings don’t share common behavior. Sure, the settings can change, but in different ways, for example, the screenshot path is a String while volume is an int.

Question:

What is the clean OOP way to structure classes that are on the same type (configuration/user settings), but can change and behave in different ways?

I can turn up the volume and change the screenshot path, but I cannot “turn up” the screenshot path or update the volume with a String (representing the path).

mongodb only some collections are returning data and some are not though they are on same DB using nodeJS

I have created few collections on cloud mongodb on the same DB. Only some collections are returning values and others are not (just blank []) using nodeJS. No error msg or exceptions. I tested on mongodb shell and it shows data in all the collections.

I used this example to create my project. You can get full code from here. http://programmerblog.net/nodejs-mongodb-rest-api/

Here is my code in app, router, model, controller js files:

app.js

... var  mongodburi = "mongodb+srv://myID:myPassword@cluster0-qabk1.mongodb.net/onlinestore"; ..... var routes = require('./restapi/routes/productRoutes'); 

productRoutes.js

...  var product = require('../controllers/productController'); app.route('/products')     .get(product.products) ---- 

productModel.js

    'use strict'; var mongoose = require('mongoose'); var Schema = mongoose.Schema; var Schema = new Schema({   product_name: { type: String, Required:  'Product name cannot be left blank.' },   price:    { type: String,     Required:  'Product price cannot be left blank.'},   category: { type: String ,    Required:  'Product category cannot be left blank'} }); module.exports = mongoose.model('**products**', Schema); 

productController.js

'use strict';  var mongoose = require('mongoose'),     Product = mongoose.model('**products**');  exports.products = function(req, res) {   Product.find({}, function(err, product) {     if (err)       res.send(err);     res.json(product);   }); }; 

Collection 1: products – I am getting the values Collection 2: techinfo – I am not getting the values Collection 3: tests – I am getting the values

I have created all these collections in the same way. I am just changing the collection name in code at 2 places: 1st. productModel.js at line module.exports = mongoose.model(‘techinfo‘, Schema); 2nd: productController.js at line Product = mongoose.model(‘techinfo‘);

why it works for products and test and not for techinfo collection? (I even tried creating more collections but it’s inconsistent).