Daily Archives

Articles indexed Thursday October 24 2013

Page 11/18 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • What are the tools required to build a compiler?

    - by kevin
    What are the various tools that are required to build a compiler for a particular programming language, say C? I want to know how each part of the compiler works. So, I am trying to use all the existing tools like loader, linker, etc, and combine them together to build one compiler (or can just say "compiling a compiler"). Can any one list out all such tools that are required to build a fully functional one?

    Read the article

  • Safest way (i.e. HTTPS, POST, PGP) to send decryption keys through the web?

    - by theGreenCabbage
    I am in the final stages of development for my Revit plugin. This plugin is programmed in C#, and distributed via a DLL. One of the DLLs is an encrypted SQLite database (with proprietary data) that is in the form of a DLL. Currently, in development stages, the decryption key for the SQLite database is hardcoded in my main DLL (the program's DLL). For distribution, since DLLs are easily decompilable, I am in need of a new method to decrypt the DLL. My solution is to send our decryption keys from our servers securely to the host's computer. I was looking in POST, thinking it was more secure than GET, but upon research, it appears it's similarly insecure, only more "obscure" than GET. I also looked into HTTPS, but Hostgator requires extra money for HTTPS use. I am in need of some advice - are there any custom solutions I can do to implement this?

    Read the article

  • Is it bad practise to call a controller action from a view that was rendered by another controller?

    - by marco-fiset
    Let's say I have an OrderController which handles orders. The user adds products to it through the view, and then the final price gets calculated through an AJAX call to a controller action. The price calculation logic is implemented in a seperate class and used in a controller action. What happens is that I have many views from different controllers that need to use that particular action. I'd like to have some kind of a PriceController that I could call an action on. But then the view would have to know about that PriceController and call an action on it. Is it bad practice for a view to call an action on a different controller from which it was rendered?

    Read the article

  • Syncing client and server CRUD operations using json and php

    - by Justin
    I'm working on some code to sync the state of models between client (being a javascript application) and server. Often I end up writing redundant code to track the client and server objects so I can map the client supplied data to the server models. Below is some code I am thinking about implementing to help. What I don't like about the below code is that this method won't handle nested relationships very well, I would have to create multiple object trackers. One work around is for each server model after creating or loading, simply do $model->clientId = $clientId; IMO this is a nasty hack and I want to avoid it. Adding a setCientId method to all my model object would be another way to make it less hacky, but this seems like overkill to me. Really clientIds are only good for inserting/updating data in some scenarios. I could go with a decorator pattern but auto generating a proxy class seems a bit involved. I could use a generic proxy class that uses a __call function to allow for original object data to be accessed, but this seems wrong too. Any thoughts or comments? $clientData = '[{name: "Bob", action: "update", id: 1, clientId: 200}, {name:"Susan", action:"create", clientId: 131} ]'; $jsonObjs = json_decode($clientData); $objectTracker = new ObjectTracker(); $objectTracker->trackClientObjs($jsonObjs); $query = $this->em->createQuery("SELECT x FROM Application_Model_User x WHERE x.id IN (:ids)"); $query->setParameters("ids",$objectTracker->getClientSpecifiedServerIds()); $models = $query->getResults(); //Apply client data to server model foreach ($models as $model) { $clientModel = $objectTracker->getClientJsonObj($model->getId()); ... } //Create new models and persist foreach($objectTracker->getNewClientObjs() as $newClientObj) { $model = new Application_Model_User(); .... $em->persist($model); $objectTracker->trackServerObj($model); } $em->flush(); $resourceResponse = $objectTracker->createResourceResponse(); //Id mappings will be an associtave array representing server id resources with client side // id. //This method Dosen't seem to flexible if we want to return additional data with each resource... //Would have to modify the returned data structure, seems like tight coupling... //Ex return value: //[{clientId: 200, id:1} , {clientId: 131, id: 33}];

    Read the article

  • Natural talent vs experience [on hold]

    - by Tord Johansson Munk
    Hi i have a question for you guys if you had a choice of hiring one of two programmers. One of them is a natural born programming talent, he has been programming since he was 14 year old and he has been programming all sorts of things by him self, 3d renders,games,his own frameworks, he is really good at algorithms and problem solving. He is now about 25 years old and is looking for a job after some unchallenged years of college the only experience he has is working on his own/university stuff and some open source project. This guy spends all his free time programming and has several pet projects at home. The other person is a 37 year old career programmer. He has been programming since he graduated from university at the age of 26 and have been working since then. He did not have an interest in programming before university. During his studies he discovered that programming was fun and challenging but it never was a "passion". During his career he mainly worked with "enterprise" platforms such as .net or javaEE. He mainly have done database business applications and thus is lacking skills of the young talent like abstract problem solving or algorithms. But he know the tools he has been using during the years and is reliable and almost always makes his boss happy. He keeps him self updated in the platform and tools he has and is using. But outside the office walls he don't touch any code at all. Witch one would you hire? Would you favor one of them in certain projects? Do you think that if the young talent learns his tools he will be a better programmer than the older one? Would your decision be different if both of them where lacking a degree? or if only one of them was lacking a degree be the old and experienced or the young genius.

    Read the article

  • Adding page title to each page while creating a PDF file using itextsharp in VB.NET

    - by Snowy
    I have recently started using itextsharp and gradually learning it. So far I created a PDF file and it seems great. I have added a table and some subtables as the first table cells to hold data. It is done using two for loops. The first one loops through all data and the second one is each individual data displayed in columns. The html outcome looks like the following: <table> <tr> <td>Page title in center</td> </tr> <tr> <td> <table> <tr> <td>FirstPersonName</td> <td>Rank1</td> <td>info1a</td> <td>infob</td> <td>infoc</td> </tr> </table> </td> <td> <table> <tr> <td>SecondPersonName</td> <td>Rank2</td> <td>info1a</td> <td>infob</td> <td>infoc</td> <td>infod</td> <td>infoe</td> </tr> </table> </td> <td> <table> <tr> <td>ThirdPersonName</td> <td>Rank2</td> <td>info1a</td> <td>infob</td> <td>infoc</td> <td>infod</td> <td>infoe</td> <td>infof</td> <td>infog</td> </tr> </table> </td> </tr> </table> For page headings, I added a cell at the top before any other cells. I need to add this heading to all pages. Depending on the size of data, some pages have two rows and some pages have three rows of data. So I can not tell exactly when the new page starts to add the heading/title. My question is how to add the heading/title to all pages. I use VB.net. I searched for answer online and had no success. Your help would be greatly appreciated.

    Read the article

  • How to insert images using labels in NetBeans IDE, Java? [migrated]

    - by Vaishnavi Kanduri
    I'm making a virtual mall using NetBeans IDE 7.3.1 I inserted images using the following steps: Drag and drop label onto frame Go to label properties Click on ellipsis of 'icon' option Import to project, select desired image Resize or reposition it accordingly. Then, I saved the project, copied the project folder into a pendrive, tried to 'Open Project' in mate's laptop, using the same Java Netbeans IDE version. When I tried to open the frames, they displayed empty labels, without images. What went wrong?

    Read the article

  • What book do you recommend for the OCAJP certification (1Z0-803) and OCPJP (1Z0-804) [on hold]

    - by Muhammad Gelbana
    I find completely contradicting reviews for the VERY same book on amazon and even some book writers are rewarding people for good reviews so basically most of the reviews are totally fake ! You can even figure it out from the reviewer name, which you'll similar to the writer's name and assume that they could actually be from the same country and the reviewer is just being helpful, to the book writer of course ! I can't make my mind for which book I should buy ! I only need a book or two that covers the Java associate and professional topics very well, not just an overview, I need a material that covers everything from A to Z. Even though I've been developing in Java for around 4.5 years but I must not know a detail or two. Would someone kindly shed some light on a good book based on actual experience with the book ? THANK YOU !

    Read the article

  • Program error trying to generate Outlook 2013 email from Visual Basic 2010 [on hold]

    - by Dewayne Pinion
    I am using vb to send emails through outlook. Currently we have a mix of outlook versions at our office: 2010 and 2013 with a mix of 32 bit and 64 bit (a mess, I know). The code I have works well for Outlook 2010: Private Sub btnEmail_Click(sender As System.Object, e As System.EventArgs) Handles btnEmail.Click CreateMailItem() End Sub Private Sub CreateMailItem() Dim application As New Application Dim mailItem As Microsoft.Office.Interop.Outlook.MailItem = CType(application.CreateItem( _ Microsoft.Office.Interop.Outlook.OlItemType.olMailItem), Microsoft.Office.Interop.Outlook.MailItem) 'Me.a(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem) mailItem.Subject = "This is the subject" mailItem.To = "[email protected]" mailItem.Body = "This is the message." mailItem.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceLow mailItem.Display(True) End Sub However, I cannot get this to work for 2013. I have referenced the version 15 dll for 2013 and it seems to be backward compatible, but when I try to use the above code for 2013 (it is 64 bit) it says it cannot start Microsoft Outlook. A program error has occured. This is happening on the application Dim statement line. I have tried googling around but there doesn't seem to be much out there referencing 2013 but I feel that the problem here probably has more to do with 64 bit than the software version. Thank you for any suggestions!

    Read the article

  • PHP: A config file in .ini or .php format?

    - by Tim Visee
    I'm working on a huge CMS system, and I asked myself what configuration format I should use. There are two common formats for configuration files. The first one is an INI file, containg all the configuration properties. Then you can simply parse this INI file using build in PHP functions. A second option is to use a PHP file containing a regular PHP array with these configuration properties. Now, it's easier to edit an INI file, but a PHP file give's you more options, for example it allows you to add a function which retrieves one of the configuration options while reading the configuration file. Note: The PHP configuration file would only contain an array of configuration, no initialization functions or anything. (This is possible of course, but it's not implemented by default) Now, what is recommend for me to use as configuration file? What is the most common format for a configuration file? Should I go for simplicity with the INI files, or with a more dynamic one using PHP. One thing to note, this is not for personal usage. I'm planning to release the CMS system soon, and a lot of websites are scheduled already to change to my CMS system.

    Read the article

  • Are trivial protected getters blatant overkill?

    - by Panzercrisis
    Something I really have not thought about before (AS3 syntax): private var m_obj:Object; protected function get obj():Object { return m_obj; } private var m_str:String; protected function get str():String { return m_str; } At least subclasses won't be able to set m_obj or m_str (though they could still modify m_obj). Is this just blatant overkill? I am not talking about doing this as opposed to making them public. I am talking about doing this instead of just making the variables themselves protected. Like this: protected var m_obj:Object; //more accessible than a private variable with a protected getter protected var m_str:String; //more accessible than a private variable with a protected getter

    Read the article

  • What exercises counter the back pain of sitting at a computer for 15 hours a day? [on hold]

    - by Sam
    I work up to 15 hours a day (not everyday :)) programming. When I do this I get a very sore lower back. I don't want to spend $1000 on a special chair like Joel Spolsky says. I'm sure I'm not alone here. Has anybody encountered this and found an exercise/other method to combat it? Maybe somebody with more physical education than me about opposing muscle groups or something. PS (not working fifteen hours a day isn't an answer, it's how I work best) and it's not off topic as programming is about more than code - it's a verb.

    Read the article

  • Is it possible to have an app in the Play Store that will modify/change the behavior of the Gmail for Android application?

    - by Benjamin Bakhshi
    For example, is it possible for Rapportive (which works on Gmail for web), to work on Gmail for Android. I understand that the UI would be vastly different, but the question remains, is it possible at all to overlay content or change behavior of the Gmail app for android. I have done some research but cannot find the right resources that would tell me if this is possible or not on Android devices. This is a trivial question for Gmail for Web, ie. making a Chrome extension has lots of resources, and services like Rapportive manipulate Gmail apparent ease.

    Read the article

  • Web programming, standard way to deal with a response that takes time to complete

    - by wobbily_col
    With normal form submission I use the pattern Post / Redirect / Get, when processing the forms. I have a database application built with Django. I want to allow the users to select a number of items from the database, then launch a computationally intensive task based on those items. I expect the task to take between 10 minutes and 2 hours to complete. Is there a standard approach to dealing with requests like this (i.e. that don't return immediately)? Ideally there would be some way to display the progress.

    Read the article

  • A better alternative to incompatible implementations for the same interface?

    - by glenatron
    I am working on a piece of code which performs a set task in several parallel environments where the behaviour of the different components in the task are similar but quite different. This means that my implementations are quite different but they are all based on the relationships between the same interfaces, something like this: IDataReader -> ContinuousDataReader -> ChunkedDataReader IDataProcessor -> ContinuousDataProcessor -> ChunkedDataProcessor IDataWriter -> ContinuousDataWriter -> ChunkedDataWriter So that in either environment we have an IDataReader, IDataProcessor and IDataWriter and then we can use Dependency Injection to ensure that we have the correct one of each for the current environment, so if we are working with data in chunks we use the ChunkedDataReader, ChunkedDataProcessor and ChunkedDataWriter and if we have continuous data we have the continuous versions. However the behaviour of these classes is quite different internally and one could certainly not go from a ContinuousDataReader to the ChunkedDataReader even though they are both IDataProcessors. This feels to me as though it is incorrect ( possibly an LSP violation? ) and certainly not a theoretically correct way of working. It is almost as though the "real" interface here is the combination of all three classes. Unfortunately in the project I am working on with the deadlines we are working to, we're pretty much stuck with this design, but if we had a little more elbow room, what would be a better design approach in this kind of scenario?

    Read the article

  • XSLT and possible alternatives [on hold]

    - by wirrbel
    I had a look at XSLT for transforming one XML file into another one (HTML, etc.). Now while I see that there are benefits to XSLT (being a standardized and used tool) I am reluctant for a couple of reasons XSLT processors seem to be quite huge / resource hungry XML is a bad notation for programming and thats what XSLT is all about. It do not want to troll XSLT here though I just want to point out what I dislike about it to give you an idea of what I would expect from an alternative. Having some Lisp background I wonder whether there are better ways for tree-structure transformations based upon some lisp. I have seen references to DSSSL, sadly most links about DSSSL are dead so its already challenging to see some code that illustrates it. Is DSSSL still in use? I remember that I had installed openjade once when checking out docbook stuff. Jeff Atwood's blog post seems to hint upon using Ruby instead of XSLT. Are there any sane ways to do XML transformations similar to XSLT in a non-xml programming language? I would be open for input on Useful libraries for scripting languages that facilitate XML transformations especially (but not exclusively) lisp-like transformation languages, or Ruby, etc. A few things I found so far: A couple of places on the web have pointed out Linq as a possible alternative. Quite generally I any kind of classifications, also from those who have had the best XSLT experience. For scheme http://cs.brown.edu/~sk/Publications/Papers/Published/kk-sxslt/ and http://www.okmij.org/ftp/Scheme/xml.html

    Read the article

  • Where to look for challenging jobs with a relaxed atmosphere?

    - by RBTree
    I'm a dev at one of the big-name tech companies. I like the job for many reasons: I do interesting work on a cool product I solve challenging problems and use a lot of high-level skills (quantitative, creative, writing, presenting) It pays well The problem is that I feel I need a more relaxed atmosphere (shorter hours, less performance pressure, and more flexibility), in order to free up time for other pursuits and reduce stress. The ideal would be a job that's around 30-35 hours a week, where there is flexibility to work more or less in a given week. Can anyone suggest where to look for a job like this, where I wouldn't have to sacrifice too much on the above points? (Obviously I would have to sacrifice pay.) My employer does not generally offer part-time employment. The closest thing I can think of is when I did summer internships at my university's CS department. The work was very intellectually challenging, but if I needed to go home a couple hours early or get flexibility on a due date, nobody batted an eyelash. However, I'd like to find out if there are alternatives to academia since from what I've seen the pay there is a gigantic drop from what I'm currently making. I've done freelance development before, but I do like that as an employee of a large company I have a lot of things taken care of for me (e.g. benefits and guaranteed stable employment).

    Read the article

  • networkprinting with cups in ubuntu 13.10

    - by gero
    I upgraded from Ubuntu 13.04 to Ubuntu 13.10. The printer configurations were transferred correctly. I have an USB laser printer, which still works if I connect my laptop directly. Usually I used this printer by wlan or bluetooth, where an old laptop works as server (cups 1.3.X). If I now want to print some pdf or postscript file, one or the other way I only obtain a header printed, not the content of the file. Curiously the Ubuntu 13.10 test page is printed correctly.

    Read the article

  • Remove dropped shadown in nemo previews

    - by duxk.gh
    I recently started using Nemo because Nautilus has gotten pretty terrible. I quite like it, but one thing is still bugging me: the shadow of the preview of every image and video file (see below). I've been looking around in the /usr/share/themes/Ambiance/gtk-3.0/apps/nemo.css file but couldn't figure out how to get rid of that shadow. In Nautilus you get a border instead of a shadow, so surely something is different. I just can't figure out what. Any ideas?

    Read the article

  • Lubuntu 13.10 - Laptop Loses wireless after sleep

    - by user206217
    I'm running Lubunu 13.10 on an hp G62 - I'm new to Lubuntu having used ubuntu previously, but I've made the switch as my laptop is now getting toward the lower end of acceptability, and I'm delighted with how well it runs. Anyway, I'm having an issue that if I close the lid of the laptop it won't reconnect to the wi-fi when I open it again, and I'm not sure how to even force it to scan for a network - I have to restart it at the moment - and then it always connects perfectly. The router is a BT Business Hub 405. Any help much appreciated - thank you.

    Read the article

  • Warning: LBA32 addressing assumed

    - by user197194
    Warning: LBA32 addressing assumed when i read this and my server is rebooting, it wont boot again. I have to boot from USB, repair bootloader and then its rebooting again, but after the next update of the Linux Kernel (i think that is it) i will read that again and blah blah. Can anyone explain how to fix that permanently? I usually use Grub, but when this error hits, he tries to boot with Lilo. Greeetz and Thanks in advance!

    Read the article

  • Bash prompt doesn't print until I interact with console again

    - by durron597
    I don't even know where to begin to diagnose this one. Usually, when a command finishes, the prompt prints itself for the next command. However, that is not happening. Hard to explain with words, I'll just use an example: User@Machine:~$ cp /mnt/mountname/directory/textfile.txt . After waiting several seconds (far too long for this operation on a small file) I press Enter, and see: User@Machine:~$ cp /mnt/mountname/directory/textfile.txt . User@Machine:~$ User@Machine:~$ So clearly the operation had finished, but the prompt didn't display... until I pressed enter, and then BOTH prompts instantly displayed. This error does not happen with commands like cd.

    Read the article

  • Repository/Updating/Upgrading Issue

    - by Jakob
    The other day I was asked to upgrade from 13.04 to 13.10, at the time I was busy and hit no. I can not upgrade/update at this point, I get (error -11) or a 404 in terminal. In the software updater I get 'failed to download repository information.' I have tried changing my "Download From" setting to "Best" to "Main" and even a few other countries. And in "Other Software" I have tried disabling packages, but doesn't seem to help what so ever. I have tried several of the other commands to try and fix it, such as -fix missing or sudo apt-get update clean. P.S. This has also affected my thunderbird client, I cannot send/receive emails. Here is my error log when trying to upgrade: jakob@Skeletor:~$ sudo update-manager -d gpg: /tmp/tmpvejqvl/trustdb.gpg: trustdb created gpg: /tmp/tmpnayby6/trustdb.gpg: trustdb created Traceback (most recent call last): File "/usr/lib/python3/dist-packages/defer/__init__.py", line 483, in _inline_callbacks result = gen.throw(excep) File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 86, in commit True, close_on_done) File "/usr/lib/python3/dist-packages/defer/__init__.py", line 483, in _inline_callbacks result = gen.throw(excep) File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 158, in _run_in_dialog yield trans.run() aptdaemon.errors.TransactionFailed: Transaction failed: Package does not exist Package linux-headers-3.8.0-33 isn't available gpg: /tmp/tmp3kw_hl/trustdb.gpg: trustdb created. And let me throw in my sudo apt-get update too. Which this has been working variably too, but I don't know what to change my repositories to, and disabling does not effect: E: Some index files failed to download. They have been ignored, or old ones used instead. This is the short version, but looks exactly like this fairly consistently. Sometimes it downloads, sometimes it doesn't. Sometimes it tells me I have an update, and doesn't do anything. If it helps, I have recently had issues trying to install Samba as well, and connecting to the office's NAS Drive. Which works now, but I had to edit /etc/fstab/ and a few other things trying to get that to work as well. I understand it could also be a DNS problem, but this has been going on for a few days, as well as I've already tried changing my DNS server via my computer, however I am not allowed to alter the DNS on our company's router.

    Read the article

  • Grant a user permissions on www-data owned /var/www

    - by George Pearce
    I have a simple web server setup for some websites, with a layout something like: site1: /var/www/site1/public_html/ site2: /var/www/site2/public_html/ I have previously used the root user to manage files, and then given them back to www-data when I was done (WordPress sites, needed for WP Uploads to work). This probably isn't the best way. I'm trying to find a way to create another user (lets call it user1) that has permission to edit files in site1, but not site2, and doesn't stop the files being 'owned' by www-data. Is there any way for me to do this?

    Read the article

  • Ubuntu 13.10 gives "Package 'libapache2-mod-auth-mysql' has no installation candidate" error

    - by John Crawford
    I'm trying to install my LAMP environment on Ubuntu 13.10 using my script file that can be found here. That script worked for Ubuntu 12.04, Ubuntu 13.04 but when I try it on Ubuntu 13.10 it gives the following error: E: Package 'libapache2-mod-auth-mysql' has no installation candidate Any idea on how to fix this? Note, I do want this package to be installed. EDIT: I've found out now that the reason this could not be installed was because it needed the following two packages that were missing: libmysqlclient16 and apache2.2-common. Do I just need to install these packages or were they removed for a reason?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >