[Solved] Delphi Split-Merge String without seperators?

There is no built-in functionality to do that, since you throw away information (the length of each string). So that information have to be stored somewhere. You could use a TStringList descendant : Interface TMyStrings = class(TStringList) protected function GetTextStr: string; override; end; Implementation { TMyStrings } function TMyStrings.GetTextStr: string; var Element: String; begin Result … Read more

[Solved] Integers and while loop in C++… how?

Depending on how you define and initialize x, it may go into the loop every time you enter a non-integer, or it may only go into the loop sometimes. If you don’t assign any value to x, then the value of x is still undefined after cin >> x if you enter a non-integer, because … Read more

[Solved] Constructor with two arguments Java

If you want to initialize an empty AccountType object, then you need to add a no argument default constructor. public AccountType() { } If you need to set class variables after the object is initialized then you will need to add the appropriate setter methods. public void setAccountType(String accountNameType){ this.accountNameType = accountNameType; } public void … Read more

[Solved] Output left or right part of a matched string [closed]

Here are a couple ways to only keep the text that comes before your pattern, if it exists a <- “GCUGUGGAGAUAACUGCGC” b <- “CUGGCUGAGGUAGUAGUUUGUGCUGUUGGUCGGGUUGUGACAUUGCCCGCUGUGGAGAUAACUGCGCAAGC” strsplit(b, a)[[1]][1] sub(paste0(a, “.*$”), “”, b) Now, you just need to read the files into R and loop over each pattern. I’m not exactly sure what you are looking for, but … Read more

[Solved] Why did my xCode compiler output “lldb”? [closed]

I’m going to guess you’re probably running this program on a Mac using Xcode, since lldb is the default debugger on that kind of a setup. If that’s the case, just type ‘run’ and see what happens. You might have better luck setting up a command-line environment to build and run your programs if you’re … Read more

[Solved] c++ socket programming : sendto() and recvfrom() error code 10038 & in ‘server’ bind failed with 10038

Error 10038 is WSAENOTSOCK: The descriptor is not a socket. You are calling socket() and assigning your SOCKET handles inside of if statements, but you are missing adequate parenthesis. They should be like this instead: if( (receivingSocket = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET ) if( (sendingSocket = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET ) Personally, I … Read more

[Solved] Custom circle progress view [closed]

Take white circle image like you displayed in above image and try following code. – (void)startSpin { if (!animating) { animating = YES; [self spinWithOptions: UIViewAnimationOptionCurveEaseIn]; } } – (void)spinWithOptions:(UIViewAnimationOptions) options { [UIView animateWithDuration: 1.0f delay: 0.0f options: options animations: ^{ imgViewCircle.transform = CGAffineTransformRotate(imgViewCircle.transform, M_PI / 2); } completion: ^(BOOL finished) { if (finished) { … Read more

[Solved] What encryption type is this? [closed]

It seems the text is encrypted with the NULL encryption algorithm described in RFC 2410. If I run it through the accompanying decryption algorithm, it decrypts properly without error and gives the following plain text: OH0fRX0gOHZgOH0tOH4fRX8tOr0gOHZgOH0tOH4fOrZgOH0fRX8tOH4gOHZgOH0tOr4gRX8tOr4fRX0gOHZfOH4fRX4fOr0tOrZgOr4tObZgRX4fOr4tOrZeRX4fOrZfRX0fOH4tOH0gRX0fRX0fOrZeRX4gOH4tOr4gRX0gOr4tOH0fOrZfOH4fRX4tOr0fOH4gRX8tOr4fRX4fOHZgOr4fRX0gRX4fRX0tObZgRX4fOr4tOrZeRX4fOH4tOr0fOrZfOHZgOH4tObZgOr4fRX4tOr0fOrZgOH0tOr0gRX8tOHZgOH0tObZgOr0fRX4gOr4tOr0tOr4tOH0tObZgOr0gRX0gOHZfOr0tOr0fRX8tOr0gOrZgOH0tOr4tOH4tOHZfOr4tOr0fOH4gRX4gOr0fOrZfOH4gOr4tOr4gOrZfOH4fRX4gRX0gOrZgOH0fOr4tObZgOrZgOr0fRX4gOr4tOH4fOr4gRX0fOH4tOr0fRX4gOH0tOr4gOrZgOr4fOr0tOH0gOr4tOH0gOH0tOr4fOH0tOH0gOr4tOr0fOH4fRX4gOr0fOrZfOr0fRX4gOr4tOr0tOH0fRX4fOr0gRX4gOr0fOrZgOr4fOr0tOH4fOr4gRX0fOr4fOHZgOr4fOr0tOH4fOr4gRX4gOr0fOrZgRX4gOHZgOr4tOr4fRX0fOH0tOr4tOH4fOrZfOr4gOHZgOr4fRX4fOr0gRX4gOH0tOr0gOrZfOrZfOr4tOH4fOrZgOH4fRX0fOr4tOr4fOH0tOr4gRX0gOrZgOr0fRX4fOH0gRX0gOH0fRX0gOr0tOH4fRX0 The plain text does not make much sense to me, however. But that’s the fundamental problem with data: There … Read more

[Solved] How to find a particular URL inside a domain using PHP?

There aren’t very many practical solutions for what it seems that you are talking about. Brute forcing is the simplest solution if you have the time. I will assume that you are wanting to search the page for certain content here. <?php set_exec_limit(0); ob_start(); $url_prefix = “http://www.example.com?user=”; $search = “FINDME”; $start = 10; $end = … Read more

[Solved] Can I parallelize my program?

Your code is fairly straightforward with lots of independent parallel loops. These parallel loops appear to be wrapped in an outer convergence do while loop, so as long as you keep the data on the device for all iterations of the convergence loop, you won’t be bottlenecked by transfers. I would recommend starting with compiler … Read more

[Solved] A UIImage created in coregraphics isn’t repeating

I don’t know what the context is that you’re passing in, but whatever it is, you shouldn’t be drawing into it. And you aren’t drawing anything into the context that you made with UIGraphicsBeginImageContextWithOptions. If you want to generate an image, you don’t need to pass in a context, just use the one that UIGraphicsBeginImageContextWithOptions … Read more

[Solved] How to write a Linq to entity statement, using sql not in operator [duplicate]

You can write something like that: var query = myEntities.Groupeusers .Where(gu => !myEntities.Utilisateur.Any(ut => ut.idgroupe == gu.idgroupe)).ToList(); That should work. EDIT: Try that query instead: var query = myEntities.Groupeusers .Where(gu => !myEntities.Utilisateur .SelectMany(ut=>ut.Groupeuser) .Any(gu => gu.Idgroupe == gu.Idgroupe)).ToList(); OR maybe even better: var query = myEntities.GroupeUsers .Except(myEntities.Utilisateur.SelectMany(ut => ut.Groupeuser)) .ToList(); EDIT2: If I understand your … Read more