Posts

C++ memory layout of static vs function static vs member function static -

Considering 3 different stable arrays in the CPP file: Fixed four array 0 [ Is it clearly defined that 3 arrays will be compatible with one another relative memory, and in what order? (Or it depends on the compiler / platform) Array is always moderate in memory, but it Not defined where they will end up relative to each other.

jquery - How to get nth-child number of a element -

I do not need the .index () value. For example. When I have a list: & lt; Ul & gt; & Lt; Li class = "alpha" & gt; & Lt; / li & gt; & Lt; Li class = "alpha" & gt; & Lt; / li & gt; & Lt; Li class = "alpha" & gt; & Lt; / li & gt; & Lt; li class = "beta" & gt; & Lt; / li & gt; & Lt; li class = "alpha" & gt; & Lt; / li & gt; & Lt; Li class = "beta" & gt; & Lt; / li & gt; & Lt; li class = "beta" & gt; & Lt; / li & gt; & Lt; li class = "alpha" & gt; & Lt; / li & gt; & Lt; li class = "beta" & gt; & Lt; / li & gt; & Lt; li class = "beta" & gt; & Lt; / li & gt; & Lt; / Ul & gt; I need to get the order number of each class, and the index count is to ignore the second class in the list, so I need something that s...

javascript - Jquery Jqui Modal Window: opening same modal multiple times -

I am working on a JavaScript function which opens a jquery modal window and populates the model for an Ajax call. It makes me add the 'left' and 'right' divi id - clicking on one and changing the contents of the modal window (scrolling through the photo slideshow). Everything works great except for one task: if I switch the modal and then turn it off, because of opening this second time, the reason for these 'left / right' buttons to calculate each click twice (Once click on 'right', but move two images up). If I close the window and open it again, the count again increases by 1 (3 changes for 1 click) The only solution to decide is to reload the page when the modal window is closed - but is anyone aware of a better solution? Actually, I want to 'reset' the modal window, but I do not want to delete it - I want to be able to open / close the model several times and this right / left button works. function getNextImage (direction) {if ...

ios - How show the Path inside a UIImageView? -

I use this command to get an image path in the iOS library: UIImage * viewImage = your UIIMAGE // --- was created from my reference reference: ALAssetsLibrary * library = [[Elsace Library Alloc] init]; // Image to be saved in the camera roll [Library Written Images Photo Photo Album: [Visitor CGImage] Orientation: (Elastic Orientation) [Visual Image Orientation] Period: ^ (NS URL * Asset URL, NSER * Error) {if (error) {NSLog (@ "error"); } Other {nslog (@ "url% @", assetURL); }}]; I get this code in the subject: I get some exams and the console log gives me a mail message: url Property-Library: //asset/asset.JPG? Id = 408C8B00-23DC-4DCF-9837-C294720940F9 and ext = JPG Now I want to select it and put it inside a UIImageView, I try this: imageView.image = @ "Property-Library: //asset/asset.JPG? Id = 408C8B00-23DC-4DCF-9837-C294720940F9 & ext = JPG"; But does not work, can someone help me? you imageNamed: or imageWithCont...

php - adding two times(time() + seconds) -

I want to add X seconds to the present time So it should be Current_time () + $ x and dd-mm-YYYY hh: mm: ss is formatted as to ? Better (and less), my method (suggested by): $ currentDate = date ('DMYH: I:' ', (time ()); $ Transfered date = date ('D-M-YH: I: S', (time (+ 5922725)); My answer: You get the mktime () function and date () Function Example: $ currentTime = mktime (date ("H"), date ("I"), to get you this work to be colleague Date ("s"), date ("m"), date ("d") + 1, date ("y")); $ ShiftedTime = mktime (date ("h"), date ("i"), date ("s"), + 5922725, date ("m"), date ("d") + 1, date (" )); // Change with Note that the mktime () function returns the UNIX timestamp as a result, so you convert the actual timelines to the actual date Date: ("M"), Date ("I"), Date ("S"), Date...

multithreading - How to pass values and get response from a Runnable Thread in Android with exit function? -

I have implemented a login form in Android, it was advised that I get data from the webservice for logon authentication Runnable threads should be used, as suggested by using runnable threads for the Android network function. I did the same, but there is a function that would be asked to execute the thread, if the login has been certified, then I should give the value to the thread eg. 1 and on that basis I will perform some functions to perform the next task. I have seen many solutions like applying a class and passing parameters, but none of them work for my requirement. I am writing down the steps to understand my problem further. 1- I want to pass two parameters for runline thread login accent function. 2- I want to get the return value from the thread function, in my main thread. 3- After the end of my child's thread, I want to call some other function of my original thread (main thread), because I want to do the next thing in it, like opening the profile screen. I h...

actionscript 3 - AS3 - Finding an objects x and y position relative to the stage -

I am new to action script 3 and I have a character that you can control, the stage scroll right platform But he can fire the missiles. The problem I am facing is the missile created through these co-orders: bullet.x = hero.mc.x; bullet.y = hero.mc.y On the screen until it's okay, it has been properly scrolled. I agree because these tablets are not using Canvas X, Y and using phase X, Y, so I am thinking about how to know X and Y of your hero in relation to the canvas. Can be born! Thank you, and if you need more information then let me know, I'm new to all this. Thank you You can do this with you. Your solution would be: bulletPos = bullet.parent.localToGlobal (new point (bullet.x, bullet.y)); Be careful, however, because these are the last resort, generally, you will have all the elements using the same 'layer', so the comparison is easy and fast.