Search Results

Search found 4763 results on 191 pages for 'adams john'.

Page 94/191 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • How would one use Cocos2d to create a game like this.

    - by John Stewart
    http://itunes.apple.com/us/app/angry-birds/id343200656?mt=8&ign-mpt=uo%3D6 So I am getting started with this all game dev thing on iphone and I decided that I will start playing with Cocos2d as my starting engine. Now just so i have a goal in mind, I picked angry birds as my initial target of what sort of game play would I like to learn to build. This is not going to be a market release game. This is totally going to be learning purposes only. So to start off my question is: Would something like this be achievable using Cocos2d? How would I go about building the physics for this? How can one do a screen scroll like the way they do in cocos2d? (any example code would be great) This is just to start off. If you have any particular questions please do add to this question.

    Read the article

  • Sending mail from Python using SMTP

    - by Eli Bendersky
    I'm using the following method to send mail from Python using SMTP. Is it the right method to use or are there gotchas I'm missing ? from smtplib import SMTP import datetime debuglevel = 0 smtp = SMTP() smtp.set_debuglevel(debuglevel) smtp.connect('YOUR.MAIL.SERVER', 26) smtp.login('USERNAME@DOMAIN', 'PASSWORD') from_addr = "John Doe <[email protected]>" to_addr = "[email protected]" subj = "hello" date = datetime.datetime.now().strftime( "%d/%m/%Y %H:%M" ) message_text = "Hello\nThis is a mail from your server\n\nBye\n" msg = "From: %s\nTo: %s\nSubject: %s\nDate: %s\n\n%s" % ( from_addr, to_addr, subj, date, message_text ) smtp.sendmail(from_addr, to_addr, msg) smtp.quit()

    Read the article

  • What do I need to do to make sure my app launches as Admin?

    - by John Gietzen
    I'm writing an app that allows you to script the buttons from a wiimote into actions on your PC. It currently supports all of the features of the main remote control, except for the speaker. Now, I'm running in to trouble when I run it on Vista with UAC turned on. Any time a UAC'd window has focus, my app fails to move the mouse successfully. For instance, when an installer is run, I have to navigate it with the keyboard. Will running the app as administrator solve my problem? (At one point in time, I was able to successfully move the mouse over a UAC-password-entry box) How do I build a manifest that will tell windows to "run as administrator"? How do I embed this manifest into my app, if I'm strongly naming my assembly? How do I sign my application with an Authenticode cert? EDIT: Ok, so after some more extensive research, I have found: http://msdn.microsoft.com/en-us/library/bb756929.aspx <requestedExecutionLevel level="asInvoker|highestAvailable|requireAdministrator" uiAccess="true|false"/> However, the article says: Applications with the uiAccess flag set to true must be Authenticode signed to start properly. In addition, the application must reside in a protected location in the file system. \Program Files\ and \windows\system32\ are currently the two allowable protected locations. I have edited the question to reflect the new developments.

    Read the article

  • Entity-attribute-value model using codeigniter / php

    - by John Stewart
    SO I am trying to create a way to structure my database to be able customize forms. I looked into EAV pattern and here is my db structure: Table form - form_id - form_name - form_added_on - form_modified_at Table: form_fields - field_id - form_id - field_type (TEXT, RADIO etc..) - field_default_value - field_required Table: form_data - data_id - field_id - form_id - field_value so now I can store any custom form into the database and if I want to get the values for an individual form I can simply join it by "form_id" .. the problem: I want to be able to search through all the forms for a specific field value. How can I do that with EAV model? Also, I thought about just storing the custom data as a serialized (JSON) object but then I am not sure how can I query that data. Please note that I am using Codeigniter with MYSQL. So if conversation can use Codeigniter libraries if needed.

    Read the article

  • How can you prevent an individual window being captured by Print-Screen?

    - by John
    I noticed a few times than when I print-screen while Media Player is running, the content is replaced with a grey rectangle. I've no idea if it's deliberate due to DRM, or some technical issue, but it struck me that being able to deliberately block screen-capture might be a useful feature in some scenarios. I am not looking to fix the problem, but replicate it! Is there some specific message each HWND gets for print-screen - does Windows do a special repaint or simply dump buffers to the clipboard? I guess I'd prefer to focus this on Win32 specifically, but as long as it's Windows-related then fine.

    Read the article

  • MySQL Select problems

    - by John Nuñez
    Table #1: qa_returns_items Table #2: qa_returns_residues I have a long time trying to get this Result: item_code - item_quantity 2 - 1 3 - 2 IF qa_returns_items.item_code = qa_returns_residues.item_code AND status_code = 11 THEN item_quantity = qa_returns_items.item_quantity - qa_returns_residues.item_quantity ELSEIF qa_returns_items.item_code = qa_returns_residues.item_code AND status_code = 12 THEN item_quantity = qa_returns_items.item_quantity + qa_returns_residues.item_quantity ELSE show diferendes END IF I tried this Query: select SubQueryAlias.item_code, total_ecuation, SubQueryAlias.item_unitprice, SubQueryAlias.item_unitprice * total_ecuation as item_subtotal, item_discount, (SubQueryAlias.item_unitprice * total_ecuation) - item_discount as item_total from ( select ri.item_code , case status_code when 11 then ri.item_quantity - rr.item_quantity when 12 then ri.item_quantity + rr.item_quantity end as total_ecuation , rr.item_unitprice , rr.item_quantity , rr.item_discount * rr.item_quantity as item_discount from qa_returns_residues rr left join qa_returns_items ri on ri.item_code = rr.item_code WHERE ri.returnlog_code = 1 ) as SubQueryAlias where total_ecuation > 0 GROUP BY (item_code); The query returns this result: item_code - item_quantity 1 - 2 2 - 2

    Read the article

  • Nservicebus serization issue of derived types

    - by Tiju John
    Hi Guys, for the context setting, I am exchanging messages between my nServiceBus client and nSerivceBus server. its is the namespace xyz.Messages and and a class, Message : IMessage I have more messages that are in the other dlls, like xyz.Messages.Domain1, xyz.Messages.Domain2, xyz.Messages.Domain3. and messages that derive form that base message, Message. I have the endpoints defined as like : at client <UnicastBusConfig> <MessageEndpointMappings> <add Messages="xyz.Messages" Endpoint="xyzServerQueue" /> <add Messages="xyz.Messages.Domain1" Endpoint="xyzServerQueue" /> <add Messages="xyz.Messages.Domain2" Endpoint="xyzServerQueue" /> </MessageEndpointMappings> </UnicastBusConfig> at Server <UnicastBusConfig> <MessageEndpointMappings> <add Messages="xyz.Messages" Endpoint="xyzClientQueue" /> <add Messages="xyz.Messages.Domain1" Endpoint="xyzClientQueue" /> <add Messages="xyz.Messages.Domain2" Endpoint="xyzClientQueue" /> </MessageEndpointMappings> </UnicastBusConfig> and the bus initialized as IBus serviceBus = Configure.With() .SpringBuilder() .XmlSerializer() .MsmqTransport() .UnicastBus() .LoadMessageHandlers() .CreateBus() .Start(); now when i try sending instance of Message type or any type derived types of Message, it successfully sends the message over and at the server, i get the proper type. eg. Message message= new Message(); Bus.Send(message); // works fine, transfers Message type message = new MessageDerived1(); Bus.Send(message); // works fine, transfers MessageDerived1 type message = new MessageDerived2(); Bus.Send(message); // works fine, transfers MessageDerived2 type My problem arises when any type, say MessageDerived1, contains a member variable of type Message, and when i assign it to a derived type, the type is not properly transferred over the wire. It transfers only as Message type, not the derived type. public class MessageDerived2 : Message { public Message message; } MessageDerived2 messageDerived2= new MessageDerived2(); messageDerived2.message = new MessageDerived1(); message = messageDerived2; Bus.Send(message); // incorrect behaviour, transfers MessageDerived2 correctly, but looses type of MessageDerived2.Message (it deserializes as Message type, instead of MessageDerived1) any help is strongly appreciated. Thanks TJ

    Read the article

  • Child sProc cannot reference a Local temp table created in parent sProc

    - by John Galt
    On our production SQL2000 instance, we have a database with hundreds of stored procedures, many of which use a technique of creating a #TEMP table "early" on in the code and then various inner stored procedures get EXECUTEd by this parent sProc. In SQL2000, the inner or "child" sProc have no problem INSERTing into #TEMP or SELECTing data from #TEMP. In short, I assume they can all refer to this #TEMP because they use the same connection. In testing with SQL2008, I find 2 manifestations of different behavior. First, at design time, the new "intellisense" feature is complaining in Management Studio EDIT of the child sProc that #TEMP is an "invalid object name". But worse is that at execution time, the invoked parent sProc fails inside the nested child sProc. Someone suggested that the solution is to change to ##TEMP which is apparently a global temporary table which can be referenced from different connections. That seems too drastic a proposal both from the amount of work to chase down all the problem spots as well as possible/probable nasty effects when these sProcs are invoked from web applications (i.e. multiuser issues). Is this indeed a change in behavior in SQL2005 or SQL2008 regarding #TEMP (local temp tables)? We skipped 2005 but I'd like to learn more precisely why this is occuring before I go off and try to hack out the needed fixes. Thanks.

    Read the article

  • Sorting a text file by date - Date looks like DD/MM/YYYY

    - by John N
    I am trying to sort the dates from the earliest to the latest. I was thinking about using the bufferedreader and do a try searching the first 2 characters of the string and then the 4th and 5th characters and finally the 7th and 8th characters, ignoring the slashes. The following is an example of the text file I have: 04/24/2010 - 2000.0 (Deposit) 09/05/2010 - 20.0 (Fees) 02/30/2007 - 600.0 (Deposit) 06/15/2009 - 200.0 (Fees) 08/23/2010 - 300.0 (Deposit) 06/05/2006 - 500.0 (Fees)

    Read the article

  • jquery fadeout, load, fadein

    - by John
    Hi, I am using JQuery and what I want to happen is. Div fades out using the fadeOut command. It then loads content from a url using the load command. Then once content loaded it fades back in using the fadeIn command. The code I have is: $("#myDiv").fadeOut().load('www.someurl.com').fadeIn() However this does not work. It kind of flashes then loads out then loads in. I think the problem is that the fading is happening before the load is complete. What should I do Thanks

    Read the article

  • Merging datasets with 2 different time variables in SAS

    - by John
    Hye Guys, for those regularly browsing this site sorry for already another question (however I did solve my last question myself!) I have another problem with merging datasets, it seems that accounting for time in datasets is a real pain in the ass. I succesfully managed to merge on months in my previous datasets, however it seems I have a final dataset which only has quarter as a time count variable. So where all my normal databases have month 1- xxx as an indicator of time, this database had quarter as an indicator of time. I still want to add the variables of this last database, let's call it TVOL, into my WORK database. Quick summary QUARTER: Quarter 0 = JAN1996-MAR1996 Month: Month 0 = JAN1996 Example: TVOL TVOL _ Ticker ____ Quarter 1500 _ AA ________ -1 52546 _ BB ________ 15 Example: WORK BETA _ Ticker ____ Month 1.52 _ AA ________ 2 1.54__ BB _______ 3 Example: Merged: BETA ______ TVOL __ Ticker ____ Month 1.52 _______ 500 ___ AA _______ 2 I now want to merge this 2 tables using following relationship if the month is in quarter 1, the data of quarter 0 has to be used, so if i have an observation i nWORK with date 2FEB1996 the TVOL of quarter -1 has to be put behind this observation. Something like IF month = quarter i use data quarter i-1. Also, as TVOL is measured quarterly and I have to put in monthly I have to take the average, so (TVOL/3) should be added as a variable. Thanks!

    Read the article

  • Why do switch statements continue after case

    - by John W.
    After evaluating a case in a switch statement in Java (and I am sure other languages) the following case's are also evaluated unless a control statement like break, or return is used. I understand this is probably an implementation detail, but what is/are the reasons for having this functionality happen? Thanks!

    Read the article

  • Numerating Comments

    - by John
    The code below prints out all comments for a given "submissionid" in chronological order. How could I numerate these comments? (In other words, how do I print out a "1." next to the oldest comment, a "2." next to the second-oldest comment, etc.?) $submission = mysql_real_escape_string($_GET['submission']); $submissionid = mysql_real_escape_string($_GET['submissionid']); $sqlStr = "SELECT comment.comment, comment.datecommented, login.username FROM comment LEFT JOIN login ON comment.loginid=login.loginid WHERE submissionid=$submissionid ORDER BY comment.datecommented ASC LIMIT 100"; $result = mysql_query($sqlStr); $arr = array(); echo "<table class=\"commentecho\">"; while ($row = mysql_fetch_array($result)) { echo '<tr>'; echo '<td class="commentname1">'.stripslashes($row["comment"]).'</td>'; echo '</tr>'; echo '<tr>'; echo '<td class="commentname2"><a href="http://www...com/sandbox/members/index.php?profile='.$row["username"].'">'.$row["username"].'</a>'.date('l, F j, Y &\nb\sp &\nb\sp g:i a &\nb\sp &\nb\sp \N\E\W &\nb\sp \Y\O\R\K &\nb\sp \T\I\M\E', strtotime($row["datecommented"])).'</td>'; echo '</tr>'; } echo "</table>"

    Read the article

  • Git ignore file for vb.net projects

    - by John C
    Placing a vb.net project under git control in windows (was previously under VSS - long sad story of repository corruption, etc). How should I set up the ignore file? The exclusions I'm thinking of using are: *.exe *.pdb *.manifest *.xml *.log (is git case sensitive on windows? Should I exclude *.Log as well?) *.scc (I gather these were left over from VSS - maybe I should delete them?) Is this a sensible list? Should I be excluding directories?

    Read the article

  • Bug in XCode debugger?

    - by John Smith
    I am working on an iPhone app which is using an external library for which I have the source. During debugging some of the objects are listed as 0x0 in the debugger but the app runs fine. Also, some of the objects addresses point to the wrong thing. These symbols are in the external library. The addresses are fine if I am tracing through a file actually in the external library. Does anyone have suggestions how to stop this behavior?

    Read the article

  • How to detect open database connection with Hibernate / JPA?

    - by John K
    I am learning JPA w/Hibernate using a Java SE 6 project. I'd simply like to be able to detect if the connection between Hibernate and my database (MS SQL Server) is open. For example, I'd like to be able to detect this, log it, and try reconnecting again in 60 seconds. This is what I thought would work but isOpen() doesn't appear to be what I want (always is true): EntityManagerFactory emf = Persistence.createEntityManagerFactory("rcc", props); if (emf != null && emf.isOpen()) { EntityManager em = emf.createEntityManager(); if (em == null || !emf.isOpen()) // error connecting to database else ... This seems to me to be a simple problem, but I cannot find an answer!

    Read the article

  • Help decoupling Crystal Report from CrystalReportViewer

    - by John at CashCommons
    I'm using Visual Studio 2005 with VB.NET. I have a number of Crystal Reports, each with their own associated dialog resource containing a CrystalReportViewer. The class definitions look like this: Imports System.Windows.Forms Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Public Class dlgForMyReport Private theReport As New myCrystalReport Public theItems As New List(Of MyItem) Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click Me.DialogResult = System.Windows.Forms.DialogResult.OK Me.Close() End Sub Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click Me.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.Close() End Sub Private Sub dlgForMyReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load theReport.SetDataSource(theItems) 'Do a bunch of stuff here to set data items in theReport Me.myCrystalReportViewer.ReportSource = theReport End Sub End Class I basically instantiate the dialog, set theItems to the list I want, and call ShowDialog. I now have a need to combine several of these reports into one report (possibly like this) but the code that loads up the fields in the report is in the dialog. How would I go about decoupling the report initialization from the dialog? Thanks!

    Read the article

  • Is there anyway to enable MultiSelect in the StyledTextCtrl

    - by John Baker
    I've noticed that the StyledTextControl (Scintilla basically) in wxWidgets has a great feature that allows multi-selections of text, just like TextMate. However wxRuby doesn't seem to have the function calls to support that feature. I'm wonder if there is a way to enable it or if there might be a way I could rewrite that wrapper to include that function. It seems strange that they would purposely omit that since they are seemingly pretty exhaustive on most functions calls. Any insight on this would be greatly appreciated. I'm trying to write an open source TextMate clone in Ruby and it's gonna be pretty hard without MultiSelect, I could probably hack something together but it'd be ugly. Thanks ahead of time.

    Read the article

  • How can I make a product showcase in Silverlight?

    - by John McClane
    I can place a couple of buttons in Silverlight, but I'm not that experienced with the Silverlight tools and capabilities. What do you think I should use to create something like this? The control would have to pull and ID from the database and according to that place an image asociated with the record. I need it to be animated with some crispy movement. How can I achieve this?

    Read the article

  • How to use DLL reference with an ActiveX <object> via JavaScript

    - by John Factorial
    My question: how can I set an ActiveX object's property via JavaScript to an enum value found in a non-ActiveX DLL? Problem description: I am instantiating an ActiveX object with the following object tag: <object classid="clsid:F338193D-2491-4D7B-80CE-03487041A278" id="VideoCapture1" width="500" height="500"></object> (This is the guid for the 3rd party ActiveX I'm using, "VisioForge_Video_Capture_4.VFVideoCapture4X") I have example C# code for using this ActiveX, which I am porting to JavaScript. Code like this works just fine: VideoCapture1.Debug_Mode = true; var devcount = VideoCapture1.Video_CaptureDevices_GetCount(); var devs = []; for (var i =0; i < devcount; ++i) { devs[devs.length] = VideoCapture1.Video_CaptureDevices_GetItem(i); } ... etc ... However, VideoCapture1 has some settings which refer to a DLL enum, like so (C# code): VideoCapture1.Mode = VisioForge_Video_Capture_4.TxVFMode.Mode_Video_Preview; I can see in Visual Web Developer that TxVFMode.Mode_Video_Preview is value 1 in the enum. However, the following JS does not appear to set the Mode properly: VideoCapture1.Mode = 1; Does anyone know how I can set VideoCapture1.Mode to the enum value found in the TxVFMode? PS: In Visual Web Developer, when I "Go to definition" on TxVFMode, I get the Guid for the enum. I thought I could create an with this Guid or instantiate a VisioForge_Video_Capture_4.TxVFMode in JS, but neither gives me a usable object.

    Read the article

  • Jena result in UTF-8 format

    - by john
    How can I get in Jena (Java language) result in UTF-8 format? My code: Query query= QueryFactory.create(queryString); QueryExecution qexec= QueryExecutionFactory.sparqlService("http://lod.openlinksw.com/sparql", queryString); ResultSet results = qexec.execSelect(); List<QuerySolution> list = ResultSetFormatter.toList(results); System.out.println(list.get(i).get("churchname"));

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >