Search Results

Search found 14 results on 1 pages for 'itamar marom'.

Page 1/1 | 1 

  • Handling PHP exceptions with JQuery

    - by Itamar Bar-Lev
    Hello, I'm using JQuery to call a PHP function that returns a JSON string upon success or throws some exceptions. Currently I'm calling jQuery.parseJSON() on the response and if it fails I assume the response contains an exception string. $.ajax({ type: "POST", url: "something.php", success: function(response){ try { var json = jQuery.parseJSON(response); } catch (e) { alert(response); return -1; } // ... do stuff with json } Can anyone suggest a more elegant way to catch the exception? Many thanks, Itamar

    Read the article

  • Why do meshes show up as bones in the Model class?

    - by Itamar Marom
    Right now I'm working on a 3D game and I've come across something very weird. When I created the model in Blender, I added an armature named "MyBone" to the stage and attached a cube ("MyCube") to it, so that when I move the armature, the cube moves with it. I exported this as an FBX and loaded it as a Model object. What I expected to see was: But what I got was this: I'm really confused. Why is the mesh I created showing up in the bone list? And what's Root Node? Here are the .blend and .fbx files: here or here. Thanks.

    Read the article

  • Exporting an animated FBX to XNA? (in 3DS Max)

    - by Itamar Marom
    I'm now working on an XNA 3D game, and I want to add animated models in it. I came across this example. I see there is one FBX file and a few texture files in the content project, and that in the code you can choose which "take" to play. In this code it is "Take_001". Please tell me: When I create and animate my own 3D model in 3DS Max (2012, since I was told it's only possible in this version), how can I define those takes? plus, are any configurations need to be made when exporting FBX from 3DS Max to XNA? Thank you.

    Read the article

  • Ubuntu 12.04 GUI doesn't load after Virtualbox crash

    - by Itamar Katz
    I have Ubuntu 12.04 64 bit installed as a virtual OS in Virtualbox (the host is windows 7). The Virtualbox data file is on a usb drive that lost connection to the PC while a session was running. Now when I try to start the Ubuntu virtual OS, I get a terminal login screen, but no GUI. When I try to login I get the message sh: 1: cannot create /var/run/motd.new: Directory nonexistent Any suggestions? Can I recover the system?

    Read the article

  • How do I delete a signature from an Excel document using Office automation

    - by Guy Marom
    Hello, I have a signed Excel workbook and I want to delete the signature from it. The problem is that when I try to delete the signature there's a prompt for confirming the deletion and I want the process to be fully automatic. Here's a code sample, the prompt appears when the last line executes: Dim source As String = "c:\temp\signed.xlsx" Dim app As New Application() app.Visible = True Dim book As Workbook = app.Workbooks.Open(source, UpdateLinks:=0) app.ShowToolTips = False Dim sig As Microsoft.Office.Core.Signature = book.Signatures.Item(1) sig.Delete() Thanks

    Read the article

  • Inspecting a Word mail merge data source programmatically

    - by Guy Marom
    I want to iterate over all rows of a MS-Word mail merge data source and extract the relevant data into an XML. I'm currently using this code: Imports Microsoft.Office.Interop Do objXW.WriteStartElement("Recipient") Dim objDataFields As Word.MailMergeDataFields = DataSource.DataFields For Each FieldIndex As Integer In mdictMergeFields.Keys strValue = objDataFields.Item(FieldIndex).Value If Not String.IsNullOrEmpty(strValue) Then strName = mdictMergeFields(FieldIndex) objXW.WriteElementString(strName, strValue) End If Next objXW.WriteEndElement() If DataSource.ActiveRecord = LastRecord Then Exit Do Else DataSource.ActiveRecord = Word.WdMailMergeActiveRecord.wdNextDataSourceRecord End If Loop And it turns out to be a little sluggish (About 1 second for each row). Is there any way to do it faster? My fantasy is finding a function like MailMergeDataSource.ToDatatable and then inspecting the datatable.

    Read the article

  • Double Inner Join generates unexpected error

    - by Itamar Marom
    In my database I have three tables: Users: UserID (Auto Numbering), UserName, UserPassword and a few other unimportant fields. PrivateMessages: MessageID (Auto Numbering), SenderID and a few other fields defining the message content. MessageStatus: MessageID, ReceiverID, MessageWasRead (Boolean) What I need is a query to which I input a user's id and I get all the private messages he has received. In addition, I also need to receive each message's sender UserName. For this I wrote the following query: SELECT Users.*, PrivateMessages.*, MessageStatus.* FROM PrivateMessages INNER JOIN Users ON PrivateMessages.SenderID = Users.UserID INNER JOIN MessageStatus ON PrivateMessages.MessageID = MessageStatus.MessageID WHERE MessageStatus.ReceiverID=[@userid]; But for some reason when I try saving it in my Access database, I get the following error (translated to English by me, since my office is in a different language): Syntax error (missing operator) at expression: "PrivateMessages.SenderID = Users.UserID INNER JOIN MessageStatus ON PrivateMessages.MessageID = MessageStatus.MessageI". Any ideas what could cause this? Thanks.

    Read the article

  • Using malloc/free in Objective-C object

    - by Itamar Katz
    I have a class AudioManager with a member of type AudioBufferList *. (This is a struct declared in the CoreAudio framework). Since AudioBufferList is not a NSObject, I cannot retain it, so I have to alloc/free it (correct me if I'm wrong). My question is, where is the 'right' place to free it? Currently I am doing it in the dealloc method of AudioManager. If I understand correctly, this method is invoked automatically once the release message is sent to the instance of AudioManager --- is that true? Is there any other recommended practice regarding using alloc/free on non-objects members of Objective-C objects? Edit: From Apples documentation: Subclasses must implement their own versions of dealloc to allow the release of any additional memory consumed by the object—such as dynamically allocated storage for data or object instance variables owned by the deallocated object. After performing the class-specific deallocation, the subclass method should incorporate superclass versions of dealloc through a message to super: Which makes things a little bit clearer - but more insights are appreciated.

    Read the article

  • Get the selected option id with jQuery

    - by Itamar Bar-Lev
    Hi, I'm trying to use jQuery to make an ajax request based on a selected option. Is there a simple way to retrieve the selected option id (e.g. "id2") using jQuery? <select id="my_select"> <option value="o1" id="id1">Option1</option> <option value="o2" id="id2">Option2</option> </select> $("#my_select").change(function() { //do something with the id of the selected option });

    Read the article

  • regex to format a float in php

    - by Itamar Bar-Lev
    I have a PHP function for formatting a float to a given amount of decimal points that uses number_format(), and then removes the unneeded zeros (and also the '.' if possible): $float = number_format($float, $decimalPlaces, '.', ''); for ($i = 0; $i < $decimalPlaces; $i++) { if (substr($float, strlen($float) - 1, strlen($float)) == '0') { $float = substr($float, 0, strlen($float) - 1); } } if (substr($float, strlen($float) - 1, strlen($float)) == '.') { $float = substr($float, 0, strlen($float) - 1); } Is it possible to do so more effectively with a regular expression?

    Read the article

  • Simulating a cookie-enabled browser in PHP

    - by Itamar Benzaken
    How can I open a web-page and receive its cookies using PHP? The motivation: I am trying to use feed43 to create an RSS feed from the non-RSS-enabled HighLearn website (remote learning website). I found the web-page that contains the feed contents I need to parse, however, it requires to login first. Luckily, logging in can be done via a GET request so it's as easy as fopen()ing "http://highlearn.website/login_page.asp?userID=foo&password=bar" for example. But I still need to get the cookies generated when I logged in, pass the cookies to the real client (using setcookie() maybe?) and then redirect.

    Read the article

  • Reading large excel file with PHP

    - by Itamar Bar-Lev
    I'm trying to read a 17MB excel file (2003) with PHPExcel1.7.3c, but it crushes already while loading the file, after exceeding the 120 seconds limit I have. Is there another library that can do it more efficiently? I have no need in styling, I only need it to support UTF8. Thanks for your help

    Read the article

  • How can I suspend \ resume the video caputre operation in v4l2 ?

    - by Ita
    Hi, I use the v4l2 api for video capture and image applying image processing algo' on each frame. I wish to be able to suspend the video capture. I see that there are 2 options for ioctling (new verb, its gonna catch) the stream. VIDIOC_STREAMON, VIDIOC_STREAMOFF will start and stop the stream. Is there a way to suspend \ resume it? Is this even necessary, or can I just use the start and stop controls with no extra processing time spent on creating the stream all over again ? Thank you for your time, Itamar

    Read the article

1