Programmierung

Fragen und Antworten für professionelle und begeisterte Programmierer



7
Git-Alias ​​mit Positionsparametern
Grundsätzlich versuche ich einen Alias: git files 9fa3 ... um den Befehl auszuführen: git diff --name-status 9fa3^ 9fa3 aber git scheint keine Positionsparameter an den Alias-Befehl zu übergeben. Ich habe versucht: [alias] files = "!git diff --name-status $1^ $1" files = "!git diff --name-status {1}^ {1}" ... und ein paar …

18
Lineares Layout und Gewicht in Android
Ich habe immer über diesen lustigen Gewichtswert in den Android-Dokumentationen gelesen. Jetzt möchte ich es zum ersten Mal versuchen, aber es funktioniert überhaupt nicht. So wie ich es aus den Dokumentationen verstehe, ist dieses Layout: <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:text="Register" android:id="@+id/register" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" weight="1" /> <Button android:text="Not this …

7
Liquibase Lock - Gründe?
Ich bekomme das, wenn ich viele Liquibase-Skripte auf einem Oracle-Server ausführe. SomeComputer bin ich. Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Liquibase Update Failed: Could not acquire change log …

14
Klasse vs. statische Methode in JavaScript
Ich weiß, dass das funktionieren wird: function Foo() {}; Foo.prototype.talk = function () { alert('hello~\n'); }; var a = new Foo; a.talk(); // 'hello~\n' Aber wenn ich anrufen will Foo.talk() // this will not work Foo.prototype.talk() // this works correctly Ich finde einige Methoden, um Foo.talkArbeit zu machen , Foo.__proto__ …
261 javascript  oop 



4
ReSharper warnt: "Statisches Feld im generischen Typ"
public class EnumRouteConstraint<T> : IRouteConstraint where T : struct { private static readonly Lazy<HashSet<string>> _enumNames; // <-- static EnumRouteConstraint() { if (!typeof(T).IsEnum) { throw new ArgumentException( Resources.Error.EnumRouteConstraint.FormatWith(typeof(T).FullName)); } string[] names = Enum.GetNames(typeof(T)); _enumNames = new Lazy<HashSet<string>>(() => new HashSet<string> ( names.Select(name => name), StringComparer.InvariantCultureIgnoreCase )); } public bool Match(HttpContextBase httpContext, …







Durch die Nutzung unserer Website bestätigen Sie, dass Sie unsere Cookie-Richtlinie und Datenschutzrichtlinie gelesen und verstanden haben.
Licensed under cc by-sa 3.0 with attribution required.