Search Results

Search found 63 results on 3 pages for 'vilx'.

Page 1/3 | 1 2 3  | Next Page >

  • What markup languages are good for programming articles/tutorials?

    - by Vilx-
    I very much wish to write a programming tutorial in my native language (Latvian). There are far too few of those. I am however unsure on what markup language to use for writing it. Here are a few things I would like to achieve: The same source can be compiled to both HTML for online viewing and printed form (PDF?). In HTML form it would allow superior interaction and appearance (see below), while the print form would look good on paper (layout etc). I have the idea that the tutorial could be multi-language. Different students have different requirements in their schools. For example, some schools teach Java, some teach C#. You could choose the language on the top of the HTML page and the relevant code snippets (and occasionally pieces of text) would swap out. Most of the text is the same anyway, only the language syntax is a bit different. The text would occasionally contain images too of course and these would need to be included in both the HTML and the printed version In the HTML version the code snippets should get automatic syntax coloring which should ideally be the same as in the recommended IDE for the tutorial. In case there are ambiguities, hints for the syntax colorer should be possible, but I don't want to do the whole coloring by hand. "Output" syntax coloring which would emulate a standard 80x25 text console (since many of the initial programs would be console applicatioins) Collapsible sections for answers to questions (aka "spoiler tags") Automatically generated index/table-of-contents Links to other parts of the tutorial (rendered as links in HTML and as references in print version) "Side note" sections, rendered as separate blocks on the side. Other functions useful in publications that I'm not aware of :) I know this is a bit much to ask, but is there something close enough that I could take it as a starting point and add the necessary features myself? Or is there something in the whole list (like the desire to have both HTML and print versions from the same source) that makes it all fundametally infeasible?

    Read the article

  • Should a stack trace be in the error message presented to the user?

    - by Vilx-
    I've got a bit of an argument at my workplace and I'm trying to figure out who is right, and what is the right thing to do. Context: an intranet web application that our customers use for accounting and other ERP stuff. I'm of the opinion that an error message presented to the user (when things crash) should include as much information as possible, including the stack trace. Of course, it has to start with a nice "An Error has occurred, please submit the below information to the developers" in large, friendly letters. My reasoning is that a screenshot of the crashed application will often be the only easily available source of information. Sure, you can try to get a hold of the client's systems administrator(s), attempt to explain where your log files are, etc, but that will probably be slow and painful (talking to the client representatives mostly is). Also, having an immediate and full information is extremely useful in development, where you don't have to go hunting through the log files to find what you need on every exception. (But that could be solved with a configuration switch.) Unfortunately there has been some kind of "Security audit" (no idea how they did that without the sources... but whatever), and they complained about the full exception messages citing them as a security threat. Naturally, the clients (at least one that I know of) has taken this at face value and now demands that the messages be cleaned. I fail to see how a potential attacker could use a stack trace to figure anything out he couldn't have figured out before. Are there any examples, any documented proof of anyone ever doing that? I think that we should fight this foolish idea, but perhaps I'm the fool here, so... Who's right?

    Read the article

  • Have you worked with a well designed application?

    - by Vilx-
    Inspired by this question, I started wondering - is there or has there ever been such a thing as a "well designed application"? One where the architecture would be perfect and no refactoring would ever be needed; code would be easy to read and understand even for someone new to the project; changes could be done with a 100% certainty that they won't break anything; etc? I must admit that whatever codebases I've worked with, they've all been more or less a mess. Even code that I start myself only stays organized at the start, and then slowly deteriorates as the time passes. I'm even starting to accept this as part of life and can't figure out whether I should be worried about that or not. So... is there such a thing as a "well designed application"? Or is all our code so shitty that there isn't even a point in trying to make it better, because it will never be good anyway?

    Read the article

  • Can you/should you develop components for ASP.NET MVC?

    - by Vilx-
    Following from the previous question I've started to wonder - is it possible to implement "Components" in ASP.NET MVC (latest version)? And should you? Let's clarify what I mean with a "component". With that I mean a "control" (aka "widget"), similar to those that ASP.NET webforms is built upon. A gridview might be a good example. In webforms I can place on my form a datasource component (one line of code), a gridview component (another line of code) and bind them together (specify an attribute on the gridview). In the codebehind file I fill the datasource with data (a few lines of DB-querying code), and I'm all set. At this point the gridview is a fully functional standalone component. I can open the form, and I'll see all the data. I can sort it by clicking on the column headers; it is split into several pages; I can drag the column headers around and rearrange columns; I can turn on "grouping" mode; etc. And I don't need to write another line of code for any of it. The gridview, as a component, already has all the code tucked away in its classes and assemblies. I just place it on the form, initialize it, and it Just Works. At some times (like sorting or navigation to a different page) it will also perform ajax callbacks to the server, but those too will be handled internally, with my code having no knowledge at all about it. And then there are also events that I can attach if I want to get notified when something happens. In MVC I cannot see a way of doing this cleanly. Sure, there are the partial views, but those only handle half of the problem - they render the initial HTML. Some more can be achieved with client-side Javascript (like column re-arranging), but when the grid needs to do an ajax callback (say, to fetch the next page of data), my code will have to get involved and process that request. At best I guess I can provide some helper methods to process it, but I'll have to write the code that calls them, and also provide a controller method with signature matching the arguments of that callback. I guess that I could make some hacks with global events or special routes or something, but that just seems... hackish. Unelegant. Perhaps this is not the MVC way? Although I've completed one project in it, I'm still far from being an MVC expert. But then what is? In the intranet application that we're building there are dozens upon dozens of such grids. Naturally I want them all to have a unified look & behavior, and I don't want to repeat the same code all over the place. So what's the "MVC" approach to this problem?

    Read the article

  • Confusion about Kerberos, delegation and SPNs.

    - by Vilx-
    I already posted this question on SO, but the nature of it is between programming and server configuration, so I'll re-post it here as well. I'm trying to write a proof-of-concept application that performs Kerberos delegation. I've written all the code, and it seems to working (I'm authenticating fine), but the resulting security context doesn't have the ISC_REQ_DELEGATE flag set. So I'm thinking that maybe one of the endpoints (client or server) is forbidden to delegate. However I'm not authenticating against an SPN. Just one domain user against another domain user. As the SPN for InitializeSecurityContext() I'm passing "[email protected]" (which is the user account under which the server application is running). As I understand, domain users have delegation enabled by default. Anyway, I asked the admin to check, and the "account is sensitive and cannot be delegated" checkbox is off. I know that if my server was running as a NETWORK SERVICE and I used an SPN to connect to it, then I'd need the computer account in AD to have the "Trust computer for delegation" checkbox checked (off by default), but... this is not the case, right? Or is it? Also - when the checkbox in the computer account is set, do the changes take place immediately, or must I reboot the server PC or wait for a while?

    Read the article

  • Can a power failure or forceful shutdown damage hardware?

    - by Vilx-
    In an unrelated Internet forum I got into a discussion about hardware damage from forceful shutdowns (holding the power button for 5 seconds) and power failures. I was in the opinion that normal PC hardware does not suffer from this - after all, it's not much different than what they experience under a standard shutdown. But another person thought that it could do physical harm to the hard drive and possibly other components as well. He also said that the journaling features of filesystems are useless in face of power failures and were intended to help mitigate damage from system crashes. Now... I think this is nonsense, but then again I lack the experience and knowledge to say it with certainty. Perhaps someone else is more knowledgeable in this area and can shed light on this burning issue? :)

    Read the article

  • Why are there hard faults when my RAM is not 100% used?

    - by Vilx-
    I've got 2GB of RAM and the resource monitor shows that it's only used about 75%. However there are some apps (NetBeans, Visual Studio) that every once in a while start making a lot of hard faults (up to and over 2000/min), thus predictably slowing down to a crawl. How is this so? The memory usage during these "fits" doesn't change. Perhaps it also includes memory mapped files or something?

    Read the article

  • Unlocking AMD Phenom II X2 550 Black Edition cores - what are the risks?

    - by Vilx-
    I've got the above mentioned CPU and a GigaByte GA-MA790XT-UD4P motherboard, which should be capable of unlocking the extra two cores - if I'm lucky and they're not faulty. The Internet is full of instructions on how to do that. What I don't have is spare money to buy new hardware if I brick something. What are the risks when attempting to do this? Is it completely safe, or can I be left with an expensive pile of junk? What should I keep in mind when doing so? Bigger cooler maybe (I'm running with the default box cooler)? Should I lower the frequencies too? I've never done any OC before.

    Read the article

  • Is a rubber keyboard suitable for heavy use?

    - by Vilx-
    Every keyboard wears out with time, and mine has some age already. The day it fails is coming closer and closer. So I'm slowly starting to look around for a new one. I use the keyboard for gaming and programming, so it gets some pretty solid use. I also tend to eat by the computer, so there's plenty of... uhh... lifeforms down there. Anyway, I was looking at these rubber keyboards. They come pretty cheap (my local computer shop has one for less than $20) and they seem to have some nice properties. They can be easily cleaned, they're quiet, and can be rolled up when needed (plus no worries about spilled drinks). However I'm wondering what their type-ability is. If I can't write on it at a decent speed, the rest of the features don't matter. Not that I'm a fast typer, but being a professional progammer does give a boost to the skill. I couldn't find any reviews on the net so I'm turning to you. Who has used these keyboards and what was your experience? Perhaps there is something else I haven't though of why such a keyboard would not be a good idea?

    Read the article

  • Keyboard lights sometimes stay on after PC is powered off. Why?

    - by Vilx-
    Sometimes when I power off my PC some lights on the keyboard stay on. It's pretty random which ones, though I suspect it has something to do with what lights were on just before the shutdown (if I vigorously follow that they are all off while the PC is shutting down then they stay off). Not that this would change anything, but it is annoying. Why does this happen and how can I avoid it? Added: I know that I can turn off the power completely to my computer and it will go off. That's not the point. Actually, I even want my keyboard to have power, because I use it to turn on my computer (the power button on the case is difficult to reach). I just want the lights to go off. Or at least understand why this happens. Oh, and it's a PS2 keyboard.

    Read the article

  • Does Windows 7 allow advanced skinning like Windows XP?

    - by Vilx-
    The Windows 7 Aero interface looks great, but after looking at it for months it gets boring. So I was wondering - is it possible to create advanced skins for Windows 7 that use full Aero capabilities but are redesigned from ground up, including common controls, animations, effects, etc? Windows XP allowed that, although only with a patched uxtheme.dll. Or do you have to implement a custom shell for that?

    Read the article

  • How to pin NetBeans to Windows 7 taskbar?

    - by Vilx-
    I've googled around and it seems that I'm not the only one with the problem, however I couldn't find the solution. Maybe someone around here has figured it out. The problem is that netbeans.exe is actually a stub which is calling javaw.exe. When I try to pin the NetBeans process to the taskbar I actually pin "Java(TM) Platform SE Binary". That changes the icon and the pin doesn't work. The funny thing is that it works on another machine. I don't know whether it's because it's a different version of NetBeans, or a different version of Java. Has anyone figured this out? Added: I know this is sort of not programming related; on the other hand there are plenty of topics around here about how to better your programming environment, and this one is no worse than those. Oh, and btw - Windows 7 Enterprise x64; Java JDK 1.6.17; Netbeans 6.8

    Read the article

  • Can a power failure or forceful shutdown damage hardware?

    - by Vilx-
    Can computer hardware suffer damage from forceful shutdowns (holding the power button for five (5) seconds) or power failures? I believe that normal PC hardware does not suffer from this - after all, it's not much different than what they experience under a standard shutdown. But elsewhere I've read tht another person thought that it could do physical harm to the hard drive and possibly other components as well. He also said that the journaling features of filesystems are useless in face of power failures and were intended to help mitigate damage from system crashes. I think this is nonsense, but then again I lack the experience and knowledge to say it with certainty.

    Read the article

  • How to pin NetBeans to Windows 7 taskbar?

    - by Vilx-
    I've googled around and it seems that I'm not the only one with the problem, however I couldn't find the solution. Maybe someone around here has figured it out. The problem is that netbeans.exe is actually a stub which is calling javaw.exe. When I try to pin the NetBeans process to the taskbar I actually pin "Java(TM) Platform SE Binary". That changes the icon and the pin doesn't work. The funny thing is that it works on another machine. I don't know whether it's because it's a different version of NetBeans, or a different version of Java. Has anyone figured this out? Added: I know this is sort of not programming related; on the other hand there are plenty of topics around here about how to better your programming environment, and this one is no worse than those. Oh, and btw - Windows 7 Enterprise x64; Java JDK 1.6.17; Netbeans 6.8

    Read the article

  • CentOS send mail with external SMTP server and without local daemons

    - by Vilx-
    I've got a little old server with CentOS 6.5 on it. The hardware is old and crappy, but enough for what it has to do. Which consists of SSH (+SFTP), Apache, PHP and MySQL. Still, I'm trying to cut away all that I can. One thing that it does not need to do is to be an SMTP server. There are no mailboxes on it and nobody will ever route mail through it. However I do want it to send me an email when something goes wrong. Also, the webpages will send emails from PHP. So that brings me to the question - can I set up the mail system in such a way that there isn't an expensive mailer daemon sitting in the background with queues and whatnotelse, but rather every email is directly and immediately delivered to an external SMTP server? And how do I go about it?

    Read the article

  • How to burn a 8.5GB ISO?

    - by Vilx-
    I have an ISO image of a DVD which is 8.5GB in size. I find this strange, because that is about 500MB more than a standard DL DVD can hold. I tried overburning with Nero, but it failed. Is it possible to somehow burn such an image? Are there some special DVD blanks that allow you to write more? Or is this ISO simply made by some tool without any regards of whether it can be burned or not?

    Read the article

  • What sound cards are there besides Creative's that offer benefits for gaming?

    - by Vilx-
    Many years (6? 7?) ago I bought an Audigy sound card to replace the onboard sound and was astonished at the improvement in games. It was a completely different sound, the whole experience became way more immersive. As the time has passed however the card has become old. The support for the latest Windows versions is declining and newer technologies have definitely been developed. So I was starting to wonder - what newer hardware exists? Sure, there is the Sound Blaster X-Fi, but that's quite expensive and I'm not entirely thrilled by past policies of Creative either (like the whole affair with Daniel_K). But are there any alternatives? EAX is a patent by Creative, so it's doubtful that any other manufacturer has implemented it. And I haven't heard of any competing standards either. To clarify, what I would like is something like a "sound accelerator". A sound card that would offload sound processing from my CPU while at the same time giving astounding effects that would be impractical to do on CPU in the first place. I'm not interested in absurd sampling rates (for the most time I can't tell MP3 and a CD apart) or uncountable channels (I'm using stereo headphones). But I am interested in special effects in games. Are there any alternatives or is Creative a monopoly in this market?

    Read the article

  • Is there a software that can remap the keys for a speficic keyboard?

    - by Vilx-
    There are several keyboards attached to my computer. I'd like to remap the keys on ONE of them, but keep the rest as they were. Is there a software that does this? As for the "why" - I have this idea that I'd like to have a "multimedia keypad" which is separate from my main keyboard, but I could not find any online. So I think that I could take a typical USB numpad (they cost like 5$), and remap the keys on one of them. Add appropriate stickers, and I'm all seat, cheaply. I know that it's theoretically possible, but before I get my hands dirty and write my own software, I'd like to see if there's maybe an existing one out there. Oh, yes, I'm running Windows 7.

    Read the article

  • Is there a limit on CNAME records for subdomains?

    - by Vilx-
    I've bought a domain, say mydomain.com. I'd like to set up google apps to work with it. As such, I'd like to create subdomains like mail.mydomain.com, docs.mydomain.com, etc. To integrate it with google, I must add to all of them CNAME records to ghs.google.com. However my domain registrar says that they can create only one CNAME in my domain, for which they chose mail.mydomain.com. The rest of them, they say, I must create as A type records. Are they being lazy, or is there some limitation here that I'm not aware of?

    Read the article

  • Confusion about Kerberos, delegation and SPNs.

    - by Vilx-
    I'm trying to write a proof-of-concept application that performs Kerberos delegation. I've written all the code, and it seems to working (I'm authenticating fine), but the resulting security context doesn't have the ISC_REQ_DELEGATE flag set. So I'm thinking that maybe one of the endpoints (client or server) is forbidden to delegate. However I'm not authenticating against an SPN. Just one domain user against another domain user. As the SPN for InitializeSecurityContext() I'm passing "[email protected]" (which is the user account under which the server application is running). As I understand, domain users have delegation enabled by default. Anyway, I asked the admin to check, and the "account is sensitive and cannot be delegated" checkbox is off. I know that if my server was running as a NETWORK SERVICE and I used an SPN to connect to it, then I'd need the computer account in AD to have the "Trust computer for delegation" checkbox checked (off by default), but... this is not the case, right? Or is it? Also - when the checkbox in the computer account is set, do the changes take place immediately, or must I reboot the server PC or wait for a while?

    Read the article

  • .NET remoting exception: Permission denied: cannot call non-public or static methods remotely.

    - by Vilx-
    I'm writing a program which will allow to load a specific managed .DLL file and play with it. Since I want the ability to unload the .DLL file, I'm creating two AppDomains - one for the app itself, the other for the currently loaded .DLL. Since most of the objects in the loaded .DLL do not serialize well, I'm creating a MarshalByRefObject wrapper class which will keep the object itself in its own AppDomain, and expose some reflection functions to the main application AppDomain. However when I try to invoke a method on the remote object I get stuck with an exception: Permission denied: cannot call non-public or static methods remotely. This is very strange, because I'm not using any non-public or static methods at all. In essence, what I have is: class RemoteObjectWrapper: MarshalByRefObject { private Type SourceType; private object Source; public RemoteObjectWrapper(object source) { if (source == null) throw new ArgumentNullException("source"); this.Source = source; this.SourceType = source.GetType(); } public T WrapValue<T>(object value) { if ( value == null ) return default(T); var TType = typeof(T); if (TType == typeof(RemoteObjectWrapper)) value = new RemoteObjectWrapper(value); return (T)value; } public T InvokeMethod<T>(string methodName, params object[] args) { return WrapValue<T>(SourceType.InvokeMember(methodName, System.Reflection.BindingFlags.FlattenHierarchy | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public, null, this.Source, args)); } } And I get the exception when I try to do: var c = SomeInstanceOfRemoteObjectWrapper.InvokeMethod<RemoteObjectWrapper>("somePublicMethod", "some string parameter"); What's going on here? As far as I can understand, the InvokeMethod method doesn't even get executed, the exception is thrown when I try to run it. Added: To clarify - SomeInstanceOfRemoteObjectWrapper is constructed in the .DLL's AppDomain and then returned to my main AppDomain, The InvokeMethod<T>() is called from my main AppDomain (and I expect it to execute in the .DLL's AppDomain).

    Read the article

  • PHP doesn't properly URL-decode POST values, or is the bug somewhere else?

    - by Vilx-
    I have a PHP website that integrates with PayPal. As part of it's normal operation it sends a POST request to a user defined URL about every transaction (and some other events). It's called IPN for those who know. All was/is working just fine, until we moved to a new hosting provider last week. This naturally resulted in downtime, changing DNS entries, PHP misconfigurations, etc. In short - PayPal was unable to send the notifications for a few days. Now, this is not that bad, because there is an option just for that - you can log into PayPal, go to the appropriate menu item, and have it resend the failed notifications. Which we did, and it resulted in over 400 error emails. The problem is that normally the email of the receiver ($_POST['business']) is received by PHP as [email protected], but when resending it comes out as my%40business.com. And the request validation goes crazy. Obviously either something somewhere is missing a call to urldecode() or something is doing one too many urlencode(). But who? Is this a bug in PHP? I've never had such a problem before, not with any POST data ever. Perhaps PayPal has a bug? Wouldn't be surprising, but then this should have been caught ages ago. Or perhaps I'm doing something wrong and I should really be calling the urldecode() myself?

    Read the article

  • Is there something like a "long running offline transaction" for NHibernate or any other ORM?

    - by Vilx-
    In essence this is a followup of this question. I'm beginning to feel that I should give up the whole idea, but I'll give it one more shot. What I want is pretty much like a DB transaction. It should track my changes to the DB and then in the end allow me to either commit or rollback them. If I insert an object, I should get it back in my next (appropriate) SELECT query. If I delete it, future SELECT queries should not return it. Etc. But there is one catch - this transaction would be very long running. It would start when the user opened a form (I'm talking about Windows Forms here), and the commit/rollback would be when the user closed it(with OK/Cancel). So it could take anywhere between seconds and days. This requirement rules out a standard DB transaction because that would lock the tables/rows it touched, and other users wouldn't be able to use the system. Also the transaction should not commit ANY changes to the DB until it was really committed. So if one user makes some changes, others don't see them until OK button is hit. This prevents errors in case the computer crashes or is disconnected from the network. I'm quite OK if the solution puts constraints on my model (I'm using MSSQL 2008, btw). I can design the DB/code any way I like. I'm also fine with the idea that a commit could fail because someone already modified one of the objects my transaction touched. Is there anything like this? I looked at NHibernate.Burrow, but I'm not sure that that's the thing I want. Added: It's the very beginning of the project so I'm not tied to NHibernate. I started out with it but I can still change easily.

    Read the article

  • How Random is System.Guid.NewGuid()? (Take two)

    - by Vilx-
    Before you start marking this as a duplicate, read me out. The other question has a (most likely) incorrect accepted answer. I do not know how .NET generates its GUIDs, probably only Microsoft does, but there's a high chance it simply calls CoCreateGuid(). That function however is documented to be calling UuidCreate(). And the algorithms for creating an UUID are pretty well documented. Long story short, be as it may, it seems that System.Guid.NewGuid() indeed uses version 4 UUID generation algorithm, because all the GUIDs it generates matches the criteria (see for yourself, I tried a couple million GUIDs, they all matched). In other words, these GUIDs are almost random, except for a few known bits. This then again raises the question - how random IS this random? As every good little programmer knows, a pseudo-random number algorithm is only as random as its seed (aka entropy). So what is the seed for UuidCreate()? How ofter is the PRNG re-seeded? Is it cryptographically strong, or can I expect the same GUIDs to start pouring out if two computers accidentally call System.Guid.NewGuid() at the same time? And can the state of the PRNG be guessed if sufficiently many sequentially generated GUIDs are gathered?

    Read the article

1 2 3  | Next Page >