im a student in Greece at Aristotle Univercity of Thessaloniki in the first class and i have to do the same project with him Managing IDs using AVL trees m new in c++ and its very difficult for me to use it....is it possible for someone to tell me how to start and organize the project?
This is my first time posting on codereview :-) (first time posting in SE actually). So, sorry if this post is incorrect.
I created a class to add functionality to c++ std::string (std::basic_string actually), let's call it String.
I would like to know, what changes to do to String to boost it ...
inadvertently created repositories with singleton lifecycles whereas other instances are transient, which led to an interesting scenario where one DbContext cached a value but another refused to admit it existed
Task
I have a large spreadsheet where each line should include:
The URL of a social media account
A field indicating whether the account is "active"
A name and UID number for each account
I have to find if the activity field is accurate for every account on the list, and fix any mismatches.
...
I am combining like 6 functions that are essentially doing this, I just saw this and wanted to dry it....I am not sure what null will do to this code....
This type of SE is for people who are experiencing specific problems with their code. For improvement suggestions, go to CodeReview as Selvin suggests. — Lexi48 secs ago
@N3buchadnezzar I know this is you trying to be funny but (and this is just my opinion) I think that you should try just not to when it comes to spoilers
@JoeWallis Yeah, I could do the latter, but I wondered if there was a post that actually has a list of what has been done already vs. going through everything.
I need to remove a commit from a PR. I could revert it but that leaves a commit being added and then removed for no reason with no residual changes, so I want to rebase it to remove it
So here is my ugliest fragment of my application, I tried to reformat as much as I could but it's still pretty ugly.
Basically, what I'm trying to do is receiving through an API call a JSON who tell me what type of field to create dynamically (Edit text, checkbox, Multiple choice, single choice...
But the correct answer is to fix the Unity configuration, which I have
As each DbContext is transient and is just used for reading data in these instances (and is disposed at the end of a request), I'm thinking that AsNoTracking in this situation either provides minimal benefit or maybe even potential harm
There's no large-scale reads going on here, it's just single items
I guess you know your options then. 1. Use AsNoTracking() everywhere and get extra DB load on a no-cache lookup tradeoff 2. Use 1 DbContext so everything shares the same cache 3. Attach objects to other DbContexts so it gets tracked by them
This should be a walk in the park for any seasoned jqueryists.
This code operates as intended, but only with two operational timers running, I need the resize event in the match section as I need to retrieve the window width as it is updated, but only if it is within the 600px or less constraint...
I created a web service which can be called from a form to add new users to the system. The final service will add users to Active Directory and Exchange in the required format (please not that FirstName and LastName are required fields in the form, so they will never be null):
using System.Col...
Problem Statement
Consider a rover and a plateau of size nxn. The rover takes three type of instructions L,R and M. 'L' and 'R' rotate the rover in the left and right direction. 'M' moves the rover one step forward in the direction it faces.
Input: Plateau size, Initial direction, Ini...
I need to refactore the machine code
public int? Code
{
get
{
int Tmp = this.Source.Code;
int GuardVar731 = Tmp;
bool Tmp2 = true;
bool Tmp3 = Tmp2;
int? result;
if (Tm...
I need to refactore the machine code
Code:
public int? Code
{
get
{
int Tmp = this.Source.Code;
int GuardVar731 = Tmp;
bool Tmp2 = true;
bool Tmp3 = Tmp2;
int? result;
...
This is intended to be a model for an application that queries an Active Directory. It can return IEnumerables of the following:
Users, given context.
Groups, given context or users.
Users, given group.
User Group Membership, given context or users.
User Direct Reports, given context or users.
...
I'm voting to close this question as off-topic because it is asking for code review. — Felix Kling59 secs ago
What's the difference between asking about a performance issue and asking for a code review? I don't think I'm asking for a code review here, I'm asking a specific question based on specific parameters, right? — xboxremote9 secs ago
I have an Abstract class "Player", the player plays several games of Roulette (samples) and for each game the desired player is cloned into a session method.
for (int i = 0; i < samples; i++)
{
IList<int> sessionStakes = this.Session(player.DeepClone() as Player);
this.maxima.Add(session...
Maven says that package com.mycompany.stuff.morestuff.yada.yoda.foo does not exist, it worked just fine before I changed some maven versions. The dependency does exist in Nexus repository, there are no compiler errors in Eclipse, WTF am I doing wrong
I'm a very new to CUDA, so I'm still trying to understand how to make the best use of the GPU. I've ported a C algorithm to it. This algorithm works by loading the memory with an initial input, then calling a rewrite function, which rewrites 128 bits of memory, consecutively, until we arrive at a...
@bipll -- "Don't do that then!" The same applies to the classes defined in the question. The nice thing about const_cast is that its use is searchable -- and rightfully questioned during code review. C-style casts are a bit harder to root out by a human review, but compilers are quite good at finding them. — David Hammen33 secs ago
I'm in the process of converting a custom UIButton from Objective-C to Swift which has custom properties and default values for those properties:
MyButton.h
@interface MyButton : UIButton
@property (nonatomic, strong) IBInspectable UIColor *buttonColor;
@property (nonatomic, strong) IBInspecta...
Thanks Simon. What a great answer. The GetDisplayName works like a charm (though it is scary to use DangerousGetHandle - i wonder if this would pass a code review:). However the naming convention doesn't seem to stick properly. Even in the above screenshot that i've added, Microsoft-SQLServerDataTools isn't being placed under Microsoft. Also, when i call GetLogNames() i see Microsoft-IIS-Configuration which isn't showing up under Microsoft in the screenshot above. I think there may be another "hidden" API like the one you discovered. — Mark20 secs ago
no problem. BTW we love fun here.. it's just we also like to keep the official CR chat roughly on-topic, so that if a new user pops in they don't leave running, wondering where the main chatroom might be.
4
I only moved it because it started dragging - the original comment was fine all by itself :)
Following yesterday's advice on my Customer class, I have now created a new class which is for looking up descriptions from a MySQL database. I have a Lookup table which contains type, name, value, and descriptions.
Here's a basic example of type = customer and name = state
Customer States
N...
With enough reason this question was closed by being out of scope.
Meanwhile I gave some advice to the OP and the question seems to be in shape for a re-open vote. I already placed my vote.
I also made question to wait some time before bringing this to meta because I wanted to verify that the r...
This is a very rudimentary lolcats translator (it only works on the phrase "Can I have a cheeseburger") in Haskell. This is my first ever attempt at Haskell (or any functional programming language). I am sure that my code is absolutely atrocious (the documentation was dismal) but it works.
Teh C...