Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Programming and Coding

Programming and coding tips, help and solutions...

  1. LCF-AT
    Started by LCF-AT,

    Hi guys, today I check some of my windows sockets codes and wanted to update & optimze it a little writing some clean code without to be messy to have also a better view on it.Now I came to the hostent struct which returns a pointer to this struct after calling gethostbyname / gethostbyaddr.Now in the MSDN description I can read that this struct is only used once for each call to this function and getting overwritten by another call.Now they say I should copy the struct into other buffer. So does it mean I dont need to copy it into extra buffer if I call the function from diffrent created threads?Just if I use same thread = copy to buffer?So normaly I ca…

      • Like
    • 8 replies
    • 6.2k views
  2. CodeExplorer
    Started by CodeExplorer,

    Getting most significant bits... I could only think of this: #define GetLSBs(x,n) (x&((1<<n)-1)) unsigned int GetMSBs(unsigned int x,unsigned n) // n number of bits to get from i = 0 { // n = numbers of bits to get unsigned int LSB = GetLSBs(x,32-n); unsigned int MSB = x-LSB; return MSB; } I've thinked of getting MSB with "and" instruction; anyway I've failed to get bits mask: first bit, first two bits, first 3 bits ...: 1000 // 8 1100 // 12 1110 // 14 1111 // 15

      • Thanks
    • 4 replies
    • 5.1k views
  3. abbas
    Started by abbas,

    hi all I want to create a language teaching game and I have 0 experience in this field but I played a lot of games. now I want you guys to tell me briefly what things I should go for and give me links you think is essential.

    • 2 replies
    • 4.8k views
  4. zodiac
    Started by zodiac,

    I have a code for converting serials into segments written in C ++. Now I want to use this code in an application that I wrote in Delphi. I've translated some of the code but I did not understand a number of commands. Help me convert my code into Delphi std::string hwid_str = "aDBUvGX+SZeXe0ZRtjUGQTpD2jk="; size_t len = hwid_str.size(); uint8_t *hwid = new uint8_t[len]; Base64Decodehwid_str.c_str(), hwid_str.size(), hwid, len); for (size_t i = 0; i < len; i += 4) { uint32_t value = *reinterpret_cast<uint32_t *>(&hwid[i]); uint32_t id = value & ~3; switch (value & 3) { case 0: …

    • 0 replies
    • 5.4k views
  5. CodeExplorer
    Started by CodeExplorer,

    Four Ways to Compile C for Windows: https://nullprogram.com/blog/2016/06/13/ Pelles C statement: So that statement is true? Are performances lower if I use Pelles C???

      • Like
    • 2 replies
    • 4.8k views
  6. malware
    Started by malware,

    How to send email smtp using winsock C++?

      • Like
    • 2 replies
    • 4.7k views
  7. CodeExplorer
    Started by CodeExplorer,

    Easy way to write chars to file? Tried http://www.java2s.com/Code/Cpp/File/Writeunsignedchartoafileandreaditback.htm ofstream out("D:\\block1"); out.write((char *) &block1Conv, sizeof block1Conv); out.close(); There is a problem: it will replace 0A with 0D0A How I can avoid the newline stuffs?

      • Like
      • Thanks
    • 1 reply
    • 4.5k views
  8. fearless
    Started by fearless,

    Mainly for anyone using asm and interested in custom controls or adding more functionality to their projects, I recently began work in porting over, adapting and adding to DrawHTML code from Ukkie9: https://www.codeproject.com/Articles/7936/DrawHTML I created two functions: DrawHTMLCODE and DrawBBCODE that processes html or bbcode tags in a string and adjusts the text and font style accordingly and outputs the result as per DrawText or DrawTextEx win32 api functions, but with the added enhancements. So far some tags are supported, not all. Mainly ones that are more common in use, or made sense to include. Anyhow I have put the code on github for anyone to u…

    • 0 replies
    • 4.4k views
  9. LCF-AT
    Started by LCF-AT,

    Hi guys, does anyone know how to decompress CWS files to FWS (decompressed) manually or via dll / API xy? My first goal was it to find any internet request paramter what could do decompress directly on fly but I didnt found such command and can only download the CWS file.Now I got this in memory and would like to decompress it now before writing the file.Next I tried to find any way to do this manually but also didnt find a description how to decompress CWS by hand.As next I tried to find any dll / APIs which I could use to decompress the CWS / bytes in memory and just found infos about zlib but also there I found no infos about CWS etc.Now the question is how t…

      • Like
    • 10 replies
    • 11.5k views
  10. malware
    Started by malware,

    What UI (user interface) used to develop kesperky antivirus? avat and eset and bitdefder? They have some sick gui. I wanna develop UI like them I guess bitdefender used embedded html and css UI..

      • Like
    • 6 replies
    • 6.4k views
  11. LCF-AT
    Started by LCF-AT,

    Hi guys, so I would like to visit a website as usual in browser (visit site / all links gets loaded / webconsole) but this time I wanna visit it "without using a browser".How can I do this and/or what kind of tools / libs engines etc are already out there I could use for that etc?So my goal is it to get all loading links of a site.So thats diffrent to just call only one website to grab the pagesource and in this new case I need to find some link/s during the site is loading it and which are not present into the main site.Maybe anyone could help with some infos for that etc. Thank you

    • 0 replies
    • 4.5k views
  12. James Taylor
    Started by James Taylor,

    i am new to assembly programming. First i thank to member of tuts4you for being helpful in needy times. I am learning assembly from online and books. i am stuck on point. I am having problem using 1. lea eax, [esp-04h*2] 2. mov [ebx-04h], bp ; 3. cmp [esi+eax-06h], 'KCUF' 4. cmp word ptr [ebx+18h], 01h 5. cmp dword ptr [esi], 00455000h or similar code snippet. Thanks, I know this is very basic question to ask but i wanna learn from here as well. Please take some moment and explain what address mode it is and what does the code do. Thanks

    • 11 replies
    • 5.6k views
  13. James Taylor
    Started by James Taylor,

    the following cods is generated by IDA pro. I don't understand where and what is assigned to off_40G030? there is no reference in code section. what does the following code mean? what is the clean code of the following code?

      • Sad
      • Thanks
      • Like
    • 5 replies
    • 5.2k views
  14. pwnium
    Started by pwnium,

    Hello there ! how to write a program add two numbers and print the result in text box in order to print the result we can use SetDlgItemText Funtion , the problem is i don't know how to add two numbers .. what functions we need ? am using MASM32 , and RadASM IDE Regards,

      • Like
      • Confused
    • 7 replies
    • 6k views
  15. LCF-AT
    Started by LCF-AT,

    Hi guys, I have some trouble again with that quotation marks issues for paths etc.Just wanna ask again how to do it right and how to handle it without to get any errors starting commandline tools with paths and arguments.I get always problems if paths using spaces and if not all works.In this case I try to qms for the path but it also fails. Example: Below without qms for ffmpeg path so I changed the bin folder and added some spaces for testing... cmd.exe /c C:\FFMPEG_Sets\ffmpeg-3.3.4-win32-static\bin 1 2\ffmpeg.exe -i "https:///.....m3u8" -vcodec copy -acodec copy -f mpegts - | "C:\Program Files\VideoLAN\VLC\vlc.exe" - Now in cmd window I get this error…

      • Like
    • 4 replies
    • 5.1k views
  16. CodeExplorer

    Local variables definition versus class (instance) variable definition speed: int K2[3] = { 0xd76aa478, 0xe8c7b756, 0x242070db}; void Function() { int K1[3] = { 0xd76aa478, 0xe8c7b756, 0x242070db}; int before2 = GetTickCount(); for (int ki2=0;ki2<1000000;ki2++) { for (int j=0;j<3;j++) { int a = K2[j]; } } int after2 = GetTickCount(); int before1 = GetTickCount(); for (int ki1=0;ki1<1000000;ki1++) { for (int j=0;j<3;j++) { int a = K1[j]; } } int after1 = GetTickCount(); // the results: int dif1 = after1-before1; int dif2 = after2-before2; } K1 version (local variable version) speed suppose to be much faster since is defined on stack, …

    • 6 replies
    • 4.8k views
    CodeExplorer
  17. pwnium
    Started by pwnium,

    i tried to write a small program that run some useful tools that i need , unfortunately the program run only in my computer how can i fix that problem , another question ... i'm just a beginner so the i've repeated CreateProcess and ResumeThread so many times i guess am doing this wrong ! please correct me i called this small Program EX_Runner the source code , .386 .model flat, stdcall ;32 bit memory model option casemap :none ;case sensitive include EX_Runner.inc include comdlg32.inc includelib comdlg32.lib .const sla db"\",0 FilterStr db "Executable Files","*.exe",0,0 .data olly db "C:\RCE\RAMODBG v1.1\OLLYDBG.EXE",0 IDA db "C:\RCE\Tools\IDA Pro\IDA…

      • Like
    • 4 replies
    • 5.6k views
  18. LCF-AT
    Started by LCF-AT,

    Hi guys, I am trying to read the resources directory of any target to read the whole content inside but now I have the problem that I dont understand it yet correctly using the structs for them. Example: Below the structs I found for resources IMAGE_RESOURCE_DIRECTORY STRUCT Characteristics dd ? TimeDateStamp dd ? MajorVersion dw ? MinorVersion dw ? NumberOfNamedEntries dw ? NumberOfIdEntries dw ? IMAGE_RESOURCE_DIRECTORY ENDS IMAGE_RESOURCE_DIRECTORY_ENTRY STRUCT union rName RECORD NameIsString:1,NameOffset:31 Name1 dd ? Id dw ? ends union OffsetToData dd ? …

      • Like
    • 58 replies
    • 21.7k views
  19. James Taylor
    Started by James Taylor,

    What is the assembly source code of the following C code? line 1 loading address of array from stack. what the 2 and 3 and others line are doing? Thanks

    • 4 replies
    • 4.8k views
  20. GautamGreat
    Started by GautamGreat,

    Hi, I'm trying to load a dll from a memory section in a compiled program. I written a MultiASM Assembly (Which works pretty well on Window 7), Everything seems Ok on windows 7, but it does not work on win8 and win10. Since I don't know what is wrong, could someone tell what is wrong? Spoiler Solved Here is my ugly assembly, but it works Edit (13 July 2018) I managed to fix the error, Thanks you guys

    • 3 replies
    • 5k views
  21. ViL
    Started by ViL,

    helloo! may i ask which assembler is better suited for a < 4k intro for a 32 bits windows? = 3 thaanks beforehand! x3

    • 4 replies
    • 5.1k views
    Peter Ferrie
  22. James Taylor
    Started by James Taylor,

    is the lea edx, [esp+24] start of array ? and eax, [esp+140] index? then whats add eax, edx doing here and this source code mean ? can you please explain

      • Like
    • 7 replies
    • 9.4k views
    Peter Ferrie
  23. ViL
    Started by ViL,

    Hii! i've stumbled on PNGlib like it's the only png decoder for masm, it is the only one out there? this is the site of PNGlib http://www.madwizard.org/programming/projects/pnglib while it's considerably small, uPNG on C output is even smaller, counting kb; but some pairs of kb makes the difference on tiny intros may i ask if anyone knows another png decoder for masm? any idea is very welcome! x3

  24. CodeExplorer
    Started by CodeExplorer,

    Looking for PreciseTimer.zip - Visual C++ https://www.codeguru.com/cpp/w-p/system/timers/article.php/c5759/Creating-a-HighPrecision-HighResolution-and-Highly-Reliable-Timer-Utilising-Minimal-CPU-Resources.htm Download links: (can't download if from any of them) http://en.pudn.com/Download/item/id/1109294.html http://www.codeforge.com/article/136174#introduction https://download.csdn.net/download/gddsky/267438 It would be great if someone would share PreciseTimer.zip!

      • Thanks
    • 4 replies
    • 4.6k views
    CodeExplorer
  25. ViL

    i was testing quads using multiple colors (gouraud-shade) and for some reason virtual machines either inverts the quad colors or vertex order here's a screenshot i did a test using the same exe in my host and guest virtual machine, at the left of their screen they are all three triangles, both quads at the right also enumerated the vertex order in which they are drawn in the image, you can notice the quads color or vertex are inverted on the virtual machine i tested on VMware and a friend also tested on VirtualBox, the result is the same on both, may i ask why this happens? attached the exe and source, the assembly source is here if that's better …

      • Like
    • 4 replies
    • 4.8k views

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.