Search Results

Search found 350 results on 14 pages for 'eat a lemon'.

Page 9/14 | < Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Porting from GAE to TomCat or another servlet server

    - by bach
    Hi guys, I'm unhappy from GAE because - One can't have a global variable and the 'synchronize' keyword. Instead one have to catch a basically DB transcational exception and retry in a while loop - which will eat all my free CPU time and will start costing me money as I reach the google's qouata. Is it safe to use synchronize inside a doPost() in tomcat? (i guess that it's ok as long as all the servlets are running on on 1 VM?). If not in all tomcat configurations, how do I configure tomcat to make it safe? How can I convert a GAE app to my own tomcat server? - How to install DataNucleus Access Platform on tomcat? Best regards

    Read the article

  • How to prevent DOS attacks using image resizing in an ASP.NET application?

    - by Waleed Eissa
    I'm currently developing a site where users can upload images to use as avatars, I know this makes me sound a little paranoid but I was wondering what if a malicious user uploads an image with incredibly large dimensions that will eat the server memory (as a DOS attack), I already have a limit on the file size that can be uploaded (250 k) but even that size can allow for an image with incredibly large dimensions if the image for example is a JPEG that contains one color and created with a very low quality setting. Taking into consideration that the image is uploaded as a bitmap in memory when being resized (ie. not compressed), I wonder if such DOS attacks occur, even to check the image dimensions it has to be uploaded in memory first, did you hear about any attacks that exploited this? Am I too worried?

    Read the article

  • Fixtures and inheritance in Symfony

    - by Tere
    Hi! I have a database schema in Symfony like this: Persona: actAs: { Timestampable: ~ } columns: primer_nombre: { type: string(255), notnull: true } segundo_nombre: { type: string(255) } apellido: { type: string(255), notnull: true } rut: { type: string(255) } email: { type: string(255) } email2: { type: string(255) } direccion: { type: string(400) } ciudad: { type: string(255) } region: { type: string(255) } pais: { type: string(255) } telefono: { type: string(255) } telefono2: { type: string(255) } fecha_nacimiento: { type: date } Alumno: inheritance: type: concrete extends: Persona columns: comentario: { type: string(255) } estado_pago: { type: string(255) } Alumno_Beca: columns: persona_id: { type: integer, primary: true } beca_id: { type: integer, primary: true } relations: Alumno: { onDelete: CASCADE, local: persona_id, foreign: id } Beca: { onDelete: CASCADE, local: beca_id, foreign: id } Beca: columns: nombre: { type: string(255) } monto: { type: double } porcentaje: { type: double } descripcion: { type: string(5000) } As you see, "alumno" has a concrete inheritance from "persona". Now I'm trying to create fixtures for this two tables, and I can't make Doctrine to load them. It gives me this error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (eat/alumno__beca, CONSTRAINT alumno__beca_persona_id_alumno_id FOREIGN KEY (persona_id) REFERENCES alumno (id) ON DELETE CASCADE) Does someone know how to write a fixture for a table inherited from another? Thanks!

    Read the article

  • Detecting a Key Press Squashed by Another Application

    - by Eric Smith
    I have a WPF application I'm planning to use as an overlay for a DirectX game (specifically Bad Company 2). I'm using WM_KEYBOARD_LL hook to detect KeyDown events so I can bring my app to the foreground when a specific button is pressed. This works perfectly except for when the game is running (I've also noticed this problem with Window's "Chess Titans" so it may be a DirectX thing). As far as I can work out, when the game detects a keyboard press, it "eats" the event and doesn't pass the CallNextHookEx() method like it should, which would allow the key press message to be moved along to the next application in the queue. I'm wondering if there's any sort of work-around to this? It seems kind of unfair that a single application can just willy-nilly eat up messages like that. Thanks! :) Relevant MSDN documentation: http://msdn.microsoft.com/en-us/library/ms644985%28VS.85%29.aspx

    Read the article

  • Tools for website development

    - by sharkin
    Hi! I can't find any other post which addresses this topic on a purely general level. I'm very unexperienced in developing full scale websites. I get around using HTML and PHP for simple tasks. Now I'm looking at developing a more elaborate site and want to get hold of a good tool which doesn't eat my wallet to the bones. I guess I should add more intelligent text here about what I expect it to be capable of, but I really don't know so much. I guess the code/design/preview style in dreamweaver appealed to me, and I'm definetely going to use scripting like PHP or ASP.NET, some database work etc. I guess pretty much the standard (?) website development tasks. So, are there good tools out there I should be looking at?

    Read the article

  • casting unused return values to void

    - by markh44
    int fn(); void whatever() { (void) fn(); } Is there any reason for casting an unused return value to void, or am I right in thinking it's a complete waste of time? Follow up: Well that seems pretty comprehensive. I suppose it's better than commenting an unused return value since self documenting code is better than comments. Personally, I'll turn these warnings off since it's unnecessary noise. I'll eat my words if a bug escapes because of it...

    Read the article

  • LRU caches in C

    - by lazyconfabulator
    I need to cache a large (but variable) number of smallish (1 kilobyte to 10 megabytes) files in memory, for a C application (in a *nix environment). Since I don't want to eat all my memory, I'd like to set hard memory limit (say, 64 megabytes) and push files into a hash table with the file name as the key and dispose of the entries with the least use. What I believe I need is an LRU cache. Really, I'd rather not roll my own so if someone knows where I can find a workable library, please point the way? Failing that, can someone provide a simple example of an LRU cache in C? Related posts indicated that a hash table with a doubly-linked list, but I'm not even clear on how a doubly-linked list keeps LRU. Side note: I realize this is almost exactly the function of memcache, but it's not an option for me. I also took a look at the source hoping to enlighten myself on LRU caching, with no success.

    Read the article

  • Photo uploading via email

    - by Lee
    I'd like to be able to upload photos via email, which I've seen (and used) on eat.ly and meetups.jquery.com but I haven't been able to work out how to do this, does anyone have a solution? Essentially I believe the process should be something like this: 1) user adds picture to email on mobile device then send to a specific email address, say '[email protected]' 2) email server, cron job or something else looks at the senders address and tells it to add the attachement to that account 3) photo shows up on users profile page I run Apache servers, with MySQL, PHP, and a JQuery framework. I have email servers running Courier, and I missing anything?

    Read the article

  • Crystal Reports Legends

    - by AWinters
    Is there a way to force a Bar Chart legend in Crystal Report 11.5 to display its objects in a particular order? For Example, say I am reporting on the consumption of "Bananas" and "Apples" by State. The Bar Chart should display the percentage of people who eat these fruits by county (Percent Bar Chart). The "Apples" percentage always displays on top of the bar chart and the "Bananas" on the bottom. The legend for this graph also displays the "Apple" color first, then the "Banana" color. However, if the "Banana" percentage is 0% the legend displays the "Banana" color first on the legend. This creates a inconsistent report (with plenty of complaints). I would like the "Banana" color to always display second in the legend. Hope I didn't confuse anyone and any ideas would be helpful.

    Read the article

  • Hudson, C++ and UnitTest++

    - by Gilad Naor
    Has anyone used Hudson as a Continuous-Integration server for a C++ project using UnitTest++ as a testing library? How exactly did you set it up? I know there have been several questions on Continuous Integration before, but I hope this one has a narrower scope. EDIT: I'll clarify a bit on what I'm looking for. I already have the build set to fail when the Unit-Tests fail. I'm looking for something like Hudson's JUnit support. UnitTest++ can create XML reports (See here). So, perhaps if someone knows how to translate these reports to be JUnit compatible, Hudson will know how to eat it up?

    Read the article

  • How to sift idioms and set phrases apart from other common phrases using NLP techniques?

    - by hippietrail
    What techniques exist that can tell the difference betwen plain common phrases such as "to the", "and the" and set phrases and idioms which have their own lexical meanings such as "pick up", "fall in love", "red herring", "dead end"? Are there techniques which are successful even without a dictionary, statistical methods HMMs train on large corpora for instance? Or are there heuristics such as ignoring or weighting down "promiscuous" words which can co-occur with just about any word versus words which occur either alone or in a specific limited set of idiomatic phrases? If there are such heuristics, how do we take into account set phrases and verbal phrases which do incorporate promiscuous words such as "up" in "beat up", "eat up", "sit up", "think up"? UPDATE I've found an interesting paper online: Unsupervised Type and Token Identi?cation of Idiomatic Expressions

    Read the article

  • SQLBulkCopy used in conjunction with Transaction and firing an event each time a batch is copied

    - by Hans Rudel
    Im currently uploading data to MS SQL server via SQLBulkCopy and Transactions. I would like to be able to raise an event after each batch has been uploaded (I have already tried SQLRowsCopied event and it doesnt work, see quote below) MSDN quote: No action, such as transaction activity, is supported in the connection during the execution of the bulk copy operation, and it is recommended that you not use the same connection used during the SqlRowsCopied event. However, you can open a different connection. http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.sqlrowscopied(v=vs.80).aspx So i basically cant have my cake and eat it :( Does anyone know a solution around this as i would like to fire an event after each batch has been uploaded. Thanks for your help.

    Read the article

  • Is this code well-defined?

    - by Nawaz
    This code is taken from a discussion going on here. someInstance.Fun(++k).Gun(10).Sun(k).Tun(); Is this code well-defined? Is ++k Fun() evaluated before k in Sun()? What if k is user-defined type, not built-in type? And in what ways the above function calls order is different from this: eat(++k);drink(10);sleep(k); As far as I can say, in both situations, there exists a sequence point after each function call. If so, then why can't the first case is also well-defined like the second one? Section 1.9.17 of the C++ ISO standard says this about sequence points and function evaluation: When calling a function (whether or not the function is inline), there is a sequence point after the evaluation of all function arguments (if any) which takes place before execution of any expressions or statements in the function body. There is also a sequence point after the copying of a returned value and before the execution of any expressions outside the function.

    Read the article

  • clear html webpage?

    - by noname
    i am currently developing a crawler that crawls all links on the web and displays them in the web browser (and saving it of course). but after some hours there will be a huge list displayed on the web browser and i want to only display lets say 1000 links at the same time. then i clear the html and display another 1000 links. this is also good for the RAM or it will eat up all memory. how do i clear the web browser screen? EDIT: i have seen some scripts using some flush buffer functions. has this anything to do with my case?

    Read the article

  • WCF with SSL- not finding localhost

    - by SteveCav
    Hi guys, I'm trying to get WCF to use SSL with ANYTHING for FIVE DAYS now. I've gone through countless walkthroughs, generated more certificates than a mail order diploma company, even tried hot fixes. After working with MS dev tools since VB1, I am now considering flipping burgers as a career option. WCF, as far as I can see, is a complete lemon. Anyway, to get to my actual question: If I run through this walkthrough: http://msdn.microsoft.com/en-us/library/ff648840.aspx I get to step 11 (adding the service reference) and get "There was an error downloading metadata from the address. Please verify that you have entered a valid address". Details of the error gives: There was an error downloading 'https://localhost/SSL6/Service.svc'. Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:443 I'm using VS2008 on Windows 7 with IIS7. I followed the walkthrough exactly (apart from step 5 which was different on IIS7- I went into "SSL Settings" for the VD), so it shows my config (yes I've used httpsGetEnabled and mexHttpsBinding). Anyone care to save my sanity and job?

    Read the article

  • (Newbie) Amazon Web Services Apache Server

    - by Samnsparky
    Hello! I am trying to get a feel for the costs imposed by running apache on AWS continually. Assuming that the service is scarcely used, does anyone know how many cpu hours that would eat up in a month just by sitting there and running? I understand that this is slightly impractical but I am trying to figure out what the cost of entry is to deploy an application on this platform (as compared to GAE). I suspect it to be small but I would like to know. Thank you for your help, Sam

    Read the article

  • Operating system scheduler question

    - by ual
    I recently asked myself: If a program, like Mozilla Firefox for example, is started - the control must be somehow given to it. But when the program crashes, why doesn't my whole system crash like in early Windows version? How can Windows take back the control from the program, or even not give it to it fully? (Note: This is not my homework; I go to school but in my informatics class are really only guys that would answer with "Can I eat that?" when I ask them about kernels. Same with my teacher.)

    Read the article

  • Operating system question

    - by ual
    I recently asked myself: If a program, like Mozilla Firefox for example, is started - the control must be somehow given to it. But when the program crashes, why doesn't my whole system crash like in early Windows version? How can Windows take back the control from the program, or even not give it to it fully? (Note: This is not my homework; I go to school but in my informatics class are really only guys that would answer with "Can I eat that?" when I ask them about kernels. Same with my teacher.)

    Read the article

  • Python Profiling In Windows, How do you ignore Builtin Functions

    - by Tim McJilton
    I have not been capable of finding this anywhere online. I was looking to find out using a profiler how to better optimize my code, and when sorting by which functions use up the most time cumulatively, things like str(), print, and other similar widely used functions eat up much of the profile. What is the best way to profile a python program to get the user-defined functions only to see what areas of their code they can optimize? I hope that makes sense, any light you can shed on this subject would be very appreciated.

    Read the article

  • In FLEX, How can you stop ENTER Key from my Alert being caught by the control that initiated the Al

    - by WeeJavaDude
    I am having an issue where I show an AlertBox message when the user hits ENTER and the focus is in a text area. The pop up works fine, but when the user hits enter the Alert closes as expected, but the TextArea listener receives the ENTER event from the Alert and pops the dialog up again. I have tried a number of ways to catch and eat the event but so far I have not been lucky. Is there way to accomplish this? public function init():void { myTextInput.addEventListener(KeyboardEvent.KEY_UP, handleKeyStrokes); } public function handleKeyStrokes(evt:KeyboardEvent):void { if(evt.keyCode == Keyboard.ENTER) { myAlert = Alert.show("This is a test and only a test", "Title", 4, null, alertCallBack); } } <mx:TextInput id="myTextInput" left="600" top="10"> </mx:TextInput>

    Read the article

  • Log with timestamps that have millisecond accuracy & resolution in Windows C++

    - by Psychic
    I'm aware that for timing accuracy, functions like timeGetTime, timeBeginPeriod, QueryPerformanceCounter etc are great, giving both good resolution & accuracy, but only based on time-since-boot, with no direct link to clock time. However, I don't want to time events as such. I want to be able to produce an exact timestamp (local time) so that I can display it in a log file, eg 31-12-2010 12:38:35.345, for each entry made. (I need the millisecond accuracy) The standard Windows time functions, like GetLocalTime, whilst they give millisecond values, don't have millisecond resolution, depending on the OS running. I'm using XP, so I can't expect much better than about a 15ms resolution. What I need is a way to get the best of both worlds, without creating a large overhead to get the required output. Overly large methods/calculations would mean that the logger would start to eat up too much time during its operation. What would be the best/simplest way to do this?

    Read the article

  • How to implement a mailing system with Rails that sends emails in the background

    - by Tam
    I want to implement a reliable mailing system with Ruby on Rails that sends emails in the background as sending email sometimes takes like 10 seconds or more so I don't want the user to wait. Some ideas I thought of: 1- Write to a table in DB a have a background process that go over and send email (concern: potential many reads/writes to DB slows down my application) 2- Messaging Queue background process / Rake task (concern: if server crashes queued mails will be lost also might eat up a lot of memory if many emails) I was wondering if you a know of a good solution that provides a balance between reliability and performance.

    Read the article

  • Need help writing a recurring task scheduler.

    - by Sisiutl
    I need to write a tool that will run a recurring task on a user configurable schedule. I'll write it in C# 3.5 and it will run on XP, Windows 7, or Windows Server 2008. The tasks take about 20 minutes to complete. The users will probably want to set up several configurations: e.g, daily, weekly, and monthly cycles. Using Task Scheduler is not an option. The user will schedule recurrences through an interface similar to Outlook's recurring appointment dialog. Once they set up the schedule they will start it up and it should sit in the system tray and kick off its tasks at the appointed times, then send mail to indicate it has finished. What is the best way to write this so that it doesn't eat up resources, lock up the host, or otherwise misbehave?

    Read the article

  • C++ conditional compilation

    - by Shaown
    I have the following code snippet #ifdef DO_LOG #define log(p) record(p) #else #define log(p) #endif void record(char *data){ ..... ..... } Now if I call log("hello world") in my code and DO_LOG isn't defined, will the line be compiled, in other words will it eat up the memory for the string "hello world"? P.S. There are a lot of record calls in the program and it is memory sensitive, so is there any other way to conditionally compile so that it only depends on the #define DO_LOG? Thanks in advance.

    Read the article

  • what do i need to do now that I want to take programming hobby to next level ?

    - by hohog
    i've always wanted to make games but did not start actively learning programming by myself until 1st year of university. i kept going throughout university learning new languages, showing off things i had made, while neglecting my major in Biology. Anyways, i've ended up with an Economics degree, with a portfolio of SaaS and web apps i had created so i could eat during my final year. So far, I'm getting a few interviews here and there in web programming positions. When I get a logic pretest, I fail miserably. or job requires comp sci degree. I mean I can easily design and code an entire app which I emphasize through my portfolio.... but i dont know why I am so slow at logic puzzles on prescreening interview... So what should I do now ? get certificates in languages ? go back to school and learn CS ? is it too late to get into windows programming jobs than web programming ?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >