Posts

Showing posts from January, 2011

objective c - NSArrayController and the exception "CoreData could not fulfill a fault" -

I have a list of items, examples of the item class saved in the core data model. This item is shown using an NSArrayController and cocoa binding in NSTableView . It works all too well. However, when I extract some items using these instructions: extract items selected for item (item * self.itemsArrayController.selectedObjects In item) {[self. Managed object contact deleted object: item]; } NSError * Error = Zero; If (! [Managed Object Contact Contact: & amp; Error]) [[NSAPCirmation Shared Application] Current Error: Error]; } After some time , I get an exception CoreData could not complete a mistake . All the documents I read that I found (including), but I did not find anything useful. I am using the new ARC (automated reference count), so I'm pretty sure I am not trying to save the managed object reference after the managed object that was deleted. UPDATE: My app is a single thread, so I'm not trying to reach them managed object contacts with ...

asp.net mvc 3 - MVC3 Routing Not Found -

कोई भी विचार क्यों यह लिंक नहीं मिला? context.MapRoute (null, " Admin / CompanyUserDelete / {userprofileid} ", नया {नियंत्रक =" व्यवस्थापक ", कार्रवाई =" कंपनी उपयोगकर्ता हटाएं ", userprofileid = UrlParameter.Optional}); यह क्षेत्रीय पंजीकरण वर्ग का उपयोग कर definded है। सार्वजनिक वर्ग व्यवस्थापकअरेरा पंजीकरण: क्षेत्र पंजीकरण {सार्वजनिक ओवरराइड स्ट्रिंग क्षेत्रनाम {{वापसी "व्यवस्थापक" प्राप्त करें; }} सार्वजनिक ओवरराइड रिक्वेस्ट रजिस्टर एरेआ (एरियाराजिस्ट्रेशन कॉन्टैक्ट संदर्भ) {context.MapRoute (नल, "एडमिन", नया {नियंत्रक = "एडमिन", एक्शन = "इंडेक्स"}); Context.MapRoute (रिक्त, "व्यवस्थापक / उपयोगकर्ता", नया {नियंत्रक = "व्यवस्थापक", कार्रवाई = "कंपनी उपयोगकर्ता"}); Context.MapRoute (रिक्त, "व्यवस्थापक / उपयोगकर्ता / बनाएं", नया {नियंत्रक = "व्यवस्थापक", कार्रवाई = "CreateUser"}); Context.MapRoute (रिक्त, "व्यवस्थापक / उपयोगकर्ता / {userpr...

c# - Using MVC3 is there a better way of removing previous routing values and also stopping them being used as a query string? -

When using a current URL, I have the following to find a way to prevent MVC3 from reusing existing root values : "index", id = "no ", Id2 =" no "}); Routes.MapRoute (" justID "," {controller} / {action} / {id} / {id2} ", new {controller =" home ", action =" index "} ); Routes.MapRoute ("idAndId2", "{controller} / {action} / {id}", new {controller = "home", action = "index"}); And My index index.cshtml @ html.ActionLink (index with "id = 10", "index", new {id = 10}, zero); @html.exelink ("id 2 = 11 index with "," index ", new {id = 0, id2 = 11}, blank); @html.exe link (" index "," index ", new {id =" no ", id2 = "No"}, blank); // Removes the "/" URL with the existing root values ​​ My problem is that it's a dirty way of doing and I'm sure Is that there is a better wa...

c# - Is it possible to disallow or 'hide' methods to stop the development team using them? -

I work in a team of 20+ developers in which a new member of a recent flood includes our coding standards That the first () extension method for IEnumerable should never be used, and instead we should always use FirstOurfault () and check an empty return. I appreciate it that some members discuss the training, apply coding standards, or to implement the unit tests to take such crimes, but in theory it is possible that a compilation Try to throw the error of time? The best part is that you can compile time according to the help: Your ONW extension is the "first" method, which does nothing but throw an exception. Mark that method as "obsolet" so you can get a compilation-time warning. I think you can do the best. (Some comments express concern about namespace ... you will use the same name space as Microsoft does [System.Linq] so that the compiler sees both.

How to use SVG for custom node shapes in graphviz? -

I'm trying to use ( dot command line tool, to be more specific) To define node shapes to generate a SVG layout of a graph, I would like to use self-generated SVG files, and I followed its instructions. I am outputting to SVG, in theory, the shapes are & lt; Symbol & gt; s and & lt; Use & gt; It should be easy to do this by putting them in shapes as . I believe the functionality was implemented, and I still do not understand how to use it. I tried the image attribute of a node pointing to a custom size SVG file. I tried to set the size to custom of the node and indicated the size in the file size in SVG. Dot complains that I have an invalid filename, and its plugin graph has suggested that it can read SVG, I'm guessing that I am either using the wrong attributes , Or there is something wrong with SVG files which I have tried. Whatever it is worth, I have the view box & lt; Svg & gt; Set to attribute Graphwiz only supports S...

.net - With Winforms, how do I make a graphics pane that can be dragged, zoomed/unzoomed, and items inside selected? -

I am using C # and .NET 3.5 to create Winforms applications. I need a pane that displays a tree of connected geometrical objects. I want to be able to click-drag to move around the scene, use the mouse wheel to zoom in and Click to exclude and click to select item. I can see that this code would be possible for everyone using a picture box and event processing and a bunch of maths. I am not against doing this but if there is a solution already available for this (or any recommendation about better control for the job), then I will not have to face all the hassle of writing this GUI content. I mentioned this in a comment earlier, but possibly best to create custom user controls The solution is You can handle special events that you want to handle (mousedown, mouse, mouse, keyboard events, etc.). Create a picture and set it as a background for control, then you can add control (or many controls!) To your form for your purpose.

tortoisesvn - Svn and disconnected edits -

I am using svn (VisualSVN Server with VisualSVN in particular and thus TortoiseSVN). Is it possible to work in offline scenario? Like code has been examined, and then modify the solution without checking the related file? What (if anything) will go wrong? No, SVN access to a centralized server is required for you to transmit offline on the server Can live Distribute edition control systems like you, or they allow you to work offline as if you are connected, and then eventually reconnect your changes at a time when you are connected.

c# - Flocking and surrounding instead of moving away? -

Is there any instance of a herd where the herd manifests feeds like targets instead of fish and makes a target, Fly away? I am working on an upper shooter and I want to push the enemies packets to suppress the enemies and attack against the files around it. I am trying to avoid all those places that are in one place and look right when coming, but in the examples of "targeting the target", they have to move on to the goal, then proceed immediately. Thoughts? As I think, the weighted average of generic flocking is generated by: An alignment vector, which is the average of the alignment vectors of those around you A separation vector, which is a vector that moves away from people around you A coherent vector, which is a vector pointing to the local group center In relation to calculating these Vectors When ways and behave differently because they are given different weights. There are also different ways to combine weighted-average vector, combined with th...

Multiple WPF popups in app -

I am developing a WPF app and I have a problem with popups. I understand the issue that a popup Zindex is more than everything. The problem I am facing in my app can be such situations that more than one popup is open at a time. When this happens, the last popup that opens is always above the other. I really want to work, whatever popup is clicked is finally on top. I have a thumb on the popup, so pull it Can be taken and I have a behavior to control dragging. I have seen that I can call popup.isopen = false and then popup.isopen = thumb_drag shows the correct and click popup in the event, but when the popup is closed and opening it produces an undesirable flash I think of the reflector Have dug through and have tried many things (coecevalue on IsOpenProperty, invalid visual, etc.) and have any luck, is anyone having the same problem and capable of fixing it? Thanks Maybe it can help? This is a popup which is not the top, it is sure that it will work in your scenario, but it...

mysql - php submit with PDO SQL issue -

I wanted to change the PDO from the normal mysql query but since then I can not track the error back too. Is there anyone to help me out there? Any sign will be appreciated! Question 1: What's wrong? Question 2: How can the mistake be tracked in general? & lt ;? Php // If you activate the activate button, start it (isset ($ _ POST ['create'])) {$ new = htmlspecialchars ($ _ post ['newgroup']); $ Sql ​​= "Include in contact groups (status, gr_name) value (1,: new)"; $ Sql- & gt; Bindview (': new', $ new); $ Sql- & gt; Executed (); $ Arr = $ sql-> errorInfo (); Counter $ arr; Echo "& lt; meta http-equiv = \" refresh \ "content = \" 0; URL = groups.php \ "& gt;"; }? & Gt; & Lt; Form id = "group-in" method = "post" action = "groups.php" & gt; Add new distribution group: & lt; Input type = "text" name = "newgroup" placeholder...

CSS Padding/Border Question -

This is driving me crazy, someone can tell me what I'm missing. I have a word press site, I'm trying to make the design copy in the skin of an e-commerce wordpress site: and the e-commerce skin I am working on. The word's main page is slightly different from the wordpress site's e-commerce skin and I can not understand it. Someone can help me, where is the problem and CSS may need to be changed. I am looking for this for hours. It looks like background padding or height or something else on the upper and lower level on the WordPress site, but it is not certain how it is controlled. It seems that there is quite a difference in code. Have you tried inspecting page elements for differences for forex or webkit developer tools? After seeing instantly, I can see that your missing element and other stuff is going on.

Rails 3 - how to make own error handler -

Can someone help me, please, for example how to create your own error handle, for example, when I Trying to delete the item from the database that does not exist (delete the item with the id is not present)? I tried to search on Google, but I still do not have anything that works. I think you will never read it, but it can help others. You have 3 ways to manage it. You can catch the exception with the defense. But this is not the best way. You can check that your ID is present, you have some ways to do this. (For example calculation). But this is not the best way, because you have 2 questions. Or you can use find_by_id, it does not take exception, and when your object does not exist, then return zero. You only have to check about the result.

php - Jquery: How can I combine two json data objects and post them? -

After that, I have another problem - how do I add two Jason data objects? The first Jason object, {"file": {"name": "1024x768.jpg", "type": "image / jpeg", "tmp_name" : "C: \\ wamp \\ tmp \\ php2C2E.tmp", "Error": 0, "Size": 469159}} The second Jason object, {"title": "title", "content": "bla bla blah"} $ .post ("process.php", first + second, function (xml) {}); Then I can use this array in print_r ($ _ POST) in process.php : Array ([File] = & Gt; array ([name] => 1024x768.jpg [type] => image / jpeg [tmp_name] => C: \ wamp \ tmp \ phpA1.tmp [error] = & Gt; 0 [Size] = & gt; 469159) [Title] = & gt; Title [Content] => bla bla blah File is not an array, as you would see it on server side php code = class = "post-text" itemprop = "text"> Looking at it is a JSON object an...

HTML + CSS: take all available viewpoer -

I am trying to create a liquid HTML layout with html (taking all the available width and 130 px height), 2 columns (1: 300px width all possible height, 2: column 2 after all 300px and 15- 20px margins have been taken.) ATM I have received: HTML: CSS: html, body {padding: 0; Margin: 0; Height: 100%; Width: 100%; Minimum width: 1000px; Minimum height: 500px; } Body {font: 12px sans-serif; Background color: #fff; Color: # 000; }. Wiper {height: 100%; Width: 100%; Status: Relative; } .Header {Padding: 0 30px; Height: 100 pixels; Left: 0 pixels; Correct: 0 pixels; Status: Completed; Limit: 1px solid black; Border-top: none; } .content {position: absolute; Top: 120px; Left: 0; Correct: 0; Bottom: 0 pixels; Margin: 10px 20px; Limit: 1px solid black; } .left-column {float: left; Width: 300px; Limit: 1px solid black; } .right-column {margin-left: 315px; Limit: 1px solid black; } The question is: Is there a better solution? Thank you. I took your HTML and made this Bela fo...

python - Sanitizing inputs to MongoDB -

I am writing a relaxing interface in a MongoDB database program, and I am trying to implement the search functionality. I want to expose the entire Mongo DB interface. I have two questions, in fact, but they are related so I am putting them in one post: Is it safe to decode incredible JSON with Python JSON modules or is it a collision module , In which it can allow arbitrary code execution? Is that decoded JSON safe () function to find PyMongo? Using Python's Jasonson module with unreliable input should be safe, at least Less in its default configuration (i.e. you have not supplied any custom decoders, which however, we can not definitely say that json.loads () Results are safe to find of Pimongo () method while search () method m in dong It will be possible to update the Ta (not updating or removing) the deliberately poorly performing Queries, such as specially designed $ where clause to create very poor performance features: {"$ where": ...

jquery - MySQL, PHP, JavaScript UTF-8 Problem with swedish letters (Everything Tested - Nothing Works) -

OK, so I know that this has been discussed millions of times. And I have seen billions of attempts to solve the problem and in most cases they are but in my case, nothing still wants to work. I have all my files that are encoded with UTF-8 (no one remembers, many times are controlled) and I have my entire database, tables and everything that is encoded as utf8_general_ci (Tried without utf8_unicode_ci and utf8_bin of the result) but still I get "? -cube" everywhere instead of my Swedish characters? I have done some tests and have come to the conclusion that this is a jquery load and the post call is responsible for the problem. If I load my php-file "load-folders.php" then correct me ¥ ÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, One ?? One ?? But even though the main file is saved as "index.php" and when it calls jquery load ('load-folders.php') then utf8 is encrypted, so I still get faulty letters. Yes, jquery.js also have utf-8 so my stylesheet and every...

What are all the values that ColdFusion considers "falsy" and "truthy"? -

I am looking to compile a complete list of values ​​that understand ColdFusion FICCI and authenticity. The people I know are those: // false value false "false" 0 "no" // True truth is true "truth"! = 0 "yes" Is there anything I remember here? There is a clear little article on it But of course it's officially On In Boolean Expressions, true, noozo numbers, and strings "yes" ????, one, 1, one, is true? ??? Are equal; And false, 0, and strings' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' Are equal. The Boolean Assessment Case is not sensitive. For example, true, true and true are equal. Then, using your own vocabulary: // false value false "wrong" 0 "no" // truth truth true ...

android - For Loop on ArrayList Exception -

I apologize for the limited title, but I do not know how to describe this problem I have a loop Which repeats through an array list with an array. One object management is a boolean that is set at a different point in time. The point of the loop is to go through the array list and remove each item as incorrect as a boolean. if (! ArrayList.isEmpty ()) {int len ​​= arrayList.size}; (Int i = 0; i & lt; len; i ++) for {if array! }}} For loop always leaves more than one object in the array. This is because because of the items removed in the array for loop cycles every time the LAN drops down and can cancel the loop before removing the object on the last object. I understand this problem, but I do not know how to fix it I have tried to do something like LAN + 1, but when I do something for it, this one index throws an output bond exception. any idea? Besides, is the best way to do what I am trying to do? That you do not use methods that come after items you extracted. ...

flash - Rendering a "sprite" in Away3D (molehill) -

Image
Goes out, I should be able to present something like money, but get all the good from Molehill. / P> I was new to Ad 3D and Molehal, and I was wondering how difficult it would be to present a Sprite (plain I think) using an app 3D, if possible (if possible) Also like Flash with sprites, bitmaps, and so on. Thanks in advance! You should be able to whip something Away3D, but if it only requires 2D, So it may be worth looking at.

bnd plugin for OSGI not working in Eclipse -

I am using the Eclipse Indigo release I have downloaded the BD plugin (from) when I right-click on a bnd file. Trying to click and make 'make bundle'; I am receiving this ambiguous error message that says: "The selected operation is currently unavailable". If I see error in logs; I see a bunch of errors with the lines of class load failure: 'aqute.bnd.plugin.popup.scripts'. I'm stumped .. Anyone seen before ? I still have seen it. P> The same thing here I do not know any solution yet, but if I find someone I will be back. EDIT: Okay, okay, this is you The patient does not help but you know that someone else has got it, and now you know. I do it, and I was also looking for a solution. Edit # 2 : I made some progress.I saw the source in the Gitub.Gooling to find a project called "CNF" in the workspace which shows other people with problems with that CNF project when their project does not exist in the workspace directory. A. I also und...

C++ Compiler Issues -

निम्न दो हेडर फाइलों को देखते हुए: #ifndef EVENT_HANDLER_H #define EVENT_HANDLER_H #include & lt ; SFML / Window.hpp & gt; # शामिल करें & lt; एस एफ एम एल / विंडो / इवेंट। एचपी & gt; #include "window_handler.h" वर्ग EventHandler {सार्वजनिक: इवेंटहैंडलर (विंडोहाण्डलर और क्लास ओनर); विंडोहाण्डलर * एम_विंडोहैंडलर; निजी: bool m_leftKeyDown; बूल m_right किडाडाउन; Bool m_up केडीडाउन; Bool m_downKeyDown; अहस्ताक्षरित int m_mouseX; अहस्ताक्षरित int m_mouseY; }; #endif और #ifndef WINDOW_HANDLER_H #define WINDOW_HANDLER_H #include & lt; एसएफएमएल / सिस्टम। एचपी & gt; # शामिल करें & lt; एस एफ एम एल / विंडो.hpp & gt; #include "event_handler.h" वर्ग WindowHandler {सार्वजनिक: WindowHandler (); Sf :: विंडो m_app; निजी: इवेंटहान्डलर m_eventHandler; }; #endif मुझे निम्न आउटपुट मिलता है: खिड़की_हैंडलर से जुड़े फ़ाइल में: 6: 0, मुख्य सीपीपी से: 3: इवेंट_हैंडलर H: 13: 29: त्रुटि: अपेक्षित 'ए') ??? पहले और ???? टोकन event_handler....

assembly - Difference between `bx` and `bp`? -

विधानसभा में bx और bp के बीच क्या अंतर है? यहां उदाहरण: mov bx, 1h mov bp, 1h क्या वे उसी मेमोरी के संदर्भ में हैं? क्या ss और sp में x86 रजिस्टरों bx और bp पूरी तरह से असंबंधित हैं उनके बारे में एकमात्र आम बात शब्द आधार है। bx (आधार अनुक्रमणिका) एक सामान्य है बीपी (बेस पॉइंटर) दोबारा, ss और का उपयोग करके स्टैक में कुछ स्थान पर इंगित किया जाता है भी अलग हैं। ss (स्टैक सेगमेंट) एक सेगमेंट रजिस्टर (जैसे सीएस, डी एस और ईएस )। एसपी (स्टैक पॉइंटर) स्टैक के शीर्ष पर स्थित है

c++ - Why were concepts (generic programming) conceived when we already had classes and interfaces? -

: I understand that STL concepts were present, And it would be stupid to call "classes" or "interface", when in fact they only document human (human) concepts and can not be translated into C ++ code at that time, but when language is enhanced Opportunities are provided for concepts, why they only modify the capabilities of classes and / or introduced interfaces Do not be? Is not too similar to an interface (100% abstract class information)? Seeing this, I think that there is a lack of support for volunteers only in the interface, but maybe the Axioms can be presented in C ++'s interface (considering adopting a conceptual convergence in C ++) Has not got them? I think that the concepts of self can be easily added to such a C ++ interface (auto interface, comforter, any?). Is not a concept_map very similar to the ADAP pattern? If all the methods are inline, then the adapter is not necessarily present beyond time compilation; The compiler simply giv...

c# - Check if a string contains date or not -

Viewing a string "15:30:20" and "2011- 09-02 15:30:20 " , how do I dynamically check if the given string has a date or not? "15:30:20" - & gt; Not valid "2011-09-02 15:30:20" = & gt; Use the valid method. string [] Format = new string [] {"yyyy-MM-dd hH: mm: ss"}; String value = "2011-09-02 15:30:20"; Date time datetime; If (Datetime. TryParseExact (Value, Format, System Globalization. Culturan Infuriator, System Globalization. Datetime Timetimes, Presented Default, Date Time Out) Console. Videoline ("valid:" + datetime); Else Console.WriteLine ("Invalid");

tsql - SQL nolock and join -

I am using a process that consistently incorporates data into rows in two lines. At the same time I want to use some questions on these tables. As I said that it is done with the involvement (Rolalak) and I read the level of separation for questions and read nolok. When I use inquiries on a table, they work completely, but when I try, joining 2 tables I get this error: The transaction (process ID 88) was locked on lock resources with other resources and it has been selected as a deadlock victim. Run the transaction again. In the meantime, if I use the sp_lock process, I found that the key lock becomes a tab lock when I do my query Know that there is a special relationship between (nolok) and join it? And if there is, how can I avoid it? Update: in tbl1 with (rolllock) (col1, col2, col3) * select from #tbl_temp (It is in an infinite loop and the data from #tbl_temp always changes. Actually this is a more complex process, but it is an idea.) Select from * # ...

c# - Tag Cloud control for Silverlight -

I'm trying to create a silverlight application and want to display one. I think I'm going to data processing (word count), thanks for the answer, but I'm looking for a good control to display the actual tag cloud. I found what the sample image looks like is not a fan - it does not use space very efficiently. I also found, but I did not have much luck with the sample. I had to work hard to compile on my machine (I think it was made for Silverlight 2?) And then when it ran, it was not just an empty area with no tag. I could not find any of its live samples, so I have to leave the sample image. Does any good tag know about cloud control? With primarily one available source and a live demo, I can try it first. Edit: The control with Myles J looks okay but it is also not okay to use the space very efficiently when there is a mixture of large and small letters on one line So, something looks like: [small] [b] [another small] [i] [g] I like that Tag Clouds that...

asp.net - how to find the max id from a generic list -

I am getting a collection of data in the object of the list and I want to get the maximum id.` from this list > objinfo dim list (as AlbumInfo) = objPhotos.GetPhotos_Alb_ID (Me.ModuleId, hdd_AlbID.Value) dim as the string Photo_Image = "" dim string string = photos_isages & amp; Fu_Photo.PostedFile.FileName.Substring (fu_Photo.PostedFile.FileName.LastIndexOf () ".") If objinfo.Count & gt; = 1 then Photo_Image = Convert.ToString (hdd_AlbID.Value) + "_" + Convert.ToString (objinfo .emem ("0"). Photo_Id +1) Otherwise Photo_Image = Convert.ToString (hdd_AlbID.Value) + "_" + Convert.ToString ("1") end then Returns Convert.ToString (objinfo.Item ("0"). Photo_Id +1) The "0" id, but I want to get the ID of the last item. OK, you specified maximum in the title, and In the last question, here are both: Maximum: Photo_Image = hdd_AlbID.Value.ToString () & amp; "_" &...

android - onConfigurationChange() is not called -

I've found that in my app, change to configuration () is not a call. In the manifest, I enter: android: configChanges = "keyboardHidden" I want to change the configuration when the keyboard is hidden To call. Why is this not called? The method is not called when I force to hide the keyboard? This question has been asked many times, a common answer is: android: configChanges = "Orientation: KeyboardHind" instead of "AdWords": configChanges = "keyboardHidden"

google app engine - How to create multiple instances of an application in cloud -

I wanted to create more than one instance of my application in either Google Cloud or EC2. Can we make a virtual example by using ZOOKIPE Google App Engine instances automatically start, because your traffic increases. You can always have examples or backends on Instance. Just read the docs: Google App Engine is not enough to be used with Zookeper because the Java code is running in someone, so you can do it with Zucker Can not even talk Apart from this, you have to start and end the backend program to move you to a lot of work. For EC2, see:

Is it possible to make one PHP file to handle all requests coming to server public folder? -

If I have the site www.mysite.com and I have the folder Apache / HTODO as a public folder in my server I would like to assign all requests made to www.mysite.com to the index.php file. Is it possible or should I have folders if I want to show the URL as www.mysite.com/about/? And how can I use path information in PHP code? mod_rewrite . See for a full example. This should work for you.

java - BufferedReader.read() eating 100% of CPU -

Image
I have a Java server that uses 1 TPP per connection. (I know this is bad, but I still have to keep it this way). (3.2GHz 6cor x2 machine, 24GB RAM, Windows Server 2003 64 bit) and here's a piece of code: Public Zero Run (try {string {/ pic} Char charCur [] = New four [1]; While (_in.read (charCur, 0, 1)! = - 1 & amp; amp; server server.ring) {if (charCur [0]! = '\ U0000' & amp; amp; Amp; amp; amp; amp; amp; amp; amp; amp; four; Cur [0]! = '\ N' and & amp; charcoal [0]! = '\ R') {Packet + = Charchur [0]; } And if (! Packet.isEmpty ()) {parsePlayerPacket (packet); Packet = ""; }}} Hold (exception e) {e.printStackTrace (); } Finally {try} kickplayer (); } Hold (exception e) {e.printStackTrace ();}; Server.removeIp (_ip); After about 12 hours or more of server uptime (and linked to about 3,000 players) the server starts to eat 99% of all 12 CPUs, unless I manually reboot the Java Abrasson. Therefore the game starts and my players sta...

iphone - Facebook token not having "|" as delimiter anymore? Cause of OAuth2? -

I am developing an IM client for the iPhone, which will also have support for the FB account. I am using to get auth token. But whatever the token I get, any "." Characters as a delimiter do this & lt; App-id & gt; | & Lt; Session-id & gt; | & Lt; Digest & gt; Not like ? What I have read is that there is no such limit, how can I go about bringing the session key now? Or is there a new method for XMPP communication? Next, is this one of the changes in OAuth2? I think it will be removed from November 5 (according to the latest update), so the delimited string will not work after that? So instead of using the old authentication system, should I work on the new system? If you can provide some documentary proof about this then I would be really grateful. Thank you. Where does the said format get? Access token is likely to have an encrypted token you received, in your FB app settings, see if the "Oath Migration" option is enabled ...

javascript - Adding a vector mask to a layer? -

How do I want to know how to add vector mask to Photoshop in the layer provided with Photoshop sript (.jsx)? I'm not sure what I want in Photoshop is called "vector mask". I have a picture and a mask in black and white, I want to automatically add the mask to the image so that we Can only see under the white area. The black area should have transparent pixels. It should be simple, but I can not find anything at the online doctor ... Even I have done so ... var F_image = File Image Ad) Open (f_image) var bgLayer = activeDocument.artLayers [0] bgLayer.isBackgroundLayer = false; Var Masklere = Active Document Starters.ed () masklayer Name = "mask" open (file (mask mask)) // level the document so that we can get everything and then copy the app.activeDocument.flatten () app. Active Document. () App.activeDocument.selection.copy () // We have not saved anything app.activeDocument.close (SaveOptions.DONOTSAVECHANGES) app.activeDocument.paste () // How Ma...

ruby 1.9, rvm, sinatra and rackup -

जेफफाइल स्रोत: रूबीगेम्स मणि 'सीनाट्रा' config.ru 'app' को चलाने के लिए एप्लिकेशन app.rb की आवश्यकता होती है 'बंडलर / सेटअप 'की आवश्यकता' sinatra 'वर्ग ऐप & lt; सिनात्रा :: बेस मिल '/' हैलो वर्ल्ड 'एंड एंड रैकेट अप असफल हो .rvm / rubies / ruby-1.9.2- P290 / lib / ruby ​​/ site_ruby / 1.9.1 / rubygems / custom_require.rb: 36: `आवश्यकता 'में: लोड करने के लिए ऐसी कोई फ़ाइल नहीं है - ऐप (लोड एरर) रूबी के साथ काम करता है 1.8 क्यों? मुझे लगता है कि ऐसा इसलिए है क्योंकि 1.9.2 अब 'शामिल नहीं हैं।' डिफ़ॉल्ट रूप से लोड पथ में और अधिक के लिए इस प्रश्न को देखें:

objective c - Enlarging image with a button? -

- (IBAction) बड़ा {must.bounds.size = CGSizeMake (must.bounds.size.width +5.0 , Must.bounds.size.height +5.0); } यह कोड I इनपुट है, लेकिन मुझे यह कहने में त्रुटि मिलती है कि अभिव्यक्ति असाइन करने योग्य नहीं है। एक uiimageview होना चाहिए। मैं प्रत्येक संपत्ति (ऊँचाई और चौड़ाई) 5.0 करना चाहता हूं जब तक मैं बटन दबाऊं। मैं यह कैसे कर सकता हूँ। आप शायद चाहते हैं कि सीमा के स्थान पर फ़्रेम सेट करना है। ऐसा कुछ करें: सीजीआरटी फ्रेम = चाहिए.फ्रेम; फ्रेम.size.width + = 5; फ्रेम.size.height + = 5; Must.frame = फ्रेम;

Entity Framework 4.1: Code first error: "the model backing the context has changed since the database was created" -

I create a database through a "code first" application, no database in SQL Server The application is running fine, creates the database and the seed of the data defined in my initialization. For the first time, I try to add some data to a database running in the database. I get an error: The database was created because the support model of 'yyyContext' reference has changed. Either manually delete / update the database, or call the Data.SetInitializer with a database. For example, DropCreateDatabaseIfModelChanges will automatically remove the strategy and recreate the database, and optionally it will seed it with new data. No changes should be made since the database and then when the service runs. I'm running EF 4.1, and the database does not exist, as opposed to the questions with the same title: Database.SetInitializer & lt; YourContext & gt; (tap); There is no solution for me Any suggestions regarding what may be wrong are wel...

PhoneGap android database not working -

I'm having trouble doing database examples with PhoneGrap I The problem is, when I Open the database and populate to open it, then I get a warning of success, but when I try to select one I get an error: "In SQL processing Error: 0 " Is there a problem with the database and the Android phone which is not me You know what? I have also tried an Android emulator and I am raising the same issue. Can you help me? Here is the JavaScript code: Now I have the following code: document.addEventListener ("deviceready", onDeviceReady, incorrect ); Function PopularDB (Tx) {tx.executeSql ('Demo present in the drop table'); Tx.executeSql ('Create tables when not present in the display (ID unique, data)'); Tx.executeSQL ('INSERT DEMO (ID, data) value (1, "first line")); Tx.executeSQL ('Insert In Dots (ID, Data) Value (2, "Second Line")); } Function error cc (mistake) {warning (error in "SQL processing:"...

Hide a preference screen in android -

I have a priority xml .. Load preferences from an XML resource first AddLocationFram Resource (R. XML Preferences); And setting some default values ​​for it ... After setting the default value, to hide one of my preference screen (not to delete) My preference is XML & lt; Priority xmlns: android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Priority Android: Title = "Account Settings" Android: key = "customPref" /> & Lt; PreferenceScreen Android: title = "@ string / account_1" Android: key = "account" & gt; & Lt; EditTextPreference Android: key = "username" android: title = "@ string / settings_username" android: singleLine = "true" /> Android: password = "true" android: singleLine = "true" /> & Lt; / PreferenceScreen & gt; & Lt; PreferenceScreen Android: Title = "@ String / Account 2" Android: key = ...

javascript - How can I turn a string into a key? -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मुझे इस लाइन को चलाने की आवश्यकता है जावास्क्रिप्ट: @ मॉडल.save ({name: @ some_element.val ()}) लेकिन कुंजी, जो इस मामले में नाम , एक चर के मूल्य के आधार पर बदल जाएगा। चर कुंजी का स्ट्रिंग प्रतिनिधित्व है। तो इस मामले में, वेरिएबल "name" है। मैं सही कुंजी को निर्दिष्ट करने के लिए चर का उपयोग कैसे कर सकता हूं? यदि मैं सीधे चर नाम का उपयोग करता हूं तो उसे कुंजी के रूप में ही व्याख्या की जाती है। var obj = {}; Obj [varName] = @ some_element.val (); @ Model.save (obj);

asp.net - Replace buttoncolumn "Delete" with a Image Button in Gridview -

यह मेरा ग्रिडव्यूव कोड है & lt; asp: DataGrid id = "dg" runat = "सर्वर" ondeletecommand = "Delete_Item" & gt; & LT; कॉलम & gt; & Lt; asp: buttoncolumn buttontype = "linkbutton" कमांडनाम = "हटाएं" पाठ = "निकालें" / & gt; & Lt; / कॉलम & gt; & Lt; हेडर स्टाइल बैकएक्लोर = "# 95 सी 736" फोरक्लोर = "व्हाइट" फ़ॉन्ट-बोल्ड = "ट्रू" / & gt; & Lt; / एएसपी: डेटा ग्रिड & gt; मैं एक छवि के साथ अपने बटन का स्तंभ बदलना चाहता हूं, मुझे अपने ग्रिडव्यू में क्या करना चाहिए? मैं इसके लिए एक टेम्पलेट कॉलम का उपयोग करेगा: & asp: DataGrid ID = "DataGrid1" runat = "server" AutoGenerateColumns = "false" & gt; & LT; कॉलम & gt; & LT; एएसपी: TemplateColumn & gt; & LT; ItemTemplate & gt; & Lt; एएसपी: इमेजबटन आईडी = "बीटीएन डेलेट" रनैट = "सर्वर" इमेजयूआरएल = "/ इमेज / डिलीट...

c# - MS Charts: Getting the real InnerPlotPosition? -

Image
When creating a chart using Microsoft charts, I need to get the correct position of the grid on the chart. - As I think - it can be obtained by the interpretation, however, when using this property, I get the following rectangle: It looks rectangular to scale with chart size; When the size of the chart changes, the rectangle decreases, but still remains outside the grid on all the edges. I have tried to add and multiply the size with a constant, but there is no single stable work for all sizes. So, just to make it clear, what I want is the outer black rectangle on the grid Is there any way to do this? (I was thinking of scanning pixels from the edges, and was detecting the first black pixel in every direction, but this disturbance looks like a hack.) I finally found a solution that works: chartAre = chart.ChartAreas [0 ]; Double X1 = a.AxisX.ValueToPixelPosition (a.AxisX.Minimum); Double X2 = a.AxisX.ValueToPixelPosition (a.AxisX.Maximum); Double y1 = a.AxisY.Value...

android - Alert box ..on and off -

Hi, I am using vigilant..and when the user clicks, then he has to restart the same functionality (game) and when those clicks do not go to the main menu .. But when I click OK . The activities of 2 are running together and when I do not watch .. and come back here .. the dialogue still exists! help! This snippet is AlertDialog Builder warning box = new alertDialog. Builder (this); Alertbox.setMessage ("Oh! Wrong answer! Play again!"); Alertbox.setPositiveButton ("Yes Sure!", New DialogInterface.OnClickListener () {Intent Game = New Intent ("nik.trivia.GAME"); Startup (game); End ();}); Alertbox.setNegativeButton ("No, move me to the main menu", New Dialog interface. OnClicklist () {click on Public Zero (DialogInterface arg0, int arg1) {intent menu = new intent ("nik.trivia.MENU") ; StartActivity menu); End ();}}); You should reject your alterdialog After the user has clicked a button. Edit: Just keep this line's code: ...

app store - How to implement an iOS app personalized start page? -

I am developing my first iOS app and I have to face a challenge. I want to present the new user a personal screen explain more to me when the app starts for the first time. The flow should be less or more like this: My app is not installed on the user's device. Then the user is a part of my app message conversation with a short message to send an SMS and an link to install on my iPhone. The other user sent this message in my message (through my backend) so that this user can be included in the conversation. This install URL is not linked directly to the ITIN Store, it can link to specific links of a conversation such as myapp.com/conv/12345 The page on myapp Com / conv / * will detect the device and if it is an iPhone then the user will be redirected to install Map on AppStore. The user then installs the map and launches it Now I want to present the same conversation 12345 to the user, before that also login, register or do you have Ho. This is the hard par...

logging - Is it ok to log the source class name and method name in a java product? -

I am currently working on Java applications for some network monitoring tools. In my code I should use logging. Since this is a network management software, the information in the log is very useful for the user, so it is mandatory to use it. But now I'm a bit confused which type of logger method I should like now I am using Logger.lop (... // ...) , so with our help we The name and method of the class are also logged, so it is very easy for me (developers) to get the code and error to debug, but in the end I am confused that I distribute the same user with the same logging mechanism Do not Does it tell your user what type of class is currently executing, in which method has an error? I have seen many products several times in the stacktrace handling exceptions, so in general we also get class names. So there is no problem in doing this, that the gap will come to know that what is your class name and method? Consider the impact of security on this, dynamically, actual cla...

objective c - Set UIWebView Address String -

घोषित समारोह - (IBAction) changeProductWeb: (NSString *) str; - (IBAction) changeProductWeb: (NSString *) str {NSString * urlAddress = str; NSURLRequest * अनुरोध = [एनएसयूआरआर अनुरोध अनुरोध विथ url: urlAddress]; [WebView loadRequest: अनुरोध]; } एरे का उपयोग कर स्ट्रिंग सेट करें [सेल बदलेंप्रेंटकैब: [वेबटिटल ऑब्जेक्टऐटइंडएक्स: इंडेक्सपाथ.रो]]; ऐरे webTitle = [[एनएसएआरआरएएलओसी] इनिटविथऑब्जेक्ट्स: @ "बार-एचटीएमएल", @ "बार-एचटीएमएल", @ "बार। Html ", @" bar.html ", शून्य]; जब मैं इसे क्रैश करता है, तो अगर मैं स्ट्रिंग स्टेटिकली सेट करता हूं: - (IBAction) changeProductWeb: (NSString *) str { यह ठीक काम करता है [एनएसयूआरआर अनुरोध अनुरोध withURL:] एक NSURL चाहता है, NSString नहीं। इसकी बजाय कुछ ऐसा करने की कोशिश करें: NSURLRequest * अनुरोध = [NSURLRequest अनुरोध के साथ URL: [NSURL URLWithString: urlAddress]];

javascript - Static Html Table Header Code -

I have to decide the headers of this html table, so I'm scrolling down and the headers remain constant. My table header HTML: & lt; Table style = "width: 425px; height: 4810px;" Border = "0" & ​​gt; & Lt; Tbody & gt; & Lt; Tr class = "tableizer-firstrow" & gt; & Lt; Th colspan = "3" & gt; Is your question guessing that you want a fixed header? If you can use jQuery in your solution, take a look.

android - Eclipse connected to GDB but when my program crashes, nothing happens -

I have been able to create a debug configuration that targets remote clients using GDB. This was done according to the plugin documentation of Android NDK Sequahah. After few hours of tinkering I was able to get Eclipse to connect GDBser on device and console). But the problem is that the eclipse does not really do anything when it happens. If anyone has any sign on this then I would appreciate it. Thank you, Kevin I work using OS X instead of Fedora I have been successful in doing this. Probably not a real answer.

Java MP3 Library W/ Ability to Change Pitch and Speed -

संभव डुप्लिकेट: एमपी 3 फाइलों को चलाने के लिए जावा लिब को संभालना अच्छा है? पिच और प्लेबैक स्पीड को नियंत्रित करने के लिए हमें किसी भी तरह की सुविधा भी चाहिए। हमने जेलेयर पाया है लेकिन इसमें ये विशेषताएं नहीं हैं ... यदि आप जावा ME का उपयोग कर रहे हैं, पिच कंट्रोल और दर नियंत्रणाधीन के लिए इंटरफेस प्रदान करता है, क्रमशः प्लेबैक पिच और प्लेबैक दर को नियंत्रित करता है।

ruby on rails - If else not working because it contains end within -

I have a helper that has a simple and closed switch I know I have to do this work because it is on other pages However, it will not work on this particular page .. I think because if it is within a end , then if it is finished otherwise the code is here: I believe this part is working: & lt;% if popup == "off"% & gt; & Lt;% content_for: main% & gt; & Lt;% end% & gt; This part is not so much: & lt;% if popup == "off"%> & Lt;% end% & gt; & Lt; & Lt; This end should be displayed if popup = closed & lt;% end% & gt; You can do this: Lt; % If Popup == "Off"% & gt; & Lt;% = "& lt;% end% & gt; & Gt%; & Lt; & Lt; This end should be displayed if popup = closed & lt;% end% & gt; Or try this: & lt;% if popup == "off"%> & Amp; Lt;% end% & amp; Gt; & Lt; & Lt; This end should be displayed if popup = closed & ...

osx - What are the default search directories to link a library on Mac OS X -

I created Mac OS X with Limca and get two shared libraries: libgtest.dylib And libgtest_main.dylib and now I need to install both. I know that there are some default search directories on Linux, such as / usr / lib , / usr / local / lib , etc. But I'm unfamiliar with Mac OS X In this, I think there are three directories of libraries: ~ / library , / Library and / Usr / lib . And I have tried to place the guest libraries in these directories respectively, and have only detected / usr / lib works. What are some rules about what I need to know, default search directory on Linux and Windows such as Mac OS X Take a look at the default values ​​of the environment variables used by the liner: DYLD_FALLBACK_LIBRARY_PATH ... By default, it is set to $ (HOME) / lib: / usr / local / lib: / lib: / usr "Deploying an application on Mac OS X" About Articles and "Mac OS X Installs Articles about "Lar" can also help. / html>

performance - Database: get and delete or just delete? -

Performance / Good Practice Questions - Should I check that the object exists or just delete it? therefore: obj = getObj (someid); If (obj! = Null) {deleteObj (someId); } Or simply: deleteObj (someId); ? From a demonstration perspective, you might be better off trying to remove the record id vs. record And then trying to return it to the database to remove it. There is always good practice to limit the number of transactions on your database. Remove from table name where id = @ id You will know whether you have deleted any records based on the row count above Returned to the given question.

ios4 - How to control animation speed? -

I am taking an image and then expanding the image. The problem is that what is my image growing rapidly is there any way to run 2 animation and control speed? Here's the code: - (IBAction) pushmove {[UIView startAnimations: zero reference: NULL]; [UIView Set Animation Duration: 2.5]; Square.transform = CGFene Transmeter Transmission (-200, -300); [UIView Set Animation Duration: 1.5]; Square.transform = CGF TransFormsMacecale (8, 8); [UIView commitAnimations]; Yes! It is possible and quite easy. The main thing is that the CA animation implies the CAMediaTiming protocol. Therefore you can set the speed on either CAAnimation or CAAnimationGroup : myAnimationGroup.speed = 2; So if the term is 4 , your group will be executed in 2 seconds. Some of Apple's videos are very helpful on this topic, including CAMediaTiming in the WWDC 2010 session 424 and it uses checkout 46: 30 seconds in the video. Here's the link:

Can I add profile data to a facebook test user? -

I have a Facebook application that requires user data (especially the location). I am trying to use the test user API but I do not have to find out how to add additional information to my test users besides entering FB and changing it on the page. Is there a way to do this through APIs either by updating a user or by using an API call? Someone has posted this question, but there is no answer yet. Today I actually ran into the same problem. I have an application that uses Facebook users' location information and now I am looking for a way to automate the creation of these users for user testing. In addition to the current information of Facebook, there is no graph API to update profile information in test users Includes Unfortunately you can set up a username, password and email only when creating a user.

mysql - PHP: How to check if ID in database exists -

Why will not this send the user to user.php if the ID is not present in the table? & lt ;? Php included 'db_connect.php'; $ Id_exists = false; $ Url_id = mysql_real_escape_string ($ _GET ['id']); $ Sql ​​= "Selection ID from members where id = '$ url_id'"; $ Result = mysql_query ($ sql); If ($ result == $ url_id) {$ id_exists = true; } And if ($ result! = $ Url_id) {$ id_exists = false; Header ("location: user.php"); Go out(); }? & Gt; Thx in advance! $ url_id = mysql_real_escape_string ($ _elected ['id']); $ Sql ​​= "Selection ID from members where id = '$ url_id'"; $ Result = mysql_query ($ sql); If (mysql_num_rows ($ result) & gt; 0) {// found} else {// not found} try something like that :).

javascript - Extend a function - merge two functions? -

I am now in a new area, I have not worked with such a thing in a while. For example, what is the best way to javascript 'class' // xyz () in the original example function {var x = 1; } I want to set it up in class, and when a user increases a square, I want them to extend this function effectively. I know I'm not clear, but it's been a long day. For example this is the user's code. // hair example function in xyz () {var y = 2; } The result of the merge should be in the following: // the merged instance function in xyz () {var x = 1; Var y = 2; } Am I asking wrong or wrong questions about the wrong things? You can not 'merge' those tasks, as you describe them, but Whatever you can do, a function is again defined to call itself and a new function (before or after the original). var xyz = function () {console.log ('xyz'); }; Var abc = function () {console.log ('abc'); }; // And, somewhere, if you want to merge: v...

design patterns - Using PatternSequence with Cases in Mathematica to find peaks -

निर्देशांक के जोड़ जोड़े डेटा = {{1, 0}, {2, 0}, {3, 1}, {4, 2}, {5, 1}, {6, 2}, {7, 3}, {8, 4}, {9, 3}, {10, 2} } मैं चोटियों और घाटियों को निकालना चाहता हूं, इस प्रकार: {{4, 2}, {5, 1}, {8, 4}} मेरा वर्तमान समाधान यह अनावश्यकता है: मामले [विभाजन [डेटा, 3, 1], {{ta_, a_}, { Tb_, b_}, {टीसी_, सी_}} /; या [एक & lt; बी & gt; सी, ए & gt; बी एंड एलटी; सी]: & gt; {टीबी, बी}] जो आप देख सकते हैं विभाजन का उपयोग कर डेटा सेट के आकार को तीन गुणा करके शुरू होता है। मुझे लगता है कि यह जानकारी निकालने के लिए मामले और patternequence का उपयोग करना संभव है, लेकिन यह प्रयास काम नहीं करता है: मामले [डेटा, ({___, पैंट स्यूवेन्स [{_, a_}, {t_, b_}, {_, c_}], ___} / या [एक और लि यह पैदावार {} । मुझे लगता है कि पैटर्न के साथ कुछ भी गलत नहीं है क्योंकि यह काम करता है प्रतिस्थापन सभी के साथ: डेटा / ({___, पैंट स्यूवेन्स [{_, a_}, {t_, b_}, {_, c_}], ___} / या [एक और लि यह सही पहला शिखर देता है, {4, 2} । यहां पर क्या हो रहा है? आपका असफल प्रयास...

c++ - Why isn't std::find() using my operator==? -

In the following snippet, I have overloaded the comparison of my pair of operator == string Type in with but for some reason, the compiler is not searching for my operator as a match for the search function. why not? Edit: Thanks for all the suggestions for the options, but I still want to understand why . This code looks like it should work; I want to know why this does not happen. #include & lt; Vector & gt; # Include & lt; Utility & gt; #include & lt; String & gt; # Include & lt; Algorithm & gt; Typedef std :: pair & lt; Std :: string, int & gt; RegPair; Typedef std :: vector & lt; RegPair & gt; RegPairSeq; Bull Operator == (Const Repechier & LHS, Constant Strode :: String & amp; rhs) {Return lhs.first == rhs; } Int main () {RegPairSeq sequence; Std :: string foo ("foo"); // stuff that is not important std :: find (sequence.begin (), sequence.end (), foo); // g ++: Error: 'operator ==' has no ...

How to set "ecb-source-path" of ecb of Emacs? -

Image
This stupid question spent me all day, and I still do not know how to set it up. I am new to emacs and ecb - I have installed it for the first time today. I found that "directory window" was empty when I started eMX: So I have read the document online, it says that before me ecb-source-path should be set, so I input: Mx custom-variable & lt; RET & gt; Ecb-source-path & lt; RET & gt; Now, it opens a new document: But I think I can not do anything in this document (it can not be modified), and there is no way to set the path. I was trying again and again, very much, still not lucky. It really bothers me that it is very hard for new messages. If you click on the other screenshot there is a button labeled "INS" Generate an element of the list. Alternatively, you can set it directly in your .emacs : (setq ecb-source-path '("/ i / Am / path / one "" and / i / am / path / two "" / is / did ...

c++ - Exporting function from DLL syntax -

Export.def can insert any such rows in the file: export the library plug FuncName main = FuncName What is the effect of exporting functions like this? Does it export two function names, which are of the same function? Or does it just export the function, giving it another name? According to: The keyword EXPORTS is the first definition or The preceding line can be on the same line .def file can contain one or more EXPORTS statements. The syntax for export definitions is: entry [= internal name] [@ORDINAL [NONAME]] [personal] [data] The entry name is the function or variable name you want to export. It is necessary if the name you export is different than the name in the DLL, specify the name of the export in the DLL with the internal name. For example, if your DLL exports a function, then func1 () and you want to use it as func2 (), you specify: EXPORTS func2 = func1

How to add existing collection of entities to existing entity without pulling first pulling existing entities from database using code-first framework -

I am trying to attach two existing and one new bid bid for the existing current auction, but without doing so Unable to pull the product from the database. This code works, but I just have to go to the bid for providing the bid id and then save about the auction. Db = new datacentex ()) // Existing auction auction = auction = db Down Search (1); Var bid 1 = DB Bids Search (1); Var bid 2 = DB Bids Search (2); Var bid 3 = new bid () {// new bid}; // Existing Auctions Bids Add (bid 1); // Existing Auctions Bids Add (bid 2); // new auction Bids Add (bid3); Db.SaveChanges (); } Edit - I also tried to do it properly, but found a referenced integrity problem: The following diagnostics: {"Update in Store, Insert , Or delete an unexpected number of rows (0). The components can be modified or removed after the entities have been loaded. Refresh the Ostastate Manager entries. "} Using (var db = new DataContextContext ()) {var blue = DB.Action Search (1); Var bid 1 = new...

performance - C++ GUI Development - Bitmap vs. Vector Graphics CPU Usage -

I am currently developing for some audio applications designed in GII and using C ++ (using Jus Framework) I am in the process of doing So far, I'm playing with the use of bitmap graphics to create custom sliders and dials using 'film strip' style pictures to animate the components (which means that when a user Interrupts with the slider, it triggers a method that changes the offset of a film-strip image to change the appearance of the components). Depending on the size of the original image and the number of 'frames', the CPU usage level varies significantly dramatically. First of all, what would be the most efficient bitmap file format to use in terms of CPU consumption? I am currently using PNG images. Secondly, would it be more efficient to use vector graphics for such graphical components? I understand the main difference between bitmap and vector graphics, but I have not got any information about my CPU utilization levels regarding GUI interaction. ...

In a mongodb group/map command determine the group's percentage of a total -

In a mongodb group operation, there is a way to determine totals during their final determination, To eaxample, for example, after the completion of the group operation, I know that the total volume of Group A is 50. Is there a way to get the group's quantity value as a percentage of the total? Or do I have to save the results in the collection, to determine the sum, then go back and update each document with the count of the total count for the group? area area, which sets JavaScript globals available for map , area and type either map , and final function and either map or Total track during the short steps; whatever is most understandable for your use; You can reach it during final to calculate the percentage for each output group.

indentation - Python: Comment out a block heading without dedenting all the code inside -

Sometimes I need to temporarily comment on block headings for testing purpose, for example: i = 2 s = {'a', 'b', 'c'} # timing i & gt; 0: s.pop () i - = 1 print (s) But since the Python is part of the syntax, if I run the code above: s.pop () ^ indentation error: unexpected indent I know that while dedenting inside code coded it will work , But I is there any trick to accomplish this? what about it if true: as an alternative? Then just exchange between the '#' between while and if to get your desired effect.

javascript - How to load image, create texture, render, and save image asynchronously with WebGL? -

I am trying to write an application that uses very large textures. The idea is that you work on a small version of texture in real-time modified shaders and when the application ends, your changes will be applied to the original unscalated texture. The problem is that profiling shows something like the following: img.src = filename (500ms) texImage2d (...) (1500ms) pixels (300 mms Put in canvas (1000 mms) Save to canvas file (300 mms) Essentially This means that the browser locks for about 4 seconds when saving large unmodified texture, the user is unable to do anything. Is it possible to do this in asynchronously so that the browser is responsive? All this should be done in JavaScript and client-side, because I am using local files (HTML files / filesystems). Web workers looked like a good idea, but they are DOM, so I can not save the image loading and functionality of the browser, and they do not have access to the WebGL reference so that they call Teximage 2d Ca...

Is there a way to get the .Net JIT or C# compiler to optimize away empty for-loops? -

A followup for this: The following program only runs an empty loop one billion times and prints It's time to run away. It takes 700 ms on my machine, and I'm curious if jitter has a way to remove the empty loop. using the system; Namespace Console Application 1 {class program {static zero main () {var start = DateTime.Now; (Var i = 0; i & lt; 1000000000; i ++) {} console for WrightLine ((DateTime.Now - Start). Total Emilicounds); }}} As far as I can not answer, but I do not know whether there are hidden compiler options that I have not tried, I have certainly compiled it in release mode and No debugger is attached, but still 700 ms are being taken to run this empty loop. I also tried NGN with the same result (though my understanding is that he should make the same compiled code as JIT, right?). However, I have never used NGN and it is misusing it. It looks like like finding and optimizing JIT would be easy, but to know very little about doing abusive behavio...

java applet AccessControlException in 3rd party library -

I am using a 3rd party library (jar) in my Java applet and I am getting this error: / p> java.security.AccessControlException: access denied to java.security.AccessControlContext.checkPermission (unknown source) at java.security.AccessController (read "java.util.PropertyPermission" "*" ", write ") .checkPermission (unknown source) JavaklangkSecurityManagerkcheckPermission (unknown source java.lang.SecurityManager.checkPropertiesAccess on java.lang.System.getProperties on Sfs2xkclientkcoreksockets) (unknown source) (unknown Source) .TCPSocketLayer.initNetty (TCP) SocketLayer.java:63) at sfs2x.client.core.sockets.TCPSocketLayer. & Lt; Init & gt; Sfs2x.client.bitswarm.BitSwarmClient.init at (TCPSocketLayer.java:59) (BitSwarmClient.java:90). Init & gt; On bfwd.RedemptionOnline.Client.RedemptionOnlineApplet.init (SmartFox.java:127) (RedemptionOnlineApplet.java:29) sfs2x.client.SmartFox.initialize (SmartFox.java:148) is sfs2x.client.SmartFox...