Questions tagged [implementation]

Deals with various issues of implementation.

Deals with various issues of implementation of functions, features, languages, etc.

2196 questions
10
votes
2 answers

DirectorySecurity sets Special Permissions while FileSecurity does not

Examine the following two blocks of code: System.Security.AccessControl.DirectorySecurity dsec = System.IO.Directory.GetAccessControl(str); System.Security.Principal.NTAccount group= new…
Logan
  • 1,614
  • 1
  • 14
  • 27
10
votes
4 answers

OpenCV SURF function is not implemented

When I try to run the sample find_obj.cpp or any OpenCV SURF program I get the following error in command prompt while executing the code. The project builds without errors and warnings. I am using VS2011 beta, OpenCV 2.4 and windows7. Error…
rotating_image
  • 3,046
  • 4
  • 28
  • 46
9
votes
3 answers

Should I use unnamed namespaces in implementation files?

I have defined some functions (no classes involved here) in an external *.cpp file, and of course there is an appropriate *.h file. Some of the functions in the *.cpp file are used only in that *.cpp file nowhere else. They are not even mentioned in…
user1192880
  • 101
  • 1
  • 3
9
votes
7 answers

I want to implement a scheme interpreter for studying SICP

I'm reading the book Structure and Interpretation of Computer Programs, and I'd like to code a scheme interpreter gradually. Do you knows the implementation of the scheme most easy to read (and short)? I will make a JavaScript in C.
freddiefujiwara
  • 57,041
  • 28
  • 76
  • 106
9
votes
3 answers

Adding Cocos2D only to already existing project?

I already have a project that is 90% done and I want to add Cocos2D ONLY to it. I do not need Box2D or Chipmunk. How would I do this? What files do I add? I really need this done, so in the end ill offer a bounty if needed. Thanks!
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191
9
votes
3 answers

How to deal with covariance when returning collection in c#?

I have a problem with returning collection and covariance and I was wondering if anyone has a better solution. The scenario is this: I have 2 version of implementation and I would like to keep the version implementation completely separate (even…
Khronos
  • 121
  • 2
9
votes
1 answer

SVG 1.1 : What is "user unit" and how to convert user unit into absolute unit(eg: millimeter)?

I am implementing SVG Tiny 1.1 and I am having trouble understanding the "user unit" concept. SVG 1.1 specification defines every with no specified unit (such as "mm", "cm", "pt", etc) to be in "user unit". While implementing interface…
David Andreoletti
  • 4,485
  • 4
  • 29
  • 51
9
votes
3 answers

How is PyTorch's Class BCEWithLogitsLoss exactly implemented?

According to the PyTorch documentation, the advantage of the class BCEWithLogitsLoss() is that one can use the log-sum-exp trick for numerical stability. If we use the class BCEWithLogitsLoss() with the parameter reduction set to None, they have a…
Hermi
  • 350
  • 2
  • 5
  • 16
9
votes
1 answer

zip function in Haskell

implementation of a zip function that takes two lists as parameters and returns a new list of pairs. I got this so far myZip [] [] = [] myZip (x:xs) (y:ys) = [(x,y)] ++ myZip xs ys any help?
Glove
  • 960
  • 6
  • 17
  • 30
9
votes
4 answers

Powerful algorithms too complex to implement

What are some algorithms of legitimate utility that are simply too complex to implement? Let me be clear: I'm not looking for algorithms like the current asymptotic optimal matrix multiplication algorithm, which is reasonable to implement but has a…
Elliot JJ
  • 543
  • 6
  • 19
9
votes
5 answers

How can a child interface reuse its parents' implementations?

Recently I had an interview and I was asked the following question. Given the following class/interface structure: Question: How can one implement interface EmployedStudent to reuse code from StudentImpl and EmployeeImpl. I suggested to compose…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
9
votes
4 answers

Where can I find useful R tutorials with various implementations?

I'm using R language and the manuals on the R site are really informative. However, I'd like to see some more examples and implementations with R which can help me develop my knowledge faster. Any suggestions?
Mehper C. Palavuzlar
  • 10,089
  • 23
  • 56
  • 69
9
votes
3 answers

Python for loop implementation

Can someone tell me how exactly Python's for loops are implemented? The reason I'm asking this is because I'm getting different behavior in the following two for loops when I expect the same behavior (assuming cases is just a set of elements): First…
Penguinator
  • 641
  • 3
  • 11
  • 22
9
votes
7 answers

Including files in a header vs implementation file

What's the difference between including a header file in a header file vs including it in a implementation file? This Ex: // test.h #include"globals.h" class Test { Test(); }; vs //test.cpp #include"globals.h" Test::Test() { }
CodingMadeEasy
  • 2,257
  • 4
  • 19
  • 31
9
votes
3 answers

How does a mocking framework work?

Most mocking frameworks only are capable of mocking interfaces, some can mock virtual methods of classes. Some Java mocking frameworks are even capable of mocking static classes. E.g. Rhino mock: var mock = MockRepository.GenerateMock<..>(); What…
bas
  • 13,550
  • 20
  • 69
  • 146