Search Results

Search found 1440 results on 58 pages for 'josh jay'.

Page 44/58 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • How to skip to next iteration in jQuery.each() util?

    - by Josh
    I'm trying to iterate through an array of elements. jQuery's documentation says: jquery.Each() documentation Returning non-false is the same as a continue statement in a for loop, it will skip immediately to the next iteration. I've tried calling 'return non-false;' and 'non-false;' (sans return) neither of which skip to the next iteration. Instead, they break the loop. What am i missing?

    Read the article

  • OpenGL ES functions not accepting values originating outside of it's view

    - by Josh Elsasser
    I've been unable to figure this out on my own. I currently have an Open GLES setup where a view controller both updates a game world (with a dt), fetches the data I need to render, passes it off to an EAGLView through two structures (built of Apple's ES1Renderer), and draws the scene. Whenever a value originates outside of the Open GL view, it can't be used to either translate objects using glTranslatef, or set up the scene using glOrthof. If I assign a new value to something, it will work - even if it is the exact same number. The two structures I have each contain a variety of floating-point numbers and booleans, along with two arrays. I can log the values from within my renderer - they make it there - but I receive errors from OpenGL if I try to do anything with them. No crashes result, but the glOrthof call doesn't work if I don't set the camera values to anything different. Code used to set up scene: [EAGLContext setCurrentContext:context]; glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); //clears the color buffer bit glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_PROJECTION); //sets up the scene w/ ortho projection glViewport(0, 0, 320, 480); glLoadIdentity(); glOrthof(320, 0, dynamicData.cam_x2, dynamicData.cam_x1, 1.0, -1.0); glClearColor(1.0, 1.0, 1.0, 1.0); /*error checking code here*/ "dynamicData" (which is replaced every frame) is created within my game simulation. From within my controller, I call a method (w/in my simulation) that returns it, and pass the result on to the EAGLView, which passes it on to the renderer. I haven't been able to come up with a better solution for this - suggestions in this regard would be greatly appreciated as well. Also, this function doesn't work as well (values originate in the same place): glTranslatef(dynamicData.ship_x, dynamicData.ship_y, 0.0); Thanks in advance. Additional Definitions: Structure (declared in a separate header): typedef struct { float ship_x, ship_y; float cam_x1, cam_x2; } dynamicRenderData; Render data getter (and builder) (every frame) - (dynamicData)getDynRenderData { //d_rd is an ivar, zeroed on initialization d_rd.ship_x = mainShip.position.x; d_rd.ship_y = mainShip.position.y; d_rd.cam_x1 = d_rd.ship_x - 30.0f; d_rd.cam_x2 = d_rd.cam_x1 + 480.0f; return d_rd; } Zeroed at start. (d_rd.ship_x = 0;, etc…) Setting up the view. Prototype (GLView): - (void)draw: (dynamicRenderData)dynamicData Prototype (Renderer): - (void)drawView: (dynamicRenderData)dynamicData How it's called w/in the controller: //controller [glview draw: [world getDynRenderData]]; //glview (within draw) [renderer drawView: dynamicData];

    Read the article

  • .NET MVC Code Generation

    - by Josh
    Is there a way to force the MVC automatically generated code to follow the conventions you have set in your preferences? For example, I keep all curly braces on the same lines as their declaring class, method, etc, but when generating a controller, it completely disregards my settings. Is there a setting someplace to force the same code generation as other parts of project?

    Read the article

  • confused about how to use JSON in C#

    - by Josh
    The answer to just about every single question about using C# with json seems to be "use JSON.NET" but that's not the answer I'm looking for. the reason I say that is, from everything I've been able to read in the documentation, JSON.NET is basically just a better performing version of the DataContractSerializer built into the .net framework... Which means if I want to deserialize a JSON string, I have to define the full, strongly-typed class for EVERY request I might have. so if I have a need to get categories, posts, authors, tags, etc, I have to define a new class for every one of these things. This is fine if I built the client and know exactly what the fields are, but I'm using someone else's api, so I have no idea what the contract is unless I download a sample response string and create the class manually from the JSON string. Is that the only way it's done? Is there not a way to have it create a kind of hashtable that can be read with json["propertyname"]? Finally, if I do have to build the classes myself, what happens when the API changes and they don't tell me (as twitter seems to be notorious for doing)? I'm guessing my entire project will break until I go in and update the object properties... So what exactly is the general workflow when working with JSON? And by general I mean library-agnostic. I want to know how it's done in general, not specifically to a target library... I hope that made sense, this has been a very confusing area to get into... thanks!

    Read the article

  • are fixtures loaded when using the sql dump to create a test database

    - by Josh Moore
    Because of some non standard table creation options I am forced to use the sql dump instead of the standard schema.rb (i.e. I have uncommented this line in the environment.rb config.active_record.schema_format = :sql). I have noticed that when I use the sql dump that my fixtures do not seem to be loaded into the database. Some data is loaded into it but, I am not sure where it is coming from. Is this normal? and if it is normal can anybody tell me where this other data is coming from?

    Read the article

  • Need some help accessing password string / Debugging

    - by Josh Lake
    I'm doing this code for the sole purpose in trying out how to get the password field masked. Any suggestions on where to go next? #include <iostream> #include <cmath> #include <stdio.h> #include <cstring> #include <conio.h> using namespace std; inline void keep_window_open() { char ch; cin>>ch; } int main() { cout << "Welcome to the Classified Network, DOD842349729961971\n"; cout << "Username: \n"; string admin = "gardinerca"; string root_password = "password1"; string full_name = "User Name"; string name; cin >> name; if (name == admin) { printf("Password: "); char password[10]; int i; for (i = 0; i <= 10; i++) { int c = getch(); if (c == '\n' || c == EOF) break; password[i] = c; printf("*"); } password[i] = '\0'; if (strcmp(password, root_password) == 0) { system("CLS"); cout << "Welcome " << full_name << " to the Classified Network\n"; cout << "Would you like to play a game? (Y or N)\n"; string play_game; cin >> play_game; if (play_game == "Y") { cout << "How many balls can you stick in your mouth?\n"; int balls; cin >> balls; string one; string two; one = "One Ball"; two = "Two Ball's"; if (balls == 1) cout << "You can honestly stick " << one << " in your mouth?"; } else { cout << "You have selected the No Option. Thats fine...we don't want to play with you either\n"; } } else { cout << "Invaild Password. Please contact system administrator.\n"; cin.clear(); system ("PAUSE"); } else { cout << "No Username found. Please contact system administrator.\n"; cin.clear(); system ("PAUSE"); } return 0; }

    Read the article

  • Can I do this with just SQL?

    - by Josh
    At the moment I have two tables, products and options. Products contains id title description Options contains id product_id sku title Sample data may be: Products id: 1 title: 'test' description: 'my description' Options id: 1 product_id: 1 sku: 1001 title: 'red' id: 2 product_id: 1 sku: 1002 title: 'blue' I need to display each item, with each different option. At the moment, I select the rows in products and iterate through them, and for each one select the appropriate rows from options. I then create an array, similar to: [product_title] = 'test'; [description] = 'my description'; [options][] = 1, 1001, 'red'; [options][] = 2, 1002, 'blue'; Is there a better way to do this with just sql (I'm using codeigniter, and would ideally like to use the Active Record class)?

    Read the article

  • Paperclip Progres bar

    - by Josh Crowder
    I havve been looking around for something that shows the progress of an upload using Paperclip. I can't find any solutions is there any out there? If not is there any particular progress uploader that can be recommended?

    Read the article

  • Splitting PDF to png

    - by Josh Crowder
    I'm using paperclip to upload a pdf. Once the file is uploaded I need to split every page into a png. This is the command I think I need to use convert -size 640x300 fileName.pdf slide.png Now if I run that command from terminal it works fine, but I need a way of getting each slides name so I can add it into a model. What's the best way to achieve this?

    Read the article

  • Something Better than .NET Reflector?

    - by Josh Stodola
    I used to love Reflector back in the day, but ever since RedGate took over it has gone downhill dramatically. Now it forces me to update (which is absolutely ridiculous), half the time the update doesn't go smoothly, and it is increasingly hindering my productivity with each update. I am sick of it, and I am ready for something better. Does anybody know of a better disassembler?

    Read the article

  • PHP with Javascript: Email confirmation script not working

    - by Josh K
    Hey Heres what i got: echo "<script type=\"text/javascript\"> function finishForm() { var answer = confirm('Are you sure these are the teams you want to enter with?'); if (answer) { if(document.getElementByID(emailconfirm).value == ".$_SESSION[Email].") { form.action=\"esubmit.php\"; form.submit(); } else { alert('E-mail address do not match'); return false; } } } function restartForm() { var answer = confirm('Are you sure you want to start over?'); if (answer) { form.action=\"e1.php\"; form.submit(); } } </script>"; I have a regular button calling this function. emailconfirm is a text input. I want to confirm that they have chosen the right teams, then check if the email in the session and the email confirmation text match. If they do match Then i want to submit the form. If they dont match, I want to alert the user they dont match, and just return to page so user can check emails and then resubmit. This script is in my header. EDIT: Haha sorry i submitted one before and it didnt go through, forgot to add my problem!! When you click the button it comes up with the confirmation, clicking either yes or no doesnt do anything. The alert doesnt pop up if they dont match and if they do match it doesnt submit. Also it might be good to note I had it without the email confirmation if statement and it worked fine (going to the submit page)

    Read the article

  • continuous integration web service

    - by Josh Moore
    I am in a position where I could become a team leader of a team distributed over two countries. This team would be the tech. team for a start up company that we plan to bootstrap on limited funds. So I am trying to find out ways to minimize upfront expenses. Right now we are planning to use Java and will have a lot of junit tests. I am planing on using github for VCS and lighthouse for a bug tracker. In addition I want to add a continuous integration server but I do not know of any continuous integration servers that are offered as a web service. Does anybody know if there are continuous integration servers available in a software as a service model? P.S. if anybody knows were I can get these three services at one location that would be great to know to.

    Read the article

  • How to nest a Location directive inside a virtual host config?

    - by Josh
    I am trying nest a Location directive inside a virtual host config like this: <VirtualHost *:80> ServerName mysite.com DocumentRoot /home/deployer/apps/mysite/current/public ErrorLog /var/log/prod.log <Location "/shop"> DocumentRoot /home/deployer/apps/mysite_shop/current/public ErrorLog /var/log/prod.log </Location> </VirtualHost> What I want to do is go to mysite.com/shop, and point it to another application. Is this possible? Is there another method of doing this? I get an error because apparently Location directives do not accept DocumentRoot. Thanks.

    Read the article

  • Problem using js jquery helper

    - by Josh R
    hi, I am using cakephp 1.3.6 and am trying to use inbuilt js helper. I have added var $helpers = array('Js' => array('Jquery')); in my controller. In my layout, I have included the jquery files and have also included echo $this->Js->writeBuffer(); before the </body> tag. I checked if the jquery libraries correctly but trying to create a simple accordian from the jqueryui.com, it works fine. But when I try <?php $this->Js->get('#element'); $this->Js->drag(array( 'container' => '#content', 'start' => 'onStart', 'drag' => 'onDrag', 'stop' => 'onStop', 'snapGrid' => array(10, 10), 'wrapCallbacks' => false )); ?> <div="element">something</div> It does not work. I appreciate any help. Thanks.

    Read the article

  • Loading .sql files from within PHP

    - by Josh Smeaton
    I'm creating an installation script for an application that I'm developing and need to create databases dynamically from within PHP. I've got it to create the database but now I need to load in several .sql files. I had planned to open the file and mysql_query it a line at a time - until I looked at the schema files and realised they aren't just one query per line. So, please.. how do I load an sql file from within PHP? (as phpMyAdmin does with it's import command).

    Read the article

  • Replacing all GUIDs in a file with new GUIDs from the command line

    - by Josh Petrie
    I have a file containing a large number of occurrences of the string Guid="GUID HERE" (where GUID HERE is a unique GUID at each occurrence) and I want to replace every existing GUID with a new unique GUID. This is on a Windows development machine, so I can generate unique GUIDs with uuidgen.exe (which produces a GUID on stdout every time it is run). I have sed and such available (but no awk oddly enough). I am basically trying to figure out if it is possible (and if so, how) to use the output of a command-line program as the replacement text in a sed substitution expression so that I can make this replacement with a minimum of effort on my part. I don't need to use sed -- if there's another way to do it, such as some crazy vim-fu or some other program, that would work as well -- but I'd prefer solutions that utilize a minimal set of *nix programs since I'm not really on *nix machines. To be clear, if I have a file like this: etc etc Guid="A" etc etc Guid="B" I would like it to become this: etc etc Guid="C" etc etc Guid="D" where A, B, C, D are actual GUIDs, of course. (for example, I have seen xargs used for things similar to this, but it's not available on the machines I need this to run on, either. I could install it if it's really the only way, although I'd rather not)

    Read the article

  • Fluent Nhibernate - Mapping child in parent when Child has reference to parent and not using a list

    - by Josh
    I have a child object in the database that looks like this: CREATE TABLE Child ( ChildId uniqueidentifier not null, ParentId uniqueidentifier not null ) An then I have a parent like so. CREATE TABLE Parent ( ParentId uniqueidentifier not null ) Now, the problem is that in my Parent class, I have public virtual Child Child { get; set; } I've tried references, hasone, referencesany and can't seem to get the mapping right. Anyone have any ideas? Thanks,

    Read the article

  • GORM "getNextException" equivalent

    - by Josh K
    GORM sits on top of [Hibernate](http://en.wikipedia.org/wiki/Hibernate_(Java). The issue is that sometimes Hibernate will throw exceptions from the JDBC driver that I can't figure out how to investigate. Specifically: Could not execute JDBC batch update; /* snip */ Caused by: java.sql.BatchUpdateException: /* snip */ [insert] was aborted. Call getNextException to see the cause. If it makes any difference I'm using PostgreSQL.

    Read the article

  • JumpLists Not Working in C# App

    - by Josh M.
    Hi, I'm trying to use the Recent and Frequent JumpLists in my C# app. I'm using the Windows API Codepack v1.1 (http://code.msdn.microsoft.com/WindowsAPICodePack). I initialize the JumpLists every time the app starts and I AddRecent() to the JumpList every time I open a project in the app. Something is missing becuase the JumpLists are simply not showing up when you right click the app's icon in the Taskbar. I got one file to show up once but that's it! Initialization: private void InitializeJumpLists() { if (TaskbarManager.IsPlatformSupported) { JumpList recentJumpList = null; JumpList frequentJumpList = null; TaskbarManager.Instance.ApplicationId = Application.ProductName; recentJumpList = JumpList.CreateJumpList(); recentJumpList.KnownCategoryToDisplay = JumpListKnownCategoryType.Recent; recentJumpList.Refresh(); frequentJumpList = JumpList.CreateJumpList(); frequentJumpList.KnownCategoryToDisplay = JumpListKnownCategoryType.Frequent; frequentJumpList.Refresh(); } } Opening the Project: private void OpenProject(string path, bool isFromRecentFilesList) { DialogResult result = ConfirmProjectClosing(); if (result == DialogResult.Yes) Save(); else if (result == DialogResult.Cancel) return; using (new Wait()) { //Code here opens the project, etc. //Try to add the file to the Jump List. if (TaskbarManager.IsPlatformSupported) JumpList.AddToRecent(path); //Code here finished up. } } What am I missing?

    Read the article

  • Hibernate criteria with projection not performing query for @OneToMany mapping

    - by Josh
    I have a domain object, Expense, that has a field called initialFields. It's annotated as so: @OneToMany(fetch = FetchType.EAGER, cascade = { CascadeType.ALL }, orphanRemoval = true) @JoinTable(blah blah) private final List<Field> initialFields; Now I'm trying to use Projections in order to only pull certain fields for performance reasons, but when doing so the initialFields field is always null. It's the only OneToMany field and the only field I am trying to retrieve with the projection that is behaving this way. If I use a regular HQL query initialFields is populated appropriately, but of course I can't limit the fields. Anyone ever seen anything like this?

    Read the article

  • Set Renderbuffer Width and Height (Open GL ES)

    - by Josh Elsasser
    I'm currently experiencing an issue with an Open GL ES renderbuffer where the backing and width are are both set to 15. Is there any way to set them to the width of 320 and 480? My project is built up on Apple's EAGLView class and ES1Renderer, but I've moved it from the app delegate to a controller. I also moved the CADisplayLink outside of it (I update my game logic with the timestamp from this) Any help would be greatly appreciated. I add the glview to the window as follows: CGRect applicationFrame = [[UIScreen mainScreen] applicationFrame]; [window addSubview:gameController.glview]; [window makeKeyAndVisible]; I synthesize the controller and the glview within it. The EAGLView and Renderer are otherwise unmodified. Renderer Initialization: // Get the layer CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; eaglLayer.opaque = TRUE; eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; renderer = [[ES1Renderer alloc] init]; Render "resize from layer" Method - (BOOL)resizeFromLayer:(CAEAGLLayer *)layer { // Allocate color buffer backing based on the current layer size glBindRenderbufferOES(GL_RENDERBUFFER_OES, colorRenderbuffer); [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:layer]; glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); NSLog(@"Backing Width:%i and Height: %i", backingWidth, backingHeight); if (glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) { NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES)); return NO; } return YES; }

    Read the article

  • How to read a (SharePoint) custom web part property before the page loads?

    - by Josh
    I have a custom web part in SharePoint that has one property. Here is it: // Specify report path private string _report_path = string.Empty; [WebBrowsable(true), Personalizable(true), WebDisplayName("Enter Path"), WebDescription("Embeds an OBIEE Report in the portal"), SPWebCategoryName("Report")] public string ReportPath { get { return _report_path; } set { _report_path = value; } } The problem is that, I have to refresh the page manually a second time for the property to get set. Apparently, I need to put the method inside a PreRender event. Does anyone know how I can do this? Thanks.

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >