Posts

c++ - Is it safe to use a weak_ptr in a std::set or key of std::map -

std :: weak_ptr और std: के बारे में आज कई प्रश्न हुए हैं : owner_less और साहचर्य कंटेनरों std :: set और std :: map में उनका उपयोग करें। इसमें कई पद हैं जो एक weak_ptr का उपयोग करके एक std :: set में गलत है, क्योंकि अगर कमजोर संकेतक की समय सीमा समाप्त हो जाती है, तो यह अनिर्धारित व्यवहार होगा। क्या यह सही है? एक कारण std :: owner_less मौजूद है इस आदेश को प्रदान करने के लिए, और कमजोर संकेतक समाप्त होने की उपस्थिति में इसकी सुरक्षा की गारंटी। मेरा तर्क है सबसे पहले, std :: owner_less ऑपरेटर () की परिभाषा एक सख्त कमजोर आदेश को परिभाषित करता है जैसा कि 25.4 में परिभाषित तुल्यता संबंध के तहत ऑपरेटर () , ! ऑपरेटर () (ए, बी) & amp; amp; ! ऑपरेटर () (बी, ए) , दो shared_ptr या कमजोर_पीटी उदाहरण समतुल्य हैं यदि और अगर वे स्वामित्व साझा करते हैं या दोनों खाली हैं। दो मामलों हैं वे एक ही वस्तु साझा करते हैं, जो व्यावहारिक दृष्टि से मतलब है कि वे एक ही संदर्भ गणना वस्तु साझा करते हैं। / Li> ये दोनों खाली हैं। अब, मुझे विश्वास है कि भ्रम की स...

ios7 - Automatic phone dialing application for iPhone -

I am trying to develop an application that dials phone numbers from the iPhone at regular intervals without user contact Can do. The problem occurs when the phone dialer app comes in the foreground, then my app goes into the background. I tried to use the web view to call the phone number but this number indicates the user before calling the number. Or, what is the way to dial a number from a webview without prompting the user? Or there is no other job to bring my application to the foreground after the call is over. My app is going to the app store, so there is no private API problem. EDIT: I tried to use Telepropton: // But I do not need any user interaction. I can not even break the prison As IOS7 you can not make phone calls from regular iOS apps This means that I want to call CTCallDial to dial the phone code without the user's permission. Background / Foreground Your app will run on the background and you can not do anything about it if you want to run your ap...

ruby on rails - 20 questions quiz game app problems? -

I am trying to write a twenty-question app for school, and I have tied a speed. On line 26, I'm getting the error: 20q2.rb: 26: Warning: String Verbatim Status . Besides, I have a scoring system to tell the user what their final score is and it prints the score after every question when it is displayed at the end of the quiz. The code works otherwise, so if someone can help me two problems which I am doing will be great Here is the code: #quotions quesions in a row QANDA = [["Sky is blue?", "Y"], ["Is it dark" Is this a yes or no question? "," Y "], ["Is this a small answer question", "n"], ["Is this program written in rail? "," N "], [" Is this program written in Ruby? "," Y "]] # create a variable for the scoring system # num = 0 # Create a loop to ask questions automatically. #spaces for user input puts" y or n "ans = gets. Chomp ansdown = ans.downca...

android - What is position of Scene, Velocity property in PhysicsHandler? -

Image
I'm starting Android programming with the endengine framework. And I learn with tutorials on the internet. I do not know that I am wrong about the wrong position about the property of scans and velocity in PhysicsHandler. here: And if I The opinion is true. Thus, how to set the velocity property of physics handler to follow the status of the scene? This is my example: and my code: scene.setOnSceneTouchListener (new IOnSceneTouchListener () {@Override public boolean onSceneTouchEvent (visual pScene, TouchEvent pSceneTouchEvent) {if (pSceneTouchEvent.getAction () == TouchEvent.ACTION_UP) { PositionUpX = pSceneTouchEvent.getX (); positionUpY = pSceneTouchEvent.getY (); ball = new ball (status download x, positiondoni, position opxx, positioning event, mfaetector project, getVertexBufferObjectManager ()) ;attach child (ball); return if; Pscnt t Cavt. Gate action () == Tcavent. Akshn_ DOWN) {positionDownX = pSceneTouchEvent.getX (); Sthitidaunwai = pSceneTouchEvent.getY...

is there any concept like FrameLayout (Android) in java Swing? -

Image
I'm new to the Java swing framework and for many years I've been working with Android . So, naturally I am related to the layout of Android with the swing layout of Java I need something like FrameLayout in Android. FrameLayout works as Android; FrameLayout is designed to block an area on the screen to display an item. You & gt; Multiple children can be added to a frame layout, but all children are & gt; At the top left of the screen the children are drawn in a heap, with the most recently added child. The size of the frame is the size of its largest child (plus padding), which is visible or not (if parent permit of Frameleout). Is there a layout or an implementation that works the same way? I need to implement the following UI; There is a container , which is JetBirdPane . I have applied this partially, I am unable to apply the deep bar behind the tab. I think enter the image details here"> You can use frameless jdesktoppane ins...

javascript - Stream Images using a local server -

I want to stream images (server's print screen) using a local server (Apache). For one example, I will go to the website using a machine on the same network and then this web site will show a set of images at the speed of 30 fps (then I will see it as a video). Image quality should be good Currently, I can go to this website using a machine connected to the local network. But I can not understand a way to stream images and I have no knowledge of PHP. Is it possible ?? Can someone tell me in the right direction ... thanks Ffmpeg can help in making videos with images It is a CLI binary that can work. Ref:

Emacs projectile with multiple repos (git/svn etc.) in one project -

I have a single git repo with a directory structure that looks like this: Root ---------- src | | | ------ 3 Route is my working directory; 3rd contains multiple third-party git submodules. Finds files in Provincial-search-file only src , it does not work for submodules. Provincial-GIT-Command code> git ls-files So I resolved the problem with the following code: (setq projectile-git-command "git -ls-all-files ") git-ls-all-files is a shell script: \ # ! / bin / zsh files = `git ls-files -co --exclude-standard` sb_files = 'GIT - no-pager subpload --quote foreach' git ls-files --full-name -co --exclude-standard | Sed s! ^! $ Path /! '`All_files = $ files $ sb_files $ all_files resonate