Programmers' Notes

Best and important notes in Programmer's world.

Latest Notes


Iterate all files in a directory using a for-loop

How can I iterate over each file in a directory using a for loop? And how could I tell if a certain entry is a directory or if it s... 12

- .NET

How to set a breakpoint on a method within the .net framework

I wish to set a breakpoint on the System Threading SynchronizationContext::SetSynchronizationContext static method so I can find ou... 2


Is it possible to fetch part of a remote image in javascript?

I want to extract EXIF data from remote images using Javascript It works OK at the moment but it gets quite slow when the image is ... 1

- C#

Keep enum-to-object mapping with enum class?

I frequently need a global hard coded mapping between an enum and another object a string in this example I want to co locate the e... 3


Split variable using a special character - Javascript - jQuery

I have a variable var i = my text I want to split it using special character I mean I want to generate var one = my and var two = t... 4


Reading HTML contents of a URL in OCaml

I would like to write an OCaml function which takes a URL and returns a string made up of the contents of the HTML file at that loc... 1

- .NET

How to design code for testability

I have been looking at using TDD and implementing proper testing only just started to learn how much better it makes your life in a... 7

- C#

RabbitMQ C# API Event based Message Consumption

while true { BasicDeliverEventArgs e = BasicDeliverEventArgs Consumer Queue Dequeue ; IBasicProperties properties = e BasicProperti... 3

- C++

'Bracket initializing'. (C++)

I m learning C at the moment C Primer plus But I just felt like checking out the cplusplus website and skip a little forward to fil... 5


Find diagonals sums in numpy (faster)

I have some board numpy arrays like that: array [[0 0 0 1 0 0 0 0] [1 0 0 0 0 1 0 1] [0 0 0 0 0 0 0 1] [0 1 0 1 0 0 0 0] [0 0 0 0 0... 2

- C++

Help with JSON format

I m using a JSON example off the web as seen below { menu : File commands : [ { title : New action : CreateDoc } { title : Open act... 4


Adding Image in Google App Engine

I have a html page in my google app engine project I have stored an image titles image jpg under a folder titled images which is un... 2


DatePickerDialog with theme Holo Light?

How is it possible to get a DatePickerDialog with Holo Light theme? When creating a DatePickerDialog as follows: DatePickerDialog d... 1


Clojure function to print symbol name and symbol value

I have been struggling to find an answer or develop a solution I am trying to figure out how to make code that makes code in Clojur... 1


Jsp forward not working as expected

I have jsp depending on some condition I am doing forward to another page I have /myjsp/first jsp which has code as lt; if some con... 4


Automatic installation of run-time libraries with WiX

When my file set includes DLLs with one ore more dependencies to the C run time DLLs I need to install the file from VCRedist exe T... 3


Approximate comparison in python

I want to make == operator use approximate comparison in my program: float values x and y are equal == if abs x y / 0 5 x y lt; 0 0... 3


How do I tell jQuery to run a function on one specific web page only?

I have some jQuery code that is on every web page of the site in the head element What selector syntax can I use to tell jQuery tha... 5

- C

Call same instance of a program?

I am creating a C program that is called from a shell script when a specific event is occurring The C program gets an argument from... 5


Are there any 2D game tutorials for WPF?

I m looking for an inspiration what to add to my 2D game and so far I ve found only two games with sources in WPF Are 2D games in W... 2


Longer Filenames with git merge

So I have a Git project and we a mostly typical Rails project have a pretty deep directory structure When I do git merge I see resu... 1

Follow us
References (part)