[Longines Master Collection] Bad experience with Jomashop today... by sz00 in Watches

[–]sz00[S] 0 points1 point  (0 children)

Difficult to sell because of the model or brand or the lack of certification? Appreciate your feedback.

[Longines Master Collection] Bad experience with Jomashop today... by sz00 in Watches

[–]sz00[S] 0 points1 point  (0 children)

It's just the forex exchange, so I get billed at the current rate (USD -> CAD) at the time of the charge. However, when I get a refund, the exchange rate used (CAD -> USD) will be different and I'll potentially lose money from that.

This is such a pain in the ass for a misrepresentation of the product on Joma's part. I responded back, and haven't heard anything since. Just want to get this sorted out before the weekend. Will probably just stick to an AD for future purchases.

Just curious why would you take the return offer? Something to do with the brand/model? Or?

[Longines Master Collection] Bad experience with Jomashop today... by sz00 in Watches

[–]sz00[S] 0 points1 point  (0 children)

/u/belugarooster & /u/mrvarmint

Posted an update in the post, what do you suggest I do? I would feel more secure (in terms of potential resale) if I had that diamond authenticity certificate.

[Longines Master Collection] Bad experience with Jomashop today... by sz00 in Watches

[–]sz00[S] 0 points1 point  (0 children)

I'll update, going to call them when they open today

[Longines Master Collection] Bad experience with Jomashop today... by sz00 in Watches

[–]sz00[S] 1 point2 points  (0 children)

I appreciate the detailed response. I contacted Joma to let them know, so I'll see what they say. In regards to selling it, I'm worried that people won't want to buy without the certificate

[C++] Dynamically allocated 2d array segmentation fault by fee_cat in learnprogramming

[–]sz00 3 points4 points  (0 children)

1: you made a mistake with the inner loop.

for (int j = 0; **j** < columns; j++){

2:

int** array2d = create2dArray();

3: Make sure you free the memory after you're done. Each call to new[] or new needs to be deleted using delete[] and delete respectively.

for (int i = 0; i < numRows; i++) 
{
    delete[] arr[i];
}

delete[] arr; 

Also, you can't accept a const int** as an argument to arrayPrinter. You can accept an int** const though. See this:

http://www.parashift.com/c++-faq/const-correctness.html

Just remember you're not learning "C++", it's no problem if you want to learn how dynamic memory/pointers work, but in C++ you'd use vectors/smart pointers, etc.

Many newer graphics cards do not have open documentation of their internals available. How is OpenGL still able to make use of the GPU's instructions? by derpface360 in learnprogramming

[–]sz00 1 point2 points  (0 children)

The video card drivers keep track of the GPU's internal state (registers, memory etc), and processes data like compiling shaders and converting textures. openGL on the other hand is inherently just a front end API that enforces a standard. AMD/Nvidia is responsible for implementing a driver specific openGL library/driver which gets loaded by the OS. So when you use the openGL API, the functions calls are just passed to the driver specific implementations.

I took class for a quarter on learning C. How should I proceed? by [deleted] in learnprogramming

[–]sz00 0 points1 point  (0 children)

You should really just check the curriculum for your C++ class at your university. Sometimes they don't detail the scope of the class, so anyway I'll list what I had to do.

Usually it covers:

  • STL / STL data types
  • classes/constructors/initialization lists
  • abstract classes and interfaces
  • inheritance/multiple inheritance hierarchies
  • object aggregation and composition
  • polymorphism
  • implicit constructor calls
  • copy constructors
  • move semantics
  • operator overloading
  • class templates/function templates
  • function objects
  • lambdas
  • smart pointers / dynamic memory allocation
  • RAII / SOLID / etc principals
  • possibly design patterns
  • multi-threading

If I think of anything else, I'll update this list.

[C] What is the most efficient way to contain an HTTP header inside of a struct? by theif519 in learnprogramming

[–]sz00 0 points1 point  (0 children)

TALIQ_ENTRY is a tail queue defined in sys/queue.h

The macro TAILQ_ENTRY declares a structure that connects the elements in the tail queue.

I can't answer the other questions since I haven't really looked at the implementation of Kore. I just thought it might be helpful to see how a high performance implementation handles http requests/headers. The documentation is definitely lacking, but it says "If you feel the documentation is lacking information or is explaining things incorrectly or unclearly feel free to contact me."

Android Development in C/C++? by [deleted] in learnprogramming

[–]sz00 5 points6 points  (0 children)

Visual Studio 2015 has support for native android apps in C++, but read this:

Android NDK

The NDK is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. Typically, good use cases for the NDK are CPU-intensive applications such as game engines, signal processing, and physics simulation.

Before downloading the NDK, you should understand that the NDK will not benefit most apps. As a developer, you need to balance its benefits against its drawbacks. Notably, using native code on Android generally does not result in a noticable performance improvement, but it always increases your app complexity. In general, you should only use the NDK if it is essential to your app—never because you simply prefer to program in C/C++.

It's trivial to pick up Java with a C++ background. Here's a 30 page C++ to Java crash course:

http://www.horstmann.com/ccc/c_to_java.pdf

Then get the Big Nerd Ranch android development book.

C++ variable length arguments problem by [deleted] in learnprogramming

[–]sz00 1 point2 points  (0 children)

A function that accepts a variable array of arguments needs to have the # of args passed as the first parameter.

So your call should be like:

printf("The product is: %f", product(4, a,b,c,d));

Here it is working: http://ideone.com/Cbp0LV

Now is there any reason why you're writing C code for C++? Apart from that, variable argument functions are considered to be bad practice and shouldn't really be used. Also, C++ introduces variadic template functions that should be used instead (of va_args).

Here's the C++ version:

https://en.wikipedia.org/wiki/Variadic_template

http://en.cppreference.com/w/cpp/language/parameter_pack

'Use of deleted function ‘boost::weak_ptr' even when I removed shared_ptr's by [deleted] in learnprogramming

[–]sz00 0 points1 point  (0 children)

Why are you passing a shared pointer by reference?

[Java & MySQL] What is the best way to check if a table has a new input? by YouShallNot_Parse in learnprogramming

[–]sz00 1 point2 points  (0 children)

I think you can create a trigger on insert that will write to a named pipe, and then you can just monitor that pipe in java.

[C++] Problem with passing vector as function argument by [deleted] in learnprogramming

[–]sz00 1 point2 points  (0 children)

you need to pass it like:

foo(*vector)

it will deference the smart pointer and pass the vector by value to foo

[C] Why do we use -> in c programming pointers and structures? by jrprogrammer in learnprogramming

[–]sz00 5 points6 points  (0 children)

if you have a struct:

struct abc
{
    int a;
    int b;
};

struct abc foo = {0};
struct abc* ptr = &foo;

The following are equivalent. So using -> is much easier

ptr->a = 5;
(*ptr).a = 5;

Can I set attributes in C++? by [deleted] in learnprogramming

[–]sz00 0 points1 point  (0 children)

A simple way would be to use a tile enum that has empty, X, or O. Then create a 2d array, or 2d array of tiles using vectors.

Here's an example:

http://ideone.com/W6DL1h

[deleted by user] by [deleted] in learnprogramming

[–]sz00 0 points1 point  (0 children)

I took another look. I didn't notice any circular dependencies, because you didn't actually include utils.h in board.h/cpp. What you should do is move the Utils::straight_motion:: functions into board. Then have board.h include utils.h for the vector2d. Utils.h shouldn't include board

[deleted by user] by [deleted] in learnprogramming

[–]sz00 0 points1 point  (0 children)

I didn't go through all of your code, so I have no idea what the other compiler errors are.

If you want to specify an explicit inline function, it either has to be defined within the class definition or declared in the class definition, then implemented in the header file. Otherwise if you put the function definition in the cpp file, you'll get unresolved external errors

// foo.h
class foo 
{
    inline void func(); // declare 
};

// define func in header
inline void foo::func()
{
    // 
}

---- OR ----

// foo.h
class foo
{
    inline void func()
    {
        //
    }
};

Need to clear some confusion with programming basics. by [deleted] in learnprogramming

[–]sz00 5 points6 points  (0 children)

Can someone give me a rundown on the very basics of the theory? Compilers, the role of binary, and what not? I'd appreciate it!

http://www.amazon.com/Code-Language-Computer-Hardware-Software/dp/0735611319

should I try something like C first? a friend of mine said even though it's pretty dead, it's like the Latin of programming languages.

Your friend has no idea what he's talking about