Search Results

Search found 2403 results on 97 pages for 'alex peta'.

Page 50/97 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Important question about linq to SQL performance on high loaded web applications

    - by Alex
    I started working with linq to SQL several weeks ago. I got really tired of working with SQL server directly through the SQL queries (sqldatareader, sqlcommand and all this good stuff).  After hearing about linq to SQL and mvc I quickly moved all my projects to these technologies. I expected linq to SQL work slower but it suprisongly turned out to be pretty fast, primarily because I always forgot to close my connections when using datareaders. Now I don't have to worry about it. But there's one problem that really bothers me. There's one page that's requested thousands of times a day. The system gets data in the beginning, works with it and updates it. Primarily the updates are ++ @ -- (increase and decrease values). I used to do it like this UPDATE table SET value=value+1 WHERE ID=@I'd It worked with no problems obviously. But with linq to SQL the data is taken in the beginning, moved to the class, changed and then saved. Stats.registeredusers++; Db.submitchanges(); Let's say there were 100 000 users. Linq will say "let it be 100 001" instead of "let it be increased by 1". But if there value of users has already been increased (that happens in my site all the time) then linq will be like oops, this value is already 100 001. Whatever I'll throw an exception" You can change this behavior so that it won't throw an exception but it still will not set the value to 100 002. Like I said, it happened with me all the time. The stas value was increased twice a second on average. I simply had to rewrite this chunk of code with classic ado net. So my question is how can you solve the problem with linq

    Read the article

  • Fake "user initiated" <audio> tag on iPad

    - by Alex Ford
    I know that Apple's docs say that an mp3 within an <audio tag on iPhone OS can't be played without user intervention (they cite bandwidth concerns, totally reasonable). However, has anyone succeeded in faking a user action to play the audio? Perhaps faking events to off screen native audio controls with JavaScript? I'm using jPlayer right now which works great on desktop Safari, but is silent on my iPad. I'm prototyping a touch interface using WebKit on the iPad, and audio is an integral part of the experience, so yes, I do have a good reason to want to override this convention. I'd appreciate any help. Thanks.

    Read the article

  • Transform Search String into FullText Compatible Search String?

    - by Alex
    I'm working with the fulltext search engine of MSSQL 2008 which expects a search string like this: ("keyword1" AND "keyword2*" OR "keyword3") My users are entering things like this: engine 2009 "san francisco" hotel december xyz stuff* "in miami" 1234 something or "something else" I'm trying to transform these into fulltext engine compatible strings like these: ("engine" AND "2009") ("san francisco" AND "hotel" AND "december" AND "xyz") ("stuff*" "in miami" "1234") ("something" OR "something else") I have a really difficult time with this, tried doing it using counting quotation marks, spaces and inserting etc. but my code looks like horrible for-and-if vomit. Can someone help?

    Read the article

  • Repository organization for Hadoop project

    - by Alex N.
    I am starting on a new Hadoop project that will have multiple hadoop jobs(and hence multiple jar files). Using mercurial for source control, I was wondering what would be optimal way of organizing the repository structure? Should each job live in separate repo or would it be more efficient to keep them in the same, but break down into folders?

    Read the article

  • jQuery exclude elements with certain class in selector

    - by Alex Crooks
    I want to setup a click event trigger in jQuery for certain anchor tags. I want to open certain links in a new tab while ignoring ones with a certain class (before you ask I cannot put classes on the links I am trying to catch as they come from a CMS). I want to exclude links with class "button" OR "generic_link" I have tried $(".content_box a[class!=button]").click(function (e) { e.preventDefault(); window.open($(this).attr('href')); }); But that doesn't seem to work, also how do I do an OR statement to include "generic_link" in the exclusion? Many thanks

    Read the article

  • I need help with creating a data structure in PHP

    - by alex
    What I need to do is have a data structure that shows jobs organised into 14 day periods, but only when an id is the same. I've implemented all sorts of stuff, but they have failed miserably. Ideally, maybe a SQL expert could handle all of this in the query. Here is some of my code. You can assume all library stuff works as expected. $query = 'SELECT date, rig_id, comments FROM dor ORDER BY date DESC'; $dors = Db::query(Database::SELECT, $query)->execute()->as_array(); This will return all jobs, but I need to have them organised by 14 day period with the same rig_id value. $hitches = array(); foreach($dors as $dor) { $rigId = $dor['rig_id']; $date = strtotime($dor['date']); if (empty($hitches)) { $hitches[] = array( 'rigId' => $rigId, 'startDate' => $date, 'dors' => array($dor) ); } else { $found = false; foreach($hitches as $key => $hitch) { $hitchStartDate = $hitch['startDate']; $dateDifference = abs($hitchStartDate - $date); $isSameHitchTimeFrame = $dateDifference < (Date::DAY * 14); if ($rigId == $hitch['rigId'] AND $isSameHitchTimeFrame) { $found = true; $hitches[$key]['dors'][] = $dor; } } if ($found === false) { $hitches[] = array( 'rigId' => $rigId, 'startDate' => $date, 'dors' => array($dor) ); } } } This seems to work OK splitting up by rig_id, but not by date. I also think I'm doing it wrong because I need to check the earliest date. Is it possible at all to do any of this in the database query? To recap, here is my problem I have a list of jobs with all have a rig_id (many jobs can have the same) and a date. I need the data to be organised into hitches. That is, the rig_id must be the same per hitch, and they must span a 14 day period, in which the next 14 days with the same rig_id will be a new hitch. Can someone please point me on the right track? Cheers

    Read the article

  • check item in popupmenu

    - by alex-gu
    i call popumemu(list of checkboxes in another program) using code like: PostMessage(Wnd,WM_RBUTTONDOWN,0,0x0); PostMessage(Wnd,WM_RBUTTONUP,0,0x0); and i can get the HWND of popupmenu window how to check(uncheck) item at certain item? without sending code SendMessage( TMP,WM_KEYDOWN, VK_DOWN, 0); SendMessage( TMP,WM_KEYUP, VK_DOWN, 0); SendMessage( TMP,WM_KEYDOWN, VK_RETURN, 0); SendMessage( TMP,WM_KEYUP, VK_RETURN, 0); or there is another way to call popupmenu and check its item?

    Read the article

  • Unix and FreeBSD

    - by Alex Farber
    My final goal is to write the program which can run on the Unix OS. I know that there are many Unix versions, and don't know exactly for now which one I need to support. I cannot install any Unix OS right now. The only thing I can do is to use free OS which is close to Unix as much as possible. Is FreeBSD a good choice for this? I know that there is also OpenBSD, possibly something else.

    Read the article

  • ffmpeg mp3 convertion

    - by Alex
    was to convert several thousand MP3 files, and get this for some files: ffmpeg -t 45 -i "public/system/musics/files/2009/original/03_Memphis.mp3" -y "memphis.mp3" FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-neon --disable-altivec --disable-vis --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Apr 10 2009 23:18:41, gcc: 4.3.3 public/system/musics/files/2009/original/03_Memphis.mp3: could not find codec parameters what could be the problem?

    Read the article

  • Page zoom slows down page rendering

    - by Alex
    I'm building a map viewer much like Google maps and i've run into an interesting performance problem when a page is zoomed (i.e ctrl + OR ctrl -). It seems to affect all major browsers but Firefox has the worst problems as far as I can tell. The problem is that when the page is zoomed panning by dragging the mouse seems really sluggish. This can even be seen on Google maps. Pan the map left and right and note how smooth it is. Now press ctrl+ (3 or 4 times). Now pan the map left and right in the same way. Notice the difference? Does anyone know how I can minimize this problem?

    Read the article

  • How can I detect a debugger or other tool that might be analysing my software?

    - by Workshop Alex
    A very simple situation. I'm working on an application in Delphi 2007 which is often compiled as 'Release' but still runs under a debugger. And occasionally it will run under SilkTest too, for regression testing. While this is quite fun I want to do something special... I want to detect if my application is running within a debugger/regression-tester and if that's the case, I want the application to know which tool is used! (Thus, when the application crashes, I could report this information in it's error report.) Any suggestions, solutions?

    Read the article

  • Development team collaboration via Google Wave

    - by Alex N.
    I hope I am not repeating any previously asked question. Anyway, so Google Wave is nice and shiny and sounds like a lot of folks(at least at Google I/O :) used it in a useful for work(!) way. I've been beta-testing Google Wave for sometime now, but can't quite grasp how to improve our workflow using it. We have a medium size team of developers that are spread out around US and Europe and naturally most of communication is happening via IM and Skype and email of course. So what are specific things that could be offloaded to Google Wave to improve collaboration by leaps and bounds(meaning not just replacing IM with nicer IM)?

    Read the article

  • How to add a TabBar to NavigationController based iPhone app

    - by Alex
    I have a simple NavigationController based app. The main window shows a TableView and selecting an item loads a sub-view. I used Interface Builder for UI views. Now I want to add a TabBar to the app. Where do I put it? Do I need a TabBarController? Should it go in the MainWindow.xib, or RootViewController.xib? How do I tie it together with my NavigationController?

    Read the article

  • LINQ: Create persistable Associations in Code, Without Foreign Key

    - by Alex
    Hello, I know that I can create LINQ Associations without a Foreign Key. The problem is, I've been doing this by adding the [Association] attribute in the DBML file (same as through the designer), which will get erased again after I refresh my database (and reload the entire table structure). I know that there is the MyData.cs file (as part of the DBML) in which I can place my partial extensions etc. to domain objects (to persist even after I refresh the DBML), but I don't know how to create an association there?

    Read the article

  • Custom installation directories

    - by Alex Farber
    Let's say I am writing installation script for the program which contains executable file and shared library. By default, this script places executable to /usr/local/bin, and shared library to /usr/local/lib. In this case my program may be executed by any user by typing its name in the command line. Suppose that user selects custom installation directory, like ~/myprogram/. Is it user's responsibility to ensure that my program may be executed, or my installation script must do this?

    Read the article

  • F# return type coercion

    - by Alex
    Hi, In F# I have a function that returns System.Linq.Expression instances: and System.Object with member this.ToExpression() = match this with | :? System.Int32 -> Expression.Constant(this) :> Expression | :? System.Boolean -> Expression.Constant(this) :> Expression | :? Tml.Runtime.Seq as s -> s.ToExpression() | _ -> failwith "bad expression" If I omit the type coercions on the return values F# will infer the return type of the function to ConstantExpression. My first thought was to explicitly mark the return type as being : #Expression, but that didn't work. Is there a more elegant way of doing this that doesn't involve manually casting return types to the most generic type? Thanks.

    Read the article

  • Best WordPress "contact us" plugin?

    - by alex
    I've seen a few, and tried out Contact Form 7, which is pretty good but by default looks quite ugly. I've also had a quick dig, and it looks hard to add some hooks for CSS. It also doesn't use the label element. What is the best standards compliant easy skinnable contact Wordpress plugin in your experience?

    Read the article

  • setting up log4j for gmail, does not recognize System.setProperty("mail.smtps.port", "587")

    - by Alex Le
    Hi I am trying to setup a smtpappender for log4j using gmail as the smtp host. I have read that the port number needs to be 465 or 587 (depending on tls or ssl) and that log4j for some reason doesnt allow a different port to be set inside log4j.properties configuration file. I have read that the best way of doing this would be to use System.setProperty which would change the default javaxmail port to gmail. However when I try to set the System.property entries the the default port still remains as 25 System.setProperty("mail.smtp.starttls.enable", "true"); System.setProperty("mail.smtp.port", "587"); I was wondering if someone could help me out, I am open to suggestions, I just need to smtpAppender to work for gmail, dont really care how to get it to work. Thanks

    Read the article

  • Best Practice - Validating Input In Simple GUI Application?

    - by Alex
    I'm writing a GUI app with wxwidgets in C++ for one of my programming classes. We have to validate input and throw custom exceptions if it doesn't meet certain conditions. My question is, what is best practice when it comes to this? Should I write a seperate function that checks for errors, and have my event handler's call that function? Or should I do my error-checking in my event handlers? Or does it really matter? Thanks!

    Read the article

  • Contact form contents spilling out of container div on window resize.

    - by Alex C
    I'm trying to get my contact form to not spill its contents out of the parent div when I resize the viewport. How can I go about doing this? I have used float clearing to prevent this as I understood it was supposed to be used, but it isn't working. What should I do to fix this? here is the page in question. also I have a similar problem with the header.. the menu drops below the header text if I make the browser window smaller. Thanks for any help you all have to offer. http://countercharge.net/catsite/index.php?P=contact

    Read the article

  • .net Email Template engine...

    - by alex
    I'm looking to create emails, mainly HTML, based on templates - I'd really like to do something like: Set up my template, as an HTML (or similar) file Include tags, that are then replaced with specific data (kind of like mail-merge....) I've seen this: http://www.bitethebullet.co.uk/EmailTemplateFramework/tabid/58/Default.aspx From searching on stack overflow, i understand nVelocity might be another option? But i can't find any examples to do what i want to do... Any other suggestions?

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >