Daily Archives

Articles indexed Wednesday February 16 2011

Page 3/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Starting a career in quantitative finance

    - by Vitor Braga
    I've been reading John Hull book (Options, Futures and Other Derivatives) mostly on curiosity. I've read other books about financial markets in the past (like Elder's Trading for Living and the novel Reminiscences of a Stock Operator). But I'm really hooked by the John Hull book. My background is mostly scientific computing: number crunching, visualization and image processing. Mostly in C++, with some C, Fortran, Python, Ruby here and there. I've been thinking on moving on to quantitative finance - I'd like to do that. What would be the best way to start? Any tips?

    Read the article

  • Why are Javascript for/in loops so verbose?

    - by Matthew Scharley
    I'm trying to understand the reasoning behind why the language designers would make the for (.. in ..) loops so verbose. For example: for (var x in Drupal.settings.module.stuff) { alert("Index: " + x + "\nValue: " + Drupal.settings.module.stuff[x]); } It makes trying to loop over anything semi-complex like the above a real pain as you either have to alias the value locally inside the loop yourself, or deal with long access calls. This is especially painful if you have two to three nested loops. I'm assuming there is a reason why they would do things this way, but I'm struggling with the reasoning.

    Read the article

  • How do I play HD video without stuttering?

    - by hugocreal
    Hello All, I want play a Blu Ray Video from my hard drive with Boxee, but it chokes all the time, i try play with others video players but is the same. I think that is a 10gb .mkv file with 10Gb. Stuttering video with VLC , mplayer, and the default video player on ubuntu... I read in many Forums just can´t put this to work. Any idea? thanks. Ubuntu 10.10, My PC specs: Single Core 2Ghz ATI HD 4350 (i have installed the drivers from "Hardware Drivers"), 2G Memory

    Read the article

  • The partition table is corrupt

    - by Tim
    I have a corrupt the partition table on the laptop that is running Ubunutu 10.4. Before the partition table was corrupt I had the following partitions: 2 primary partitions: 1st - NTFS 2nd - Extended 4 logical partitons that are built within 2nd extended: 1st NTFS (68 Gib) 2nd Linux (19 Gib) 3rd Swap (1.4 Gib) 4th Linux (24 Gib) The physical order of these partitions was the following: ( 4th Linux ) - ( 1st NTFS ) - ( 2nd Linux ) - ( 3rd Swap ) The logical order of the partition was different: ( 1st NTFS ) - ( 2nd Linux ) - ( 3rd Swap ) ( 4th Linux ) NTFS partition was big and it resided between 2 Linux partitions, neither of these partitions had enough space to install Oracle 11g. Therefore, I decided to a) either move the NTFS partion to the left or b) remove it completely and extend partition where Linux resides. As I tool I have chosen GParted. But unfortunately it was not able to move the partition because he found that in NTFS partition there are some blocks that are referenced multiple times. Also it was not able to remove the partition neither, because in this case the partitions that follow it ( 2nd Linux ) - ( 3rd Swap ) have to be in his opinion also removed, because the organization of extended partition is a linked list. Since GParted was not able to do such thing I was trying to find another tool. I found diskdrake tool on PSLinuxOS distribution of linux. That tool silently deleted ( 1st NTFS ) partition and I thought that everything was fine. But diskdrake has damaged the partition in a way that I am not able either to boot from the hard disk nor to see the partitions with GParted and even with diskdrake itself! Fortunately I have a live CD of Ubuntu 8.10 and I am able to boot and see hard disk. I have 2 ideas how I can solve the problem: 1) Manually change disk partitions and point them to the correct partitions. 2) Create partition table with GParted that as much as possible is the same with the previous one I find the 2nd approach less time consuming but some data will be lost because of it is not possible to place borders of the partitions exactly how it was before. And moreover I am not sure if such approach would work, for example, if the OS is able to locate files after repartitioning. I feel like that it will but not 100% sure. Are there some ideas how the problem may be solved?

    Read the article

  • Using an APT proxy for downloads during installation

    - by intuited
    During system installation from a Desktop LiveCD (10.10) I checked the "Download updates during installation" option. Before starting the install I had configured an apt proxy server; this had been used correctly for my various package installs prior to launching the system installation GUI. However, the downloads taking place during the installation are not using the proxy. Is there a way to force usage of an APT proxy during installation?

    Read the article

  • Boot failure on installation from a burned iso image

    - by jdamae
    I'm encountering boot failure while trying to install a Linux distro from a CD. I'm using an older PC; here are its specs: HP Pavilion a255c 2.66GHz CPU, 512MB RAM with a BIOS revision of 6/30/2003 I reclaimed an older drive (Seagate ST340810A) that seems to be working, as it's recognized in the BIOS (auto-detected). So this is not the original HDD, but a replacement. I downloaded a mini.iso of Ubuntu 10.10 that I want to install, and burned the image to a CD for install. My boot sequence is: First Boot Device [CDROM]. I disabled devices 2-4 so I can just force it to read first from the CD-ROM. This old PC also has a separate CD writer which is a Sec.Slave. The Sec.Master is the Toshiba DVD/ROM DSM-171 drive where I placed the burned Linux CD. With these settings I cannot get it to boot. I get the message "DISK BOOT FAILURE, INSERT SYSTEM DISK AND PRESS ENTER" when I start the pc with the cd (burned iso image). Would I be able to boot off a usb flash drive? Would that work?

    Read the article

  • No splash screen on hibernate

    - by Marky
    Hibernate is working fine. A bit slow when resuming from a hibernate but I can bear with it just so that I have all open applications on the desktop as I left it. Then again the "slowness" might be because of the 4GB RAM, although I'm assuming only what is used gets swapped and not the entire memory. Going back, my question is has anyone been able to make Ubuntu show a splash screen or some kind of indicator/progress bar to show while hibernating or while resuming? I remember with SuSE on my HP Compaq Presario notebook it had messages appear during and after. Better than nothing, I guess. Thanks in advance! :D

    Read the article

  • How can find out the device Id of my unmounted DVD?

    - by fred.bear
    When I put a DVD into the DVD drive, it appears in Nautilus Places, but is not automatically mounted. (this is by personal choice). In this unmounted state, mount (of course) reports nothing, and likewise for df.. but Nautilus is aware of the DVD hardware unit and has read the Label; which it shows in Places So it seems to me that Nautilus has already accessed the DVD devices (Did it temporarily mount it?)... The main point of my question was to determine how to find the device Id of an unmounted device .. but as I've been writing this, I now think it may not be as simple as that... This issue came up because I wanted to test this command cat iso-pieces.* | growisofs -Z /dev/dvd=/dev/stdin, but then realized that I didn't know how to get my DVD's device Id. ... and does the above command requires a mounted device, or does it write directly to the device? ... as you can see, I'm a bit vague about devices :) Come to think of it maybe Nautalus read the DVD device directly, because when all is said and done, something has to read/write directly to it. info growisofs says: Under Linux it will most likely be an ide-scsi device such as "/dev/scd0 How can I find this Id via a script?

    Read the article

  • I can't use my iPod touch (32GB)

    - by Silambarasan
    Hi All.. I have connected my ipod touch 32gb in my ubuntu 10.10 os.It's connected on os and shows in desktop. but it's not showing as a device in Rhythmbox music player. and also I can't open directly like folder or drive or usb device. when I try to open it show this Error: Could not display "gphoto2://[usb:001,003]/". Error: DBus error org.freedesktop.DBus.Error.ServiceUnknown: The name :1.207 was not provided by any .service files Please select another viewer and try again. Any solution for this problem?

    Read the article

  • How to get pngcrush to overwrite original files?

    - by DisgruntledGoat
    I've read through man pngcrush and it seems that there is no way to crush a PNG file and save it over the original. I want to compress several folders worth of PNGs so it would be useful to do it all with one command! Currently I am doing pngcrush -q -d . *.png then manually cut-pasting the files from the tmp directory to the original folder. So I guess using mv might be the best way to go? Any better ideas?

    Read the article

  • Is my Document Type Definition Still Up to Date?

    - by Sam
    Hi folks, currently all my php generated rich html webpages start with this line, which I have been adding to my tempaltes YEARS ago... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Am I still up to date and 2011-proof? or Should I be changing this into something fasterloaden/more agile/more flexible? I have heard of XHTML 1.1. When I remove this line all still works fine. Is it very much needed still? What are my alternatives? Thanks very much for your suggestions.

    Read the article

  • rewrite rule if iphone?

    - by daniel Crabbe
    hello there. just need one url on my site to check if its a mobile device and then rerite the url accordingly. want to rewrite; /play-reel/miranda-bowen/playpeaches-and-cream to /mobile/play-reel/miranda-bowen/playpeaches-and-cream RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$ [NC] RewriteRule ^play-reel(.*)\$ mobile/play-reel$1 [R=302,NC] RewriteRule ^mobile/play-reel/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)$ play-reel-new-html5-02.php?director=$1&video=$2 [L] # the 3rd line works but cant get the url to change for it to be picked up can anyone see what's wrong? There's no erro best, Dan

    Read the article

  • When does a game idea cross the line between homage/parody to ripoff?

    - by Daniel T.
    I'm not sure where this question belongs, but as it pertains to the development of a game idea, I figured I'd try to post it here. Recently I've been inspired to create a game based on another game I've played. However, the idea that I have is very similar to the original game. I was wondering, when does a game idea cross from being a homage or parody into the realm of being a ripoff? Are there any hard or fast rules or does this cross into a gray area?

    Read the article

  • Setting up OpenGL camera with off-center perspective

    - by user5484
    Hi, I'm using OpenGL ES (in iOS) and am struggling with setting up a viewport with an off-center distance point. Consider a game where you have a character in the left hand side of the screen, and some controls alpha'd over the left-hand side. The "main" part of the screen is on the right, but you still want to show whats in the view on the left. However when the character moves "forward" you want the character to appear to be going "straight", or "up" on the device, and not heading on an angle to the point that is geographically at the mid-x position in the screen. Here's the jist of how i set my viewport up where it is centered in the middle: // setup the camera // glMatrixMode(GL_PROJECTION); glLoadIdentity(); const GLfloat zNear = 0.1; const GLfloat zFar = 1000.0; const GLfloat fieldOfView = 90.0; // can definitely adjust this to see more/less of the scene GLfloat size = zNear * tanf(DEGREES_TO_RADIANS(fieldOfView) / 2.0); CGRect rect; rect.origin = CGPointMake(0.0, 0.0); rect.size = CGSizeMake(backingWidth, backingHeight); glFrustumf(-size, size, -size / (rect.size.width / rect.size.height), size / (rect.size.width / rect.size.height), zNear, zFar); glMatrixMode(GL_MODELVIEW); // rotate the whole scene by the tilt to face down on the dude const float tilt = 0.3f; const float yscale = 0.8f; const float zscale = -4.0f; glTranslatef(0.0, yscale, zscale); const int rotationMinDegree = 0; const int rotationMaxDegree = 180; glRotatef(tilt * (rotationMaxDegree - rotationMinDegree) / 2, 1.0f, 0.0f, 0.0f); glTranslatef(0, -yscale, -zscale); static float b = -25; //0; static float c = 0; // rotate by to face in the direction of the dude float a = RADIANS_TO_DEGREES(-atan2f(-gCamera.orientation.x, -gCamera.orientation.z)); glRotatef(a, 0.0, 1.0, 0.0); // and move to where it is glTranslatef(-gCamera.pos.x, -gCamera.pos.y, -gCamera.pos.z); // draw the rest of the scene ... I've tried a variety of things to make it appear as though "the dude" is off to the right: - do a translate after the frustrum to the x direction - do a rotation after the frustrum about the up/y-axis - move the camera with a biased lean to the left of the dude Nothing i do seems to produce good results, the dude will either look like he's stuck on an angle, or the whole scene will appear tilted. I'm no OpenGL expert, so i'm hoping someone can suggest some ideas or tricks on how to "off-center" these model views in OpenGL. Thanks!

    Read the article

  • Best way to go for simple online multi-player games?

    - by Mr_CryptoPrime
    I want to create a trivia game for my website. The graphic design does not have to be too fancy, probably no more advanced than a typical flash game. It needs to be secure because I want users to be able to play for real money. It also needs to run fast so users don't spend their time frustrated with game freezing. Compatibility, as with almost all online products, is key because of the large target market. I am most acquainted with Java programming, but I don't want to do it in Java if there is something much better. I am assuming I will have to utilize a variety of different languages in order for everything to come together. If someone could point out the main structure of everything so I could get a good start that would be great! 1) Language choice for simple secure online multiplayer games? 2) Perhaps use a database like MySQL, stored on a secure server for the trivia questions? 3) Free educational resources and even simpler projects to practice? Any ideas or suggestions would be helpful...Thanks!

    Read the article

  • A good way to build a game loop in OpenGL

    - by Jeff
    I'm currently beginning to learn OpenGL at school, and I've started making a simple game the other day (on my own, not for school). I'm using freeglut, and am building it in C, so for my game loop I had really just been using a function I made passed to glutIdleFunc to update all the drawing and physics in one pass. This was fine for simple animations that I didn't care too much about the frame rate, but since the game is mostly physics based, I really want to (need to) tie down how fast it's updating. So my first attempt was to have my function I pass to glutIdleFunc (myIdle()) to keep track of how much time has passed since the previous call to it, and update the physics (and currently graphics) every so many milliseconds. I used timeGetTime() to do this (by using <windows.h>). And this got me to thinking, is using the idle function really a good way of going about the game loop? My question is, what is a better way to implement the game loop in OpenGL? Should I avoid using the idle function?

    Read the article

  • Per-vertex animation with VBOs: VBO per character or VBO per animation?

    - by charstar
    Goal To leverage the richness of well vetted animation tools such as Blender to do the heavy lifting for a small but rich set of animations. I am aware of additive pose blending like that from Naughty Dog and similar techniques but I would prefer to expend a little RAM/VRAM to avoid implementing a thesis-ready pose solver. I would also like to avoid implementing a key-frame + interpolation curve solver (reinventing Blender vertex groups and IPOs), if possible. Scenario Meshes are animated using either skeletons (skinned animation) or some form of morph targets (i.e. per-vertex key frames). However, in either case, the animations are known in full at load-time, that is, there is no physics, IK solving, or any other form of in-game pose solving. The number of character actions (animations) will be limited but rich (hand-animated). There may be multiple characters using a each mesh and its animations simultaneously in-game (they will likely be at different frames of the same animation at the same time). Assume color and texture coordinate buffers are static. Current Considerations Much like a non-shader-powered pose solver, create a VBO for each character and copy vertex and normal data to each VBO on each frame (VBO in STREAMING). Create one VBO for each animation where each frame (interleaved vertex and normal data) is concatenated onto the VBO. Then each character simply has a buffer pointer offset based on its current animation frame (e.g. pointer offset = (numVertices+numNormals)*frameNumber). (VBO in STATIC) Known Trade-Offs In 1 above: Each VBO would be small but there would be many VBOs and therefore lots of buffer binding and vertex copying each frame. Both client and pipeline intensive. In 2 above: There would be few VBOs therefore insignificant buffer binding and no vertex data getting jammed down the pipe each frame, but each VBO would be quite large. Are there any pitfalls to number 2 (aside from finite memory)? I've found a lot of information on what you can do, but no real best practices. Are there other considerations or methods that I am missing?

    Read the article

  • Keeping game model and graphics/animation separate but in sync

    - by AJM
    Suppose I'm building a chess game where I want to have animations. Pieces glide to their new squares when moved. Pieces perform attack animations when capturing other pieces. I'm not sure how to effectively separate the data and logic needed for these animations and the actual game model (in the MVC sense). The pieces themselves should ideally not have to worry about their pixel coordinates or current animation frame. At the same time, many changes to the model are effectively driven by animations. A moved piece changes its position after (before?) its sprite is done gliding. A piece is removed from the board after the capturing piece is finished its attack animation. How would you suggest I manage the game model, the graphics and animations, and their relationships? For example, where would the animations "live"? How would animations be created and managed in response to player moves? How would animations drive updates to the game model, or how would the game model drive animations?

    Read the article

  • Binding Data into a Resource

    - by Jordan
    How do you bind data from the view model into an object in the resources of the user control? Here is a very abstract example: <UserControl ... xmlns:local="clr-namespace:My.Local.Namespace" Name="userControl"> <UserControl.Resources> <local:GroupingProvider x:Key="groupingProvider" GroupValue="{Binding ???}" /> </UserControl.Resources> <Grid> <local:GroupingConsumer Name="groupingConsumer1" Provider={StaticResource groupingProvider"} /> <local:GroupingConsumer Name="groupingConsumer2" Provider={StaticResource groupingProvider"} /> </Grid> </UserControl> How do I bind GroupValue to a property in the view model behind this view. I've tried the following: <local:GroupingProvider x:Key="groupingProvider" GroupValue="{Binding ElementName=userControl, Path=DataContext.Property}"/> But this doesn't work. Edit: GroupProvider extends DependencyObject and GroupValue is the name of a DependencyProperty. I'm getting an debugging message telling me that the property to which I am binding doesn't exist.

    Read the article

  • Crystal reports 11 RDC (COM API) displays printer dialog even when I tell it not to prompt

    - by bdonlan
    I'm using Crystal Reports 11's RDC (COM) API to print. My code looks like this: HRESULT res = m_Report->SelectPrinter(b_driver, b_device, b_port); if (FAILED(res)) return res; // For these calls, the #import wrapper throws on error m_Report->PutPrinterDuplex(dmDuplex); m_Report->PutPaperSize(dmPaperSize); m_Report->PutPaperSource((CRPaperSource)pdlg->GetDevMode()->dmDefaultSource); if (m_Report->GetPaperOrientation() == crDefaultPaperOrientation) m_Report->PutPaperOrientation(crPortrait); VARIANT vfalse; VariantInit(&vfalse); vfalse.vt=VT_BOOL; vfalse.boolVal=0; res = m_Report->PrintOut(vfalse); However, at the end of all this, crystal reports still shows its own printer selection dialog - but only for some reports, it seems. Why does crystal reports show a print dialog even when I pass false for promptUser? And how, then, can I suppress crystal reports' internal printer selection dialog and force it to use my values? Edit: Whoops, CR11, not CR9. Some further information: The reports that work properly (ie, do not show the print dialog) are generated internally using the RDC API; we create a new report object, import subreports into it, then print the result. No problem there. The reports that do not work properly (ie, force the print dialog to open) have been created with a previous version of crystal reports; however, opening and saving the report does not seem to help. Sample reports in the Crystal Reports installation directory show the same problem. I tried reproducing with VBScript; however, the result was that nothing was printed at all (no dialog, no nothing): Set app = CreateObject("CrystalRuntime.Application.11") Set report = app.OpenReport("C:\Program Files\Business Objects\Crystal Reports 11.5\Samples\en\Reports\General Business\Inventory Crosstab.rpt") report.PrintOut(True) rem Testing with a True parameter to force a print dialog - but no printout and nothing appears (no error either though)

    Read the article

  • Explained shell statement

    - by Mats Stijlaart
    The following statement will remove line numbers in a txt file: cat withLineNumbers.txt | sed 's/^.......//' >> withoutLineNumbers.txt The input file is created with the following statement (this one i understand): nl -ba input.txt >> withLineNumbers.txt I know the functionality of cat and i know the output is written to the 'withoutLineNumbers.txt' file. But the part of '| sed 's/^.......//'' is not really clear to me. Thanks for your time.

    Read the article

  • Forming Xpath Query for total Google results

    - by user619879
    I've used this formula in Google Spreadsheets in the past to input the number of search results into a cell. The formula's not working anymore and I know I need to fix the xpath query. any ideas? Current formula: =importXML("http://www.google.com/search?num=100&q="&A2,"//p[@id='resultStats']/b[3]") Spreadsheet for public testing: https://spreadsheets8.google.com/ccc?key=tJzmFllp7Sk1lt23cXSVXFw&authkey=CM625OUO#gid=0

    Read the article

  • JQuery-tmpl Template Switching Not working.

    - by Mike
    I'm trying to implement "more/less" functionality using the official jquery-tmpl plugin. I've looked at the examples, but I cannot seem to get the functionality to work in my own implementation. When I click on one of my "More" buttons, I seem to get an error thrown of: Uncaught TypeError: Property 'tmpl' of object #<an Object> is not a function This is my implementation here From what I can tell, the example I'm trying to replace is doing the following: Render the "Master" template On-click: Find the corresponding template object (tmplItem) to the clicked element. Pass in reference to a new template. Call the update function to re-render. Have I understood the documentation wrong? From what I can tell I'm doing the same thing as the example on the official documentation.

    Read the article

  • Unable to send an associative array in JSON format in Zend to client

    - by Anorflame
    Hi, In one of my actions in a controller, I'm using the json view helper to send back a response to an ajax request. On the client side I alert the data that is passed to the success callback function. It works fine as long as the response is a number or an array with default keys. Once I try to send an associative array, it alerts with [object Object]. Server code: $childArray = array('key'=>'value'); $this->_helper->json($childArray); javascript: function displayChildren(data){ alert(data); } ... $.ajax({ url: "/po/add", dataType: "json", data: {format: "json"}, success: displayChildren }); I have no idea what am I doing wrong here, so any help would be appreciated...

    Read the article

  • JavaScript Show/Hide as Filters to list of divs

    - by deconspray
    Looking to create Javascript that acts like a filter on a list of divs. For instance, here's the intended markup... <a href="#" onclick="">Filter Item 1</a> <a href="#" onclick="">Filter Item 2</a> <a href="#" onclick="">Filter Item 3</a> <a href="#" onclick="">Filter Item 4</a> <a href="#" onclick="">Filter Item 5</a> <div class="1">Item 1</div> <div class="1">Item 1</div> <div class="2">Item 2</div> <div class="3">Item 3</div> <div class="1">Item 1</div> <div class="4">Item 4</div> <div class="4">Item 4</div> <div class="1">Item 1</div> <div class="5">Item 5</div> I want to be able to click on the link for Item 1, and show only Item 1 divs and hide all other divs, click the link of Item 2, and show only Item 2 divs and hide all other divs and so on. I've seen several similar scripts but nothing that seemingly turns divs matching the class on/off in this manner. TIA.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >