The database developer can, of course, throw all errors back to the application developer to deal with, but this is neither kind nor necessary. How errors are dealt with is dependent on the application, but the process itself isn't entirely obvious.
Compress live data by 73% Red Gate's SQL Storage Compress reduces the size…
So I have an issue that I'm laughing at myself about, because it really seems like it should be something that I should be able to figure out pretty quickly.
I am designing a 2D action platformer; I have a playable character, and a dummy 'punching bag' character for testing purposes that I've created. I've just gotten enough of both of them done…
Say you have two events: Action1 and Action2. When you receive Action1, you want to store some arbitrary data to be used the next time Action2 rolls around. Optimally, Action1 is normally a command however it can also be other events. The idea is still the same.
The current way I am implementing this is by storing state and then simply checking…
In this excerpt from his book Troubleshooting SQL Server: A Guide for the Accidental DBA, Jonathan Kehayias provides a guide to identifying the causes, reacting to, and ultimately preventing the dreaded deadlock.
What are your servers really trying to tell you?
Find out with new SQL Monitor 3.0, an easy-to-use tool built for…
(Almost-)POSIX-compliant operating systems and Windows are known to distinguish between 'binary mode' and 'text mode' file I/O. While the former mode doesn't transform any data between the actual file or stream and the application, the latter 'translates' the contents to some standard format in a platform-specific manner: line endings are…
I have a question that should not be too hard but it has been bugging me for a long time. I am trying to write a function that searches in a directory that has different folders for all files that have the extension jpg and which size is bigger than 0. It then should print the sum of the size of the files that are in these categories.
…
I am using Bootable USB for installing Ubuntu with Windows 8.1. I have put pendrive and then booting my USB. When it shows me to try Ubuntu or install Ubuntu. Then I press Try ubuntu and then it says" "The system is running in low graphics mode". Then I press Ok. Then it shows 4 options. Then again I click Ok. Then it shows a black…
I am porting an old eCommerce site to MVC 3 and would like to take advantage of design improvements. The site currently has product images stored in 3 sizes: thumbnail, medium (for display in a list) and expanded for a zoomed look. Right now we are having to upload 3 separate images that are sized exactly right, provide 3…
I see this question every so often so it makes sense to share it through a quick post. When using the print API in Silverlight 4 you can run into the dreaded exception: System.Security.SecurityException: Dialogs must be user-initiated Then you examine your code and confirm that your code where you invoke the…
I'm developing a PHP login component which includes functions to manipulate the User object, such as $User->changePassword(string $old, string $new)
What I need some advice with is how to return a status, as the function can either succeed (no further information needs to be given) or fail (and the calling code…
I had written a program in python to find b such that a prime number p divides b^2-8. The range for b is [1, (p+1)/2].
For small integers it works, say only up to 7 digits. But not for large integers, say for p = 140737471578113. I get the error message
for i in range (2,p1,1):
MemoryError
I wrote the…
Yes yes, I am aware that '\n' writes a newline in UNIX while for Windows there is the two character sequence: '\r\n'. All this is very nice in theory, but my question is why? Why the carriage return character is extra in Windows? If UNIX can do it in \n why does it take Windows two characters to do this?
I am…
So I have been looking through some code I wrote a few years ago for an economic simulation program. Each simulation has a large number of settings that can be saved to a file and later loaded back into the program to re-run the same/similar simulation. Some of the settings are optional or depend on what is…
So I got into SDL2 with C++ quite recently and I did this very simple code :
int main(int argc, char** argv)
{
SDL_Event *event;
bool done = false;
if(SDL_Init(SDL_INIT_VIDEO) != 0)
{
std::cerr << "Problèmes pour initialiser la SDL : " << SDL_GetError() << std::endl;
return 1;…
I am new to game development and am working on my first game using OpenGL and C++.
I have a game class which handles everything necessary in an update() function.
Now i want to handle keyboard inputs. I use GLFW which supports key callbacks. However i wonder how to deal with inputs. Should i record the…
How can I handle timeouts in a network application.
I'm implementing a provisioning system on a Linux server, the code is huge so I'm going to put the algorithm, it works as like this
Read provisioning commands from file
Send it to another server using TCP
Save the request in hash.
Receive the…
The backup and restore system in SQL Server hasn't changed a great deal over the years despite a huge growth in the typical size of databases. When disaster strikes, and an important service is taken offline while a restore is performed, there is often time to reflect on whether it might be possible…
I work on the software side of a company that provides custom hardware with software running on top of it. Often times the hardware is not engineered well. In those cases, I am often asked first to troubleshoot the problem - of course the symptom is always "your software crashed" or something…
I want to make a game which is totally same idea with "Who pressed the button answers the question"
I got 2 joysticks and both connected to a pc.My application will be Winforms and i will develop it on Visual studio 2012 .
I 've used SlimDX,Sharpx so far i ' ve nothing for multiple…
I'm working on a domain-specific language (DSL) for non-programmers. Non-programmers make a lot of grammar mistakes: they misspell keywords, they don't close parentheses, they don't terminate blocks, etc.
I'm using ANTLR to generate my parser; it provides a nifty mechanism for…
Hi,
my code is fairly well covered with exception handling (try..except). Some exceptions are not expected to happen and some exceptions happen fairly often, which is expected and ok. Now I want to add some automated tests for this code. It would be good to know how many…
I want to implement the handling of an additional swipe gesture in my UITableViewController. However, it seems that in the case of tableviews the usual touch handling methods like -[touchesBegan::] of the controller are not called. How can I handle touches on a…
Hi All,
Adding Exceptional Handling is a good practise, but I have a doubt, In our database we have 10 SPs which are accessed by our data access layer, there is not much logic and the queries are also not big.The purpose of keeping the queries in SPs was to…