In binary the high bit (the one immediately following the &b in Xojo code) is the “sign bit”. When it’s set to 1, the value is interpreted as “negative” and when it’s set to 0, the value is “positive”. Meaning that bit is not used as part of the “number” itself.
Month: February 2019
Code doesn’t care whether you are new to programming or an old pro, a citizen developer or the head of engineering, some missteps can catch any of us. Read on to learn some of the most common programming pitfalls and how to avoid them.
XML can sometimes be a bit confusing, so here are some tips to help you work with XML files.
First, you need to make sure your XML is really XML.
When you add a control such as a PushButton to a Window (or a WebButton to a WebPage or an iOSButton to an iOSView), an instance of the control is created for you and added to the layout. Code that is in the event handlers of a control added in this way can refer to both its own properties and methods as well as the properties and methods of the window.
A lot of times you’d think that single lines of code, aka “one-liners”, like
if j >= 145 condition then dosomething()
if condition then return
might not have any downsides. I would argue that they do.
It’s very usual to use encrypted SQLite databases in our Xojo projects where we expect to get the maximum read speed from them. But the truth is that encrypting the data in these databases can introduce a penalty in our queries, both from read and writing/updating data to them. How can we improve this? One technique is the creation of a new in-memory based SQLite database, where we will be able to copy the table (or tables) we are interested in getting the maximum speed possible with. Continue reading to see how to do this.
Do you need code to delete the files and folders from the selected folder? In that case, there is a technique I propose to you and that is based on recursion. That is, the ability of a function to call itself repeatedly until the task is complete; in this case, the function will call itself every time it detects a new folder/directory inside the designated original folder/directory.