Unable to self-update Composer
I am trying to update Composer without any luck! What I have tried: ``` $ composer self-update ``` > [InvalidArgumentException] Command "self-update" is not defined. ``` $ sudo -H composer self-updat...
- Modified
- 21 Apr at 15:21
Chaining Observables in RxJS
I'm learning RxJS and Angular 2. Let's say I have a promise chain with multiple async function calls which depend on the previous one's result which looks like: ``` var promiseChain = new Promise((r...
- Modified
- 7 Sep at 11:43
How to check if String ends with something from a list. C#
I want to take a user's input, and check if the end of what they put in ends with something. But it's more than one string. I have it in a list. And I could check if the input ends with a string from ...
How to implement sleep function in TypeScript?
I'm developing a website in Angular 2 using TypeScript and I was wondering if there was a way to implement `thread.sleep(ms)` functionality. My use case is to redirect the users after submitting a for...
- Modified
- 13 Jan at 12:47
Split string at first space and get 2 sub strings in c#
I have a string like this ``` INIXA4 Agartala INAGX4 Agatti Island ``` I want to split such a way that it will be like `INAGX4` & `Agatti Island` If I am using `var commands = line.Split(' ');` ...
- Modified
- 11 Jun at 10:46
Set default host and port for ng serve in config file
I want to know if i can set a host and a port in a config file so I don't have to type ``` ng serve --host foo.bar --port 80 ``` instead of just ``` ng serve ```
- Modified
- 13 Jun at 13:6
How do I select and store columns greater than a number in pandas?
I have a pandas DataFrame with a column of integers. I want the rows containing numbers greater than 10. I am able to evaluate True or False but not the actual value, by doing: ``` df['ints'] = df['i...
How to initialize an array in angular2 and typescript
Why does this happen in Angular2 and Typescript? ``` export class Environment { constructor( id: string, name: string ) { } } environments = new Environment('a','b'); app/en...
- Modified
- 11 Jun at 08:40
How to get the indices list of all NaN value in numpy array?
Say now I have a numpy array which is defined as, ``` [[1,2,3,4], [2,3,NaN,5], [NaN,5,2,3]] ``` Now I want to have a list that contains all the indices of the missing values, which is `[(1,2),(2,0)...
How to vertically center text in a <span>?
How can I vertically center text that is wrapped in a `<span>`? The `<span>` must have `min-height` of `45px`. Here is what I am envisioning: ``` -------- ------- text ...
How can I embed SVG into HTML in an email, so that it's visible in most/all email browsers?
I want to generate graphs in SVG, and email an HTML page with those graphs embedded in it (not stored on a server and shown with linked images). I've tried directly embedding the SVG, using the Obje...
- Modified
- 10 Jun at 17:19
Instagram new logo css background
Recently, Instagram logo has changed as you all know. I need vector logo but it is not possible, I mean gradients. Is there any css code for new logo?
Send HTTP POST message in ASP.NET Core using HttpClient PostAsJsonAsync
I want to send dynamic object like ``` new { x = 1, y = 2 }; ``` as body of HTTP POST message. So I try to write ``` var client = new HttpClient(); ``` but I can't find method ``` client.PostA...
- Modified
- 10 Jun at 14:12
Conversion of List to Page in Spring
I am trying to convert list to page in spring. I have converted it using > new PageImpl(users, pageable, users.size()); But now I having problem with sorting and pagination itself. When I try passi...
- Modified
- 13 Jun at 06:29
Web Api Controller and Thread Pool
When a HTTP request is received by IIS, it hands off the request to the requested application in an application pool that is serviced by one or more worker processes. A worker process will spawn a thr...
- Modified
- 4 Sep at 03:15
Use pytesseract OCR to recognize text from an image
I need to use Pytesseract to extract text from this picture: [](https://i.stack.imgur.com/HWLay.gif) and the code: ``` from PIL import Image, ImageEnhance, ImageFilter import pytesseract path = 'pic.g...
- Modified
- 16 Sep at 01:33
How can I pass a runtime parameter as part of the dependency resolution?
I need to be able to pass a connection string into some of my service implementations. I am doing this in the constructor. The connection string is configurable by user will be added the ClaimsPrincip...
- Modified
- 10 Jun at 12:5
What is the difference XElement Nodes() vs Elements()?
Documentation says: --- XContainer.Nodes Method () Returns a collection of the child nodes of this element or document, in document order. Remarks Note that the content does not include attribut...
Xamarin Forms: ContentPages in TabbedPage
I am trying to put some custom Content Pages into a Tabbed Page. Sadly I am not sure, how to do this with the XAML syntax. My dummy project looks like the following: Page 1 ``` <?xml version="1.0" e...
- Modified
- 10 Jun at 09:18
Visual studio code CSS indentation and formatting
I'd like to know if there is any way to activate auto indent a CSS file in visual studio code with the shortcut ++? It's working fine with JavaScript but strangely not with CSS.
- Modified
- 24 Aug at 13:19
jquery 3.0 url.indexOf error
I am getting following error from jQuery once it has been updated to `v3.0.0`. `jquery.js:9612 Uncaught TypeError: url.indexOf is not a function` Any Idea why?
.NET Core vs Mono
What is the difference between .NET Core and Mono? I found a statement on the official site that said: "Code written for it is also portable across application stacks, such as Mono." My goal is to u...
ServiceStack.OrmLite 4.0.58 not creating proper SQL for boolean join conditions
I am attempting to join two tables using `ServiceStack.OrmLite` v4.0.58 but the SQL being generated for a boolean check is incorrect: ``` var exp = Db.From<AdjustmentRequest>() .Join<Acc...
- Modified
- 9 Jun at 23:41
System.Security.Cryptography not found
I am trying to add a reference to System.Security.Cryptography.X509Certificates but I get: "The type or namespace 'Cryptography' does not exist in the namespace 'System.Security'. I have tried adding...
- Modified
- 23 May at 11:45
'yield' enumerations that don't get 'finished' by caller - what happens
suppose I have ``` IEnumerable<string> Foo() { try { /// open a network connection, start reading packets while(moredata) { yield return packet; ...
- Modified
- 15 Apr at 17:4