Posts

Batch copy files from list and preserve folder structure

@echo off set src_folder=F:\AVA3 set dst_folder=F:\AVA3_UNIQ set file_list=F:\recordings.txt for /f "delims=" %%a in (%file_list%) do (  echo "%%~pa"  echo "%src_folder%%%a"  echo "%src_folder%\%%a"  if not exist "%dst_folder%\""%%~pa" mkdir "%dst_folder%\""%%~pa"     xcopy "%src_folder%\%%a" "%dst_folder%\""%%~pa" /E )

How to invite all your Facebook friends to an event at once

UPDATED 12.12.2012 Step#1 . Open Google Chrome Step#2. Open any invitation dialog for Facebook pages, groups or events. Step#3. Don’t forget to check on “Search all Friends” in dialog box and scroll down until all your facebook appears. Step#4. Press CTRL+SHIFT+J , A window will open at the bottom. Step#5. Paste the JavaScript code given below in the console and hit enter button. AFTER YOU PRESSED ENTER YOU MUST WAIT 1-2 MINUTES:)

Key navigation

Callback functon - Fixed

I just love people who make the effort and help to teach others new stuff. But with code samples i don't understand why you don't test the code before publishing. I found an interesting example off callback function example but it was not working. Here is the proper stuff:) #include <stdio.h> #include <stdlib.h> typedef struct {   int age ;   char name [ 10 ] ;   char surname [ 10 ] ;         } person ; // Simple fuction to be called as callback void callMe ( person * m ) {   printf ( "%d %s %s \n \r " , m -> age , m -> name , m -> surname ) ; } int main ( int argc , char * argv [ ] ) {   // Declaration of pointer to function with same signiture as callMe   void ( * callback ) ( person * ) ;   // Create struct and fill with data   person s ;   s. age = 27 ;   //Don't forget how to copy strings in C/C++ ...

Delphi video tutorials

Delphi video tutorials http://delphi.wikia.com/wiki/Delphi_Videos

Bit manipulation

a |= 0x4; /* Set bit 2 */ b &= ˜0x4; /* Clear bit 2 */ c &= ˜(1 << 3); /* Clear bit 3 */ d ˆ= (1 << 5); /* Toggle bit 5 */ e >>= 2; /* Divide e by 4 */ f <<= 2; /* Multiplay f by power 2 of 2 = 4 */

Delay .bat script

Windows is a strange thing, especially at startup. Things are just loading and loading:) Sometimes strange things happen if a program in startup folder starts before everything is loaded. There is simple way to delay your program to start with ping command. Save bellow command to file and name give it an arbitrary name with bat extension. For example: run.bat ping -w 1000 -n 10 localhost D:\MyProgram.exe   Create link to this file in windows startup folder and your program will start after it pings itself 10 times. Bellow I also copied explanation about ping command. PING is used to test TCP/IP connectivity with another host and gives information about the length of time test data takes to be sent to the host and a reply received. Its most basic use is as follows: C:\ ping IP address or hostname Pinging 160.82.52.11 with 32 bytes of data: Reply from 160.82.52.11: bytes=32 time=10ms TTL=252 Reply from 160.82.52.11: bytes=32 time<10ms TTL=252 Reply from 160.8...