Search Results

Search found 2495 results on 100 pages for 'aaron mc adam'.

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

  • Sorting an array in PHP based on different values

    - by Jimbo
    I have an array whose elements are name, reversed_name, first_initial and second_initial. A typical row is "Aaron Smith", "Smith, Aaron", "a", "s". Each row in the array has a first_initial or second_initial value of "a". I need to display the rows alphabetically but based on the "a" part, so that either the name or reversed_name will be displayed. An example output would be: Aaron Smith Abbot, Paul Adrian Jones Anita Thompson Atherton, Susan I really have no idea how to sort the array this way so any help will be much appreciated!

    Read the article

  • WM6.5 embedded Internet Explorer finder scrolling

    - by Aaron
    I'm writing a .NET 3.5 application targetted for Windows Mobile 6.5. My application uses an embedded IE control to display content. The IE application allows the user to finger scroll around the webpage (i.e. touch the screen and drag instead of using the scrollbar). My IE control has a scrollbar and when I emulate the gesture, I highlight text instead of scrolling. Is there a way to add finger gesture support to an embedded IE control? Thanks, Aaron

    Read the article

  • Replace text in file with Python

    - by Aaron Hoffman
    I'm trying to replace some text in a file with a value. Everything works fine but when I look at the file after its completed there is a new (blank) line after each line in the file. Is there something I can do to prevent this from happening. Here is the code as I have it: import fileinput for line in fileinput.FileInput("testfile.txt",inplace=1): line = line.replace("newhost",host) print line Thank you, Aaron

    Read the article

  • Accessing relative path in Python

    - by Aaron Hoffman
    Hi, I'm running a Mac OS X environment and am used to using ~/ to provide the access to the current user's directory. For example, in my python script I'm just trying to use os.chdir("/Users/aaron/Desktop/testdir/") But would like to use os.chdir("~/Desktop/testdir/") I'm getting a no such file or directory error when trying to run this. Any ideas?

    Read the article

  • Start app from within python

    - by Aaron Hoffman
    Hello, I'm trying to start an application using Python. I've seen that some people use startfile but I also read that it only works with Windows. I'm using Mac systems and hoping for it to work with them. Thanks, Aaron

    Read the article

  • Ubuntu + Raid on HP proliant DL 160 G6

    - by Adam Matan
    Hi, I'm, trying to install Ubuntu 8.04 Server on an HP Proliant DL160 G6. The HP hardware is certified by Ubuntu for the 9.04 version, which I can't install due to company policy. The problem is that Ubuntu would not recognize the RAID 1+0 disk configured by the BIOS. The raid creates one ~470GB disk from two 500GB physical disks. Any ideas? Adam

    Read the article

  • webcam streaming on mobile phone

    - by adam
    hey guys im stuck on a project i have i need to find a way to stream my home webcam onto my mobile phone, in this case on a blackberry bold 9700, also i have an i pod touch 2.0. the problem i keep coming across is that every program i find askes for money, i am looking for a way to do this for free, ive been trying using vlc but have so far been unable to get the stream to work, any help would be great thanks a lot adam

    Read the article

  • MySQL: Load database to memory

    - by Adam Matan
    Hi, Is there a way to load an entire MySQL database to the RAM, especially on en EC2 server? The database is quite small (~500 MegaBytes) I have enough memory Speed issues are crucial - the resulted queries are used to serve a dynamic webpage. Thanks, Adam

    Read the article

  • Monitor utilities

    - by Adam Davis
    I'm a big fan of good monitor usage, but only currently use a few utilities to help me attain display nirvana across several systems and monitors. Part of this is due to not knowing what's available. Please list one monitor utility that you use and what it does for you per answer, and avoid duplicates - comment on and vote up the existing answers rather than adding a duplicate. Also, if there are existing questions that delve more specifically into one area of monitor utilities link that in a separate answer. -Adam

    Read the article

  • Internal Server Error issue with Codeigniter. Cant open linked page

    - by Adam Perlis
    Hi I am VERY new to backend development. I am trying to setup a User Registration using Codeigniter. I have gotten pretty far but for some reason I can get the "Create Account button working. I have my site up and running on t-mrkt.com/mycisite would you guys mind taking a look and seeing where I might be going wrong? Here is a link to my files: https://www.dropbox.com/sh/z54j4qd50yf3t0p/MnnghGBB_D Thanks for your help! Adam

    Read the article

  • Random password generator: many, in columns, on command line, in Linux

    - by Adam Backstrom
    A while back, I came across a random password generator for the command line that displayed a grid of "memorable" passwords. Output was something like this: adam@host:~$ CantRememberThisCommand lkajsdf aksjdfl kqwrupo qwerpoi qwerklw zxlkelq The idea was that you could run this utility while someone was looking over your shoulder, and still pick a password with some level of secrecy due to the large number of choices. I cannot remember what this utility was called. Oh interwebs, can you help?

    Read the article

  • log in and send sms with java

    - by noobed
    I'm trying to log into a site and afterwards to send a SMS (you can do that for free by the site - it's nothing more than just enter some text into some fields and 'submit'). I've used wireshark to track some of the post/get requests that my machine has been exchanging with the server - when using the browser. I'd like to paste some of my Java code: URL url; String urlP = "maccount=myRawUserName7&" + "mpassword=myRawPassword&" + "redirect_http=http&" + "submit=........"; String urlParameters = URLEncoder.encode(urlP, "CP1251"); HttpURLConnection connection = null; // Create connection url = new URL("http://www.mtel.bg/1/mm/smscenter/mc/sendsms/ma/index/mo/1"); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); //I'm not really sure if these RequestProperties are necessary //so I'll leave them as a comment // connection.setRequestProperty("Content-Type", // "application/x-www-form-urlencoded"); // connection.setRequestProperty("Accept-Charset", "CP1251"); // connection.setRequestProperty("Content-Length", // "" + Integer.toString(urlParameters.getBytes().length)); // connection.setRequestProperty("Content-Language", "en-US"); connection.setUseCaches(false); connection.setDoInput(true); connection.setDoOutput(true); // Send request DataOutputStream wr = new DataOutputStream( connection.getOutputStream()); wr.writeBytes(urlParameters); wr.flush(); wr.close(); String headerName[] = new String[10]; int count = 0; for (int i = 1; (headerName[count] = connection.getHeaderFieldKey(i)) != null; i++) { if (headerName[count].equals("Set-Cookie")) { headerName[count++] = connection.getHeaderField(i); } } //I'm not sure if I have to close the connection here or not if (connection != null) { connection.disconnect(); } //the code above should be the login part //----------------------------------------- //this is copy-pasted from wireshark's info. String smsParam="from=men&" + "sender=0&" + "msisdn=359886737498&" + "tophone=0&" + "smstext=tova+e+proba%21+1.&" + "id=&" + "sendaction=&" + "direction=&" + "msgLen=84"; url = new URL("http://www.mtel.bg/moyat-profil-sms-tsentar_3004/" + "mm/smscenter/mc/sendsms/ma/index"); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Cookie", headerName[0]); connection.setRequestProperty("Cookie", headerName[1]); //conn urlParameters = URLEncoder.encode(urlP, "CP1251"); connection.setUseCaches(false); connection.setDoInput(true); connection.setDoOutput(true); wr = new DataOutputStream( connection.getOutputStream()); wr.writeBytes(urlParameters); wr.flush(); wr.close(); //I'm not rly sure what exactly to do with this response. // Get Response InputStream is = connection.getInputStream(); BufferedReader rd = new BufferedReader(new InputStreamReader(is, "CP1251")); String line; StringBuffer response = new StringBuffer(); while ((line = rd.readLine()) != null) { response.append(line); response.append('\r'); } rd.close(); System.out.println(response.toString()); if (connection != null) { connection.disconnect(); } so that's my code so far. When I execute it ... I don't receive any text on my phone - so it clearly doesn't work as supposed to. I would appreciate any guidance or remarks. Is my cookie handling wrong? Is my login method wrong? Do I pass the right URLs. Do I encode and send the parameter string correctly? Is there any addition valuable data from these POSTs I should take? P.S. just in any case let me tell you that the username and password is not real. For security reasons I don't want to give valid ones. (I think this is appropriate approach) Here are the POST requests: POST /1/mm/auth/mc/auth/ma/index/mo/1 HTTP/1.1 Host: www.mtel.bg User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive Referer: http://www.mtel.bg/1/mm/smscenter/mc/sendsms/ma/index/mo/1 Cookie: __utma=209782857.541729286.1349267381.1349270269.1349274374.3; __utmc=209782857; __utmz=209782857.1349267381.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __atuvc=28%7C40; PHPSESSID=q0mage2usmv34slcv3dmd6t057; __utmb=209782857.3.10.1349274374 Content-Type: multipart/form-data; boundary=---------------------------151901450223722 Content-Length: 475 -----------------------------151901450223722 Content-Disposition: form-data; name="maccount" myRawUserName -----------------------------151901450223722 Content-Disposition: form-data; name="mpassword" myRawPassword -----------------------------151901450223722 Content-Disposition: form-data; name="redirect_https" http -----------------------------151901450223722 Content-Disposition: form-data; name="submit" ........ -----------------------------151901450223722-- HTTP/1.1 302 Found Server: nginx Date: Wed, 03 Oct 2012 14:26:40 GMT Content-Type: text/html; charset=Utf-8 Connection: close Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Location: /moyat-profil-sms-tsentar_3004/mm/smscenter/mc/sendsms/ma/index Content-Length: 0 The above text is vied with wireshark's follow tcp stream when pressing the log in button. POST /moyat-profil-sms-tsentar_3004/mm/smscenter/mc/sendsms/ma/index HTTP/1.1 *same as the above ones* Referer: http://www.mtel.bg/moyat-profil-sms-tsentar_3004/mm/smscenter/mc/sendsms/ma/index Cookie: __utma=209782857.541729286.1349267381.1349270269.1349274374.3; __utmc=209782857; __utmz=209782857.1349267381.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __atuvc=29%7C40; PHPSESSID=q0mage2usmv34slcv3dmd6t057; __utmb=209782857.4.10.1349274374 Content-Type: application/x-www-form-urlencoded Content-Length: 147 from=men&sender=0&msisdn=35988888888&tophone=0&smstext=this+is+some+FREE+SMS+text%21+100+char+per+sms+only%21&id=&sendaction=&direction=&msgLen=50 HTTP/1.1 302 Found Server: nginx Date: Wed, 03 Oct 2012 14:31:38 GMT Content-Type: text/html; charset=Utf-8 Connection: close Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Location: /moyat-profil-sms-tsentar_3004/mm/smscenter/mc/sendsms/ma/success/s/1 Content-Length: 0 The above text is when you press the send button.

    Read the article

  • links for 2010-04-08

    - by Bob Rhubart
    Rittman Mead Consulting: Realtime Data Warehouses Rittman Mead Consulting's Peter Scott with a preview of his Real Time Data Warehousing talk at Collaborate 10. (tags: oracle otn rittmanmead collaborate2010 datawarehousing) Arun Gupta: Java EE 6, GlassFish, NetBeans, Eclipse, OSGi at Über Conf: Jun 14-17, Denver "Über Conf is a conference by No Fluff Just Stuff gang and plans to blow the minds of attendees with over 100 in-depth sessions (90 minutes each) from over 40 world class speakers on the Java platform and pragmatic Agile practices targeted at developers, architects, and technical managers." Arun Gupta (tags: oracle sun javaee glassfish netbeans) Aaron Lazenby: Profit's COLLABORATE 10 Session Selections Profit Magazine editor-in-chief Aaron Lazenby shares his annual list of COLLABORATE 2010 sessions that "reflect some of the more interesting people/trends in enterprise IT." (tags: oracle otn collaborate2010)

    Read the article

  • New version of SQL Server Data Tools is now available

    - by jamiet
    If you don’t follow the SQL Server Data Tools (SSDT) blog then you may not know that two days ago an updated version of SSDT was released (and by SSDT I mean the database projects, not the SSIS/SSRS/SSAS stuff) along with a new version of the SSDT Power Tools. This release incorporates a an updated version of the SQL Server Data Tier Application Framework (aka DAC Framework, aka DacFX) which you can read about on Adam Mahood’s blog post SQL Server Data-Tier Application Framework (September 2012) Available. DacFX is essentially all the gubbins that you need to extract and publish .dacpacs and according to Adam’s post it incorporates a new feature that I think is very interesting indeed: Extract DACPAC with data – Creates a database snapshot file (.dacpac) from a live SQL Server or Windows Azure SQL Database that contains data from user tables in addition to the database schema. These packages can be published to a new or existing SQL Server or Windows Azure SQL Database using the SqlPackage.exe Publish action. Data contained in package replaces the existing data in the target database. In short, .dacpacs can now include data as well as schema. I’m very excited about this because one of my long-standing complaints about SSDT (and its many forebears) is that whilst it has great support for declarative development of schema it does not provide anything similar for data – if you want to deploy data from your SSDT projects then you have to write Post-Deployment MERGE scripts. This new feature for .dacpacs does not change that situation yet however it is a very important pre-requisite so I am hoping that a feature to provide declaration of data (in addition to declaration of schema which we have today) is going to light up in SSDT in the not too distant future. Read more about the latest SSDT, Power Tools & DacFX releases at: Now available: SQL Server Data Tools - September 2012 update! by Janet Yeilding New SSDT Power Tools! Now for both Visual Studio 2010 and Visual Studio 2012 by Sarah McDevitt SQL Server Data-Tier Application Framework (September 2012) Available by Adam Mahood @Jamiet

    Read the article

  • Unhappy with performance of GBit Ethernet to Fiber converter

    - by Aaron Digulla
    I just bought a TP-Link MC200CM GBit Ethernet (1000-T) to Fiber (1000-SX) media converter. The device works but I'm unhappy with the performance: When connecting my computer over 1000-T (twisted pair, Cat 6, 18meters) with my server, I get a throughput of about 610MBit/s. If I replace the cable with two media converters, I'm left with about 310-315MBit/s (i.e. half the performance). My setup is like this: Computer <- GBit switch <- long cable <- GBit switch <- server Computer <- GBit switch <- MC200CM <- 30m fiber <- MC200CM <- GBit switch <- server Is there a way to improve the performance? Will another MC be faster? Or is that about as much as I can expect with the additional 2 converters?

    Read the article

  • Oracle Developer Day OOP 2013 – become a Java expert & get a free ticket

    - by JuergenKress
    Want to become a Java Expert? Want to learn more about Java Roadmap, Java EE, Java FX, Java Cloud, ADF mobile, Rest and big data and try it hands-on? Make sure you attend the Oracle Developer Day 2013 with Adam Bien, Markus Eisele, Torsten Winterberg, Guido Schmut,  Wolfgang Weigend and Peter Doschkinow! Thursday January 24th 2013 Munich Conference Center Agenda 9.00-9.30:        Java Überblick und Roadmap – Wolfgang Weigend 9.30-10.00:       Java FX  – Peter Doschkinow 10.00-10.30:       ADF Mobile - Torsten Winterberg 10.30-11.00:       Pause 11.00-11.45:       Java EE – Adam Bien 11.45.12.15:       Java Cloud – Markus Eisele 12.15-12.45:       Java, big data & service bus & twitter– Guido Schmutz 12.45-14.30:       Mittag 14.30-16.30:       Hans-on workshops (parallel) Java FX Hands On ADF Mobile Glassfish Website with detail and Agenda Free registration for Exhibition and Oracle Developer Day For more information about Java please visit www.oracle.com/java WebLogic Partner Community For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center. BlogTwitterLinkedInMixForumWiki Technorati Tags: OOP 2013,Oracle Developer Day,OOP Oracle,Adam Bien,Markus Eisele,Guido Schmutz,Torsten Winterberg,WebLogic Community,Oracle,OPN,Jürgen Kress

    Read the article

  • Big AdventureWorks2012

    - by jamiet
    Last week I launched AdventureWorks on Azure, an initiative to make SQL Azure accessible to anyone, in my blog post AdventureWorks2012 now available for all on SQL Azure. Since then I think its fair to say that the reaction has been lukewarm with 31 insertions into the [dbo].[SqlFamily] table and only 8 donations via PayPal to support it; on the other hand those 8 donators have been incredibly generous and we nearly have enough in the bank to cover a full year’s worth of availability. It was always my intention to try and make this offering more appealing and to that end I have used an adapted version of Adam Machanic’s make_big_adventure.sql script to massively increase the amount of data in the database and give the community more scope to really push SQL Azure and see what it is capable of. There are now two new tables in the database: [dbo].[bigProduct] with 25200 rows [dbo].[bigTransactionHistory] with 7827579 rows The credentials to login and use AdventureWorks on Azure are as they were before: Server mhknbn2kdz.database.windows.net Database AdventureWorks2012 User sqlfamily Password sqlf@m1ly Remember, if you want to support AdventureWorks on Azure simply click here to launch a pre-populated PayPal Send Money form - all you have to do is login, fill in an amount, and click Send. We need more donations to keep this up and running so if you think this is useful and worth supporting, please please donate.   I mentioned that I had to adapt Adam’s script, the main reasons being: Cross-database queries are not yet supported in SQL Azure so I had to create a local copy of [dbo].[spt_values] rather than reference that in [master] SELECT…INTO is not supported in SQL Azure The 1GB limit of SQLAzure web edition meant that there would not be enough space to store all the data generated by Adam’s script so I had to decrease the total number of rows. The amended script is available on my SkyDrive at https://skydrive.live.com/redir.aspx?cid=550f681dad532637&resid=550F681DAD532637!16756&parid=550F681DAD532637!16755 @Jamiet

    Read the article

  • APress Deal of the Day - 1/June/2012 - Introducing Visual C# 2010

    - by TATWORTH
    Today's $10 Deal of the Day from APress at http://www.apress.com/9781430231714 is Introducing Visual C# 2010."If you're new to C# programming, this book is the ideal way to get started. Respected author Adam Freeman guides you through the C# language by carefully building up your knowledge from fundamental concepts to advanced features." Adam Freeman is an excellent author. This is an excellent introduction to C# programming and a manual for those with experience. Having read through book, I am very impressed by its practical approach to C#. I cannot improve on the by-line "Get started on your C# journey with an expert by your side leading by example" Adam Freeman teaches C# by precept and example. I suspect he drives a Volvo C30 as it comes up in many of the code examples! Throughout the book there are numerous links back and forth so as to avoid over complicating the current topic. I have have no hesitation in recommending this book both to programmers starting out with C# and to the seasoned professional. It is a book that should be on every C# development team's book shelf.

    Read the article

  • After logging out of SSH, screen sessions disappear on Arch Linux

    - by Ivan
    On Arch Linux (I'm on a single dedicated server, where my domain name points to only one IP), when I SSH into a user (say, for example, user mc), and then do screen -S test (or -dmS, the resulting issue is the same), run a command, and then detach from it, then exit out of my SSH session, and log back in, the screen session disappears. screen -ls returns No Sockets found in /run/screens/S-mc. The only way I can reattach to my sessions is if I never logged out of my SSH. How do I fix this? I do have read/write access in /run/screens/S-mc I detach from screen sessions with Ctrl-A,D disown -a && exit gives me the same problem shopt huponexit returns "huponexit off" There is no ~/.logout, and ~/.bash_logout is empty, with 3 lines of comments, telling me it's the ~/.bash_logout file ls -l /usr/bin | grep screen returns lrwxrwxrwx 1 root root 12 Oct 31 2012 screen -> screen-4.0.3 -rwsr-xr-x 1 root root 363672 Oct 31 2012 screen-4.0.3

    Read the article

  • Machine only responds to network requests from machines it is pinging

    - by ILikeFood
    I have two machines. WOPR: Ubuntu server edition 10.10 LTS 32 bit Adam Selene: Windows 7 home premium 64 bit / Ubuntu Desktop 10.10 LTS 64 bit I want to be able to SSH from Adam Selene to WOPR, so I connect them to the same network. Here's where things get weird. I cannot connect to WOPR in any way under normal circumstances. But, if WOPR is pinging Adam, then it starts responding to ping requests, HTTP gets, and SSH tunnels. I'm an amateur, and brand new to Ubuntu server, so I suspect there's a misconfiguration somewhere, but there's an off chance it's a bug in the OS. Does anyone know what might cause this behavior? Thanks a lot!

    Read the article

  • Writing tests for Rails plugins

    - by Adam
    I'm working on a plugin for Rails that would add limited in-memory caching to ActiveRecord's finders. The functionality itself is mature enough, but I can't for the life of me get unit tests to work with the plugin. I now have under vendor/plugins/my_plugin/test/my_plugin_test.rb a standard subclass of ActiveSupport::TestCase with a couple of basic tests. I try running 'rake test' from the plugin directory, and I have confirmed that this task loads the ruby file with the test case, but it doesn't actually run any of the tests. I followed the Rails plugin guide (http://guides.rubyonrails.org/plugins.html) where applicable, but it seems to be horribly outdated (it suggests things that Rails now do automatically, etc.) The only output I get is this: Kakadu:ingenious_record adam$ rake test (in /Users/adam/Sites/1_PRK/vendor/plugins/ingenious_record) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -Ilib:lib:test "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb" "test/ingenious_record_test.rb" The simplest test case looks like this: require 'test_helper' require 'active_record' class IngeniousRecordTest < ActiveSupport::TestCase test "example" do assert false end end This should definitely produce at least some output, and the only test in that file should produce a failed assertion. Any ideas what I could do to get Rails to run my tests?

    Read the article

  • How can I draw an arrow at the edge of the screen pointing to an object that is off screen?

    - by Adam Henderson
    I am wishing to do what is described in this topic: http://www.allegro.cc/forums/print-thread/283220 I have attempted a variety of the methods mentioned here. First I tried to use the method described by Carrus85: Just take the ratio of the two triangle hypontenuses (doesn't matter which triagle you use for the other, I suggest point 1 and point 2 as the distance you calculate). This will give you the aspect ratio percentage of the triangle in the corner from the larger triangle. Then you simply multiply deltax by that value to get the x-coordinate offset, and deltay by that value to get the y-coordinate offset. But I could not find a way to calculate how far the object is away from the edge of the screen. I then tried using ray casting (which I have never done before) suggested by 23yrold3yrold: Fire a ray from the center of the screen to the offscreen object. Calculate where on the rectangle the ray intersects. There's your coordinates. I first calculated the hypotenuse of the triangle formed by the difference in x and y positions of the two points. I used this to create a unit vector along that line. I looped through that vector until either the x coordinate or the y coordinate was off the screen. The two current x and y values then form the x and y of the arrow. Here is the code for my ray casting method (written in C++ and Allegro 5) void renderArrows(Object* i) { float x1 = i->getX() + (i->getWidth() / 2); float y1 = i->getY() + (i->getHeight() / 2); float x2 = screenCentreX; float y2 = ScreenCentreY; float dx = x2 - x1; float dy = y2 - y1; float hypotSquared = (dx * dx) + (dy * dy); float hypot = sqrt(hypotSquared); float unitX = dx / hypot; float unitY = dy / hypot; float rayX = x2 - view->getViewportX(); float rayY = y2 - view->getViewportY(); float arrowX = 0; float arrowY = 0; bool posFound = false; while(posFound == false) { rayX += unitX; rayY += unitY; if(rayX <= 0 || rayX >= screenWidth || rayY <= 0 || rayY >= screenHeight) { arrowX = rayX; arrowY = rayY; posFound = true; } } al_draw_bitmap(sprite, arrowX - spriteWidth, arrowY - spriteHeight, 0); } This was relatively successful. Arrows are displayed in the bottom right section of the screen when objects are located above and left of the screen as if the locations of the where the arrows are drawn have been rotated 180 degrees around the center of the screen. I assumed this was due to the fact that when I was calculating the hypotenuse of the triangle, it would always be positive regardless of whether or not the difference in x or difference in y is negative. Thinking about it, ray casting does not seem like a good way of solving the problem (due to the fact that it involves using sqrt() and a large for loop). Any help finding a suitable solution would be greatly appreciated, Thanks Adam

    Read the article

  • SQL Server Optimizer Malfunction?

    - by Tony Davis
    There was a sharp intake of breath from the audience when Adam Machanic declared the SQL Server optimizer to be essentially "stuck in 1997". It was during his fascinating "Query Tuning Mastery: Manhandling Parallelism" session at the recent PASS SQL Summit. Paraphrasing somewhat, Adam (blog | @AdamMachanic) offered a convincing argument that the optimizer often delivers flawed plans based on assumptions that are no longer valid with today’s hardware. In 1997, when Microsoft engineers re-designed the database engine for SQL Server 7.0, SQL Server got its initial implementation of a cost-based optimizer. Up to SQL Server 2000, the developer often had to deploy a steady stream of hints in SQL statements to combat the occasionally wilful plan choices made by the optimizer. However, with each successive release, the optimizer has evolved and improved in its decision-making. It is still prone to the occasional stumble when we tackle difficult problems, join large numbers of tables, perform complex aggregations, and so on, but for most of us, most of the time, the optimizer purrs along efficiently in the background. Adam, however, challenged further any assumption that the current optimizer is competent at providing the most efficient plans for our more complex analytical queries, and in particular of offering up correctly parallelized plans. He painted a picture of a present where complex analytical queries have become ever more prevalent; where disk IO is ever faster so that reads from disk come into buffer cache faster than ever; where the improving RAM-to-data ratio means that we have a better chance of finding our data in cache. Most importantly, we have more CPUs at our disposal than ever before. To get these queries to perform, we not only need to have the right indexes, but also to be able to split the data up into subsets and spread its processing evenly across all these available CPUs. Improvements such as support for ColumnStore indexes are taking things in the right direction, but, unfortunately, deficiencies in the current Optimizer mean that SQL Server is yet to be able to exploit properly all those extra CPUs. Adam’s contention was that the current optimizer uses essentially the same costing model for many of its core operations as it did back in the days of SQL Server 7, based on assumptions that are no longer valid. One example he gave was a "slow disk" bias that may have been valid back in 1997 but certainly is not on modern disk systems. Essentially, the optimizer assesses the relative cost of serial versus parallel plans based on the assumption that there is no IO cost benefit from parallelization, only CPU. It assumes that a single request will saturate the IO channel, and so a query would not run any faster if we parallelized IO because the disk system simply wouldn’t be able to handle the extra pressure. As such, the optimizer often decides that a serial plan is lower cost, often in cases where a parallel plan would improve performance dramatically. It was challenging and thought provoking stuff, as were his techniques for driving parallelism through query logic based on subsets of rows that define the "grain" of the query. I highly recommend you catch the session if you missed it. I’m interested to hear though, when and how often people feel the force of the optimizer’s shortcomings. Barring mistakes, such as stale statistics, how often do you feel the Optimizer fails to find the plan you think it should, and what are the most common causes? Is it fighting to induce it toward parallelism? Combating unexpected plans, arising from table partitioning? Something altogether more prosaic? Cheers, Tony.

    Read the article

  • Refresh conent with JQuery/AJAX after using a MVC partial view

    - by Aaron Salazar
    Using the following JQuery/AJAX function I'm calling a partial view when an option is changed in a combobox named "ReportedIssue" that is also in the partial view. The is named "tableContent". <script type="text/javascript"> $(function() { $('#ReportedIssue') .change(function() { var styleValue = $(this).val(); $('#tableContent').load( '/CurReport/TableResults', { style: styleValue } ); }) .change(); }); </script> My problem is that after the jump to the partial view I lose the link to the javascript. I think I'm supposed to use the JQuery ".live()" but I'm unsure. In short, I want to re-establish the link between my JavaScript and my combobox and after the inclusion of the partial view's HTML. I hope I'm being clear enough, Aaron

    Read the article

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