This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Haystack: babaacb | |
Needle: abab | |
Split into [ "babaa", "b" ] | |
> Match the longest substring with the input and keep track of the longest match. | |
> If you don't get a complete match, use the longest one to slice up the | |
> substring once more, and retry with the next longest substring. | |
There's no complete match, and the longest match is "bab". So splice up the substring again, and retry with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pqiv --watch-directories --sort-key=mtime --sort --end-of-files-action=wait --slideshow-interval=0.001 --slideshow test | |
--watch-directories -> Nach neuen Dateien suchen | |
--sort-key=mtime -> Nach Änderungsdatum sortieren, also ganz neue Dateien ans Ende | |
--sort | |
--end-of-files-action=wait -> Am Ende der Slideshow auf neue Dateien warten statt direkt von vorne neu zu starten | |
--slideshow-interval=0.001 -> Slideshow sehr schnell durchlaufen | |
--slideshow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Find minimal required versions of the gtk/gdk/gdk_pixbuf/glib/cairo libs | |
# for pqiv | |
# | |
import re | |
import sys | |
import urllib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/services/java/com/android/server/PrivacyTelephonyRegistry.java b/services/java/com/android/server/PrivacyTelephonyRegistry.java | |
index 36f2d9e..95a3f58 100644 | |
--- a/services/java/com/android/server/PrivacyTelephonyRegistry.java | |
+++ b/services/java/com/android/server/PrivacyTelephonyRegistry.java | |
@@ -44,17 +44,25 @@ public class PrivacyTelephonyRegistry extends TelephonyRegistry{ | |
private static final int PERMISSION_CALL_STATE = 3; | |
private static final int PERMISSION_SERVICE_STATE = 4; | |
+ | |
+ private Context _context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use LWP::Simple; | |
use Storable; | |
use strict; | |
# Configuration | |
# You can define multiple urlfilter.ini lists to be downloaded | |
my @remotes = qw( | |
http://secure.fanboy.co.nz/adblock/opera/urlfilter.ini | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* compile with | |
gcc -oxcbtest xcbtest.c -lxcb -lxcb-randr -lX11 -lXrandr | |
*/ | |
#include <xcb/xcb.h> | |
#include <xcb/randr.h> | |
#include <X11/extensions/Xrandr.h> | |
#include <X11/Xlibint.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This file generated automatically from randr.xml by c_client.py. | |
* Edit at your peril. | |
*/ | |
#ifdef HAVE_CONFIG_H | |
#include "config.h" | |
#endif | |
#include <stdlib.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtk/gtk.h> | |
void main() { | |
GtkTextIter start, end, inspos, tagpos; | |
gsize length; | |
GtkTextBuffer *buffer = gtk_text_buffer_new(NULL); | |
GtkTextTag *tag1 = gtk_text_buffer_create_tag(buffer, "tagone", NULL); | |
GtkTextTag *tag2 = gtk_text_buffer_create_tag(buffer, "tagtwo", NULL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/autorandr.py b/autorandr.py | |
index 19722c9..6df9d9b 100755 | |
--- a/autorandr.py | |
+++ b/autorandr.py | |
@@ -129,7 +129,8 @@ class XrandrOutput(object): | |
(?P<rotate>(?:normal|left|right|inverted))\s+ # Rotation | |
(?:(?P<reflect>X\ and\ Y|X|Y)\ axis)? # Reflection | |
)? # .. but everything of the above only if the screen is in use. | |
- (?:[\ \t]*\([^\)]+\))(?:\s*[0-9]+mm\sx\s[0-9]+mm)? | |
+ (?:[\ \t]*\([^\)]+\))\s* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libc/dns/net/getaddrinfo.c b/libc/dns/net/getaddrinfo.c | |
index 2612d6a..277afb0 100644 | |
--- a/libc/dns/net/getaddrinfo.c | |
+++ b/libc/dns/net/getaddrinfo.c | |
@@ -80,6 +80,7 @@ | |
#include <fcntl.h> | |
#include <sys/cdefs.h> | |
#include <sys/types.h> | |
+#include <time.h> | |
#include <sys/stat.h> |