This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Costume Sync/Async Events</title> | |
| </head> | |
| <body> | |
| <script type="text/javascript" src="costumEvents.js"></script> | |
| <script> | |
| /* a wait function - loops until waittingtime is reached */ | |
| var wait = function(waittime){ |
| \#if:Wh+DEBUG[:Wh\n]+throw(.|\n)*\#endif |
| Bitmap bmp = new Bitmap(width, height); | |
| Graphics graph = Graphics.FromImage(bmp); | |
| graph.InterpolationMode = InterpolationMode.High; | |
| graph.CompositingQuality = CompositingQuality.HighQuality; | |
| graph.SmoothingMode = SmoothingMode.AntiAlias; | |
| graph.DrawImage(image, new Rectangle(0, 0, width, height)); |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
| public static class WalkTreeExtension | |
| { | |
| public static void DoWalk<T>(this IEnumerable<T> ienu, Action<T> a, Func<T,IEnumerable<T>> childs) | |
| { | |
| foreach(var e in ienu) | |
| { | |
| a(e); | |
| DoWalk(childs(e), a, childs); | |
| } | |
| } |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| string connstr = "Data Source=(localDB)\\v11.0;Initial Catalog=inloox;Integrated Security=true"; | |
| SqlConnection conn = new SqlConnection(connstr); | |
| try | |
| { | |
| conn.Open(); | |
| var comm = conn.CreateCommand(); |
| public partial class UserControl1 : UserControl | |
| { | |
| public UserControl1() | |
| { | |
| InitializeComponent(); | |
| } | |
| protected override void OnPaint(PaintEventArgs e) | |
| { | |
| var props = typeof(System.Drawing.SystemFonts).GetProperties(); |
| public static void RemoveDelegateFromEvent(object target, string EventPropertyName) | |
| { | |
| var bindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance |BindingFlags.Static; | |
| var ev = target.GetType().GetEvent(EventPropertyName, bindingFlags); | |
| var f1 = target.GetType().GetField(EventPropertyName, bindingFlags); | |
| // search in base class | |
| if (f1 == null) | |
| f1 = target.GetType().BaseType.GetField(EventPropertyName, bindingFlags); |
| Oracle Exception: | |
| {"ORA-01652: unable to extend temp segment by 2048 in tablespace TS_TEMP"} | |
| Fix: | |
| SELECT file_name, tablespace_name, ROUND(bytes/1024000) MB | |
| FROM dba_data_files | |
| ORDER BY 1; | |
| alter tablespace ts_temp add TEMPFILE 'C:\app\inloox_oracle\product\12.1.0\dbhome_2\database\TEMP04.dbf' size 2000M autoextend on; |