Posts

Showing posts from June, 2015

c++ - CUDA conditional thread synchronization -

CUDA प्रोग्रामिंग गाइड बताता है कि __ सिंकट्रेड () को सशर्त कोड में अनुमति है, लेकिन केवल यदि सशर्त संपूर्ण धागे ब्लॉक में समान रूप से मूल्यांकन करता है, अन्यथा कोड निष्पादन अनचाही दुष्प्रभावों को लटका या उत्पादन करने की संभावना है। इसलिए यदि मुझे एक ब्लॉक में सशर्त शाखाओं के साथ धागे को सिंक्रनाइज़ करने की आवश्यकता है , जिनमें से कुछ धागे शाखा को नहीं ले सकते हैं या नहीं कर सकते हैं जिसमें __ सिंकट्रेड () कॉल शामिल है, इसका क्या मतलब है कि यह काम नहीं करेगा? मैं सोच रहा हूं कि वहां सभी प्रकार के मामलों में हो सकता है जिसमें आपको ऐसा करने की आवश्यकता हो सकती है; उदाहरण के लिए, यदि आपके पास बाइनरी मुखौटा है और पिक्सल पर एक निश्चित ऑपरेशन को सशर्त रूप से लागू करने की आवश्यकता है कहें, यदि (मुखौटा (एक्स, वाई)! = 0) तब कोड को निष्पादित करें जिसमें __ सिंकट्रेड () शामिल है, अन्यथा कुछ भी नहीं। यह कैसे किया जाएगा? यदि आपको इस मार्ग पर जाने की आवश्यकता है तो आप शरीर को दो चरणों में विभाजित कर सकते हैं : यदि (शर्त) {// सिंक करने से पहले कोड} __सिंक्टट्रेड (); यदि (स्थ...

mysql - how to use inner join in my condition -

मेरे पास इस तरह से दो टेबल हैं c_ID नाम -------- - 7 a 6 a 5 a 4 d और सीआईआईडी फोटो ----- ------ 7 1 6 1 5 0 4 1 मैं कैसे नाम a और फ़ोटो 1 धन्यवाद चुनें * / * TODO: आप चाहते हैं कि विशिष्ट कॉलम (एस) जोड़ें * / से table1 तालिका 1.c_ID = table2.c_ID पर तालिका 2 में शामिल हों जहां तालिका 1.name = 'a' और table2.photo = 1

iphone - Mobile browser simulator for finger gestures? -

I'm looking for a light weight mobile explorer simulator that runs under Windows XP And allows me to test JavaScript tactic and gesture events, such as zoom or drag and drop: So far I have evaluated: It seems that Mobion is the only one who is the finger Lee supports gestures, and really is very well. However, before calling for $ 99.95 for MobiOne, I want to know: Is there any option? Note that I'm not interested in installing Android SDK because it runs very slowly on my machine. Palm pre SDK runs very fast, but it still has heavy weight. Currently, as of 2013 I'm comfortable with a web browser I use, which runs on Windows XP. BrowserStack offers various emulators, and - when they run on their hardware - the client computer does not need to be powerful only, of course, anyone requires a decent internet connection. Previous suggestion as of 2011, It seems that the test center is the only light-weight browser simulator, which is half w...

email - Is there any way of getting the content of an e-mail given a URI on Android? -

I have such a URI: Email: // messages / 0 / INBOX / 7154 What is the way to get the content Via e-mail (i.e. body) Android SDK or third party library? Cheers Let me go to believe that whenever (and is?) SMS-received intentions There is no way to read the received email.

php - URL obsfucation? -

I need to keep all the links to mp3 files on a hidden Wordpress site without hiding it from an MP3 player. Set them on the page to play (Initial defense against unauthorized downloads.) I would also like to remove the "wp-" prefix on all WordPress folder names (wp-admin, wp-content, wp- Included) Not to break future updates in WordPress. Best if these two functions can be renamed to the actual directory and instead PHP, .htaccess, Javascript, or some other "real" url can be done without the use of "mask". / P> Thanks! Not sure how you will be able to mask anything using javascript. A better solution would be to create a PHP script, which will be based on your MP3 files whether the user is authenticated or something else. In this way you can store at least MP3 files in a folder from your web root and using the URL away from people trying to download them.

php - regex - match "(posted|post|submitted) by:" from a text -

Image
I need to match & amp; Replace with each type of string with a string: Note: Each string can be in a text or at the beginning of the text; In both cases, regex should get everything from the starting point to the end of the line Posted by Lorem Ipsum someone on March ... \ Posted by: On a March ... \ n Posted Someone March ... \ n Posted by Lorem Ipsum on anyone ... ... \ n by On .... Submitted By: On Anyone ... ... \ n Presented by Lorem Ipsum Code> someone ... ... \ n \ n means only the end of the line This is what I did, but according to the expectation, the speed is not always to work fast / (?: Posted | post | submitted) \ s) (? :( by)) (? :(. *)) \ S (. *) | / I / edit: OK, I need to match the problem at the beginning of the string and in the middle Posted is submitted, and by the by string in the beginning, otherwise it will be something like "something like ..." updated / (by: ^ \ s) | (?. *...

google app engine - No module named Crypto.Cipher on local mac AppEngine -

Crypto. Any module named cipher when I try to import From crypto Sefer Import AES My folder structure looks like this: test / test /main.py Test / pycrypto-2.3 I had built and installed inside the Piccito folder, but I'm looking at any idea, error? This does not work with normal easy_install, or setup based on your Mac OS X version. Py is running The reason for this is that Google App Engine only allows for libraries loaded from a few directories. For more discussion see here:

c - LINUX: List contents of a outside folder or of a subfolder without leaving current folder -

I have a program that sees a folder somewhere in your directory (the location is given at the start of the program ). One of its functions is that the user has to specify which content is stored in that specific folder. I was thinking of piping the ls command, but I'm sure how to get the contents of a folder in which you are not currently. help? Thank you! Just use LS? ls / path / to / directory Alternatively, opendir () and readdir () , use man 3 opendir and man 3 readdir >

xml - Embed SVG in SVG? -

I have a SVG document, and I would like to include an external STVG image inside it, such as: & lt; Object data = "logo.svgz" width = "100" height = "100" x = "200" y = "400" /> ("Object" is just an example - external document will be SVG instead of XHTM). Any thoughts? Is this also possible? Or in my external SVG document, what's the best thing to just slap the logo. Svg xml? Use the element and reference your SVG file. For fun, recursion.svg : & lt; Svg width = "100%" height = "100%" visible box = "-100 -100 200 200" version = "1.1" xmlns = "http://www.w3.org/2000/svg" xmlns: Xlink = "http://www.w3.org/1999/xlink" & gt; & Lt; Circle cx = "- 50" cy = "- 50" r = "30" style = "fill: red" /> & Lt; Image x = "10" y = "20" width = "80" height = "80...

c# - How to load external data files without defining path explicitly? -

I have a C # assembly that loads external files. This assembly is used by the asp.net website. The following is the code that loads the data files string DataDirectory = Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly () location), "Data".); FilePath = Path.Combine (DataDirectory, _fileName); This component works well in the Windows App, but when I try to use it in the asp.net website it fails because the site could not locate the files, And this gives me the following error: C: \ Microsoft.NET \ v4.0.30319 \ Windows \ Framework Temp ASP.NET Files \ cmictranslatorsite \ 20a8eddd \ 864b2575 \ Assembly \ DL3 \ 5bd4a35e \ 8c6f79b6_98eccb01 \ data \ file.txt You can find the relative physical paths in ASP.NET Have You need to use. \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP: Applications Path.GetDirectoryName (. Assembly.GetExecutingAssembly () location) Returning Net Files \ cmictranslatorsite \ 20a8eddd \ 864b257...

php - Call method by string? -

क्लास मायक्लास {निजी $ डेटा = सरणी ('कार्रवाई' = & gt; 'डालें'); सार्वजनिक फ़ंक्शन डालें () {गूंज 'कहा जाता है'; } सार्वजनिक फ़ंक्शन रन () {$ this- & gt; $ this- & gt; डेटा ['कार्रवाई'] (); }} यह काम नहीं करता: $ this- & gt; $ this- & gt; डेटा ['कार्रवाई'] (); केवल possibilites call_user_func (); कोशिश करें: $ this- & gt; {$ this- & gt; डेटा ['कार्रवाई']} (); आप यह सुरक्षित रूप से जांच कर सकते हैं कि उसे पहले कॉल करने योग्य है: $ action = $ this- & gt; डेटा ['कार्रवाई']; यदि (is_callable (सरणी ($ $, $ क्रिया))) {$ this- & gt; $ कार्रवाई (); } और {$ this- & gt; डिफ़ॉल्ट (); // या किसी प्रकार की त्रुटि संदेश}

How to build a custom component in android -

I want to develop a custom component on Android (a word balloon object) and I do not know where to start Please I need some help Take a look at this topic. The sample code also has one.

javascript - How can I render a partial in dynamicHepler? -

I am using Express in Nodes. The following code starts partially presenting and answering it directly to the customer How to return partials provided in the layout template instead of sending it to my dynamic halper client app.dynamicHelpers ({menu: function (Req, res) {// following res.partial (__dirname + '/ views / partials / menu', {localals: {nodes : Asap.config.menus [key]}});}}); thanks After new versions express and connect From you will call this as res.send () twice, I am working on a commitment to fix this issue. I hope to finish it shortly and we will see if TJ will merge it.

iphone - How to you calculate currency values, if the "cents" portion doesn't show up? -

I'm feeling painful to Noab and want to lose. Let's just say that I want to add 1,302.22 and ".22" part, it does not appear, I add "44.55" to the next currency and fifty five percent will not show me how to give me a headache with ".00" Can i fix the thing double currency = [volume 1. Text double value] + [zodiac 2. Text double value]; NSNumberFormatter * numberFormatter = [[[NSNumberFormatter alloc] init] autorelease]; [NumberFormatter Settlement Style: NSNumberFormatterCurrencyStyle]; NSString * numberAsString = [numberFormatter stringFromNumber: [NSNumber numberWind: currency]]; Currency.text = [NSString stringWithFormat: @ "% @", numberoststring]; I doubt there is a problem here: NSString * numberAsString = [numberFormatter stringFromNumber: [NSNumber numberWind: currency]]; [With NSNM number number: currency] creates an NSNumber object, with an integer value. The integer value you are passing is currency Howev...

Rollover Button inside JQuery Tools Tab -

I have a rollover image 125x80 I have the following code is simple HTML and CSS and works fine, but when I do #questions div If you try to integrate inside a jQuery Tools tab panel, the button will never appear. I am thinking of what I am doing wrong. & lt; Html & gt; & Lt; Top & gt; & Lt; Style & gt; # Question one: Link {height: 40px; Width: 125px; Display area; Background: url (../ images / btn-questions.png) No-repeat left top; } # Question one: hover {background-position: left bottom; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "question" & gt; & Lt; A href = "#" & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; This works then I try to integrate it into the jQuery Tools tab panel, the following ways: & lt; Div class = "panes" & gt; & Lt; Div & gt; This is the first tab it a...

linux - Custom libevent is required with HipHop patches -

I'm trying to install a hip on my PC, but I get the error with the problem with cmake Getting: CMake error in CMake / HPHPFindLibs.cmake: 65 (message): requires custom libevent with hiphop patch any How to fix the idea? To resolve this problem, you have to patch the libevent source code, this is how the instructions for libevent Patch the source code.

Best practices for Facebook integration using the graph API -

When it comes to integrating your site with Facebook, does it mean that all user information from Facebook to your DB Is there a recommendation to save or is it recommended in real time queries which is the information you need based on the user's ID? For example, the size of the avatar is different on my site than my Facebook, so I have no option to download FB avatar, but other things like name, gender, hometown For me, I was thinking that I have to save that data Besides, if I decide to change extended permissions later, is this an easy job? The option for cache or re-query is completely dependent on your needs. If you need a name to be absolutely accurate then you should ask again every time. I had worked on a Facebook application, which has not yet coveted most of the user details, so we did not let them cache alone. The permission to expand is very easy

Hibernate Reverse Engineer Database -

I am using MyEclipse to generate the hibernate code for a PostgreSQL database. The point is that this is the only reason I am using myclipus. I want to use some type of command line tool to generate this code easily. I have seen some mention of such tools but I can not find anything concrete It seems like what I want to do is very simple I hate to fire this IDE and to do all these simple things I want to go through What's the best way to do this? Yes, you can use it as a command line from AT.

python - Is it possible to modify lines in a file in-place? -

Is it possible to parse a file line through a line, and it is possible to edit a line in in-play ? Is it possible to parse a file line through a line, and at the same time Is it possible to edit lines through? This can be simulated as a stdlib using a backup file. Here is an example script that can be copied from files given on any_condition command line or stdin : #! Import file input for line in / usr / bin / env python # grep_some_condition.py file input. Input (inplace = true, backup = '. Bak'): If some codification (line): print line, this current file example: $ Python grep_some_condition.py first_file.txt second_file.txt on completion first_file.txt and second_file.txt files only rows th Include some_condition () predicate satisfied.

c# - Redirect From Action Filter Attribute -

What is the best way to redirect a ActionFilterAttribute ? I have ActionFilterAttribute named "IsAuthenticatedAttributeFilter" and checked the value of a session variable. If the variable is wrong, then I want to redirect the application to the login page. I prefer to redirect using the root name SystemLogin , but at this point any redirect method will be cured. , root value); You can do anything like this: filterContext.Result = new ViewResult {ViewName = SharedViews.SessionLost, ViewData = filterContext.Controller.ViewData} ; If you want to use RedirectToAction : then you have a public RedirectToAction method You can create your controller ( preferably on your base controller ) which only calls secure RedirectToAction to System.Web.Mvc.Controller . Adding this method allows public call your redirect action from the filter. Redirect the new redirect reader redirects action (string action, string controller) {return base. Redirection proj...

iphone - XCode4 Tab bar template problem -

I am starting using XCode4 and when I tried to create a new project with the tab bar app template, I thought That I can select my tab bar to add new tabs I can not drag the tab bar object from object library and I can not select tab bar to get property in inspector. How to do this in XCode4? Select your main window, expand the tab tab controller, select one of your view controllers and Copy / Paste

winapi - Issue with generating left click in win32 api? -

The following is my code to use win32 api. The problem is that it gets stuck And does not return to the main. When I press Ctrl + c, it comes back to the main. But When I call it twice, imitating the double click, it's okay. Is there any mess in this code? Thank you. zero left click (zero) {INPUT input = {0}; // drop down input. Type = INPUT_MOUSE; / * The event is a mouse event, use the union's mile structure. * / Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN; SendInput (1, and input, sizeof (input)); // zero memory (& input, size (INPUT)) left; Input. Type = INPUT_MOUSE; Input.mi.dwFlags = MOUSEEVENTF_LEFTUP; SendInput (1, and input, sizeof (input)); } If you are not committed to using SendInput, then I got success With the previous WM_LBUTTONDOWN using SendMessage with WM_LBUTTONUP on the desired HWW. Most buttons do simulate a click with keyboard entry, you can use SendMessage with WM_KEYDOWN and wParam VK_SPACE, then WM_KEYUP to complete the space bar press...

MonoDevelop Using with Team Foundation Server (TFS, SVN?) -

We use monoidwell / mono touch to create our enterprise iPhone / iPad apps. A new customer wants us to use our TFS as a source code repository. Is there a bridge that can allow us to join TFS? Maybe we have to do through SVN? EDIT: The latest version of Xamarin now fully supports Visual Studio 2012 A new adin is available for mono development which appears to fill this gap. Link:

r - RODBC and Access - Loading data -

I am trying to load some data from the Access database to R. I can say that to use odbcConnectAccess ("file.mdb") I can not load this function on all the instructions. Has it been altered or changed its name? Is there another way to do this? I still have no luck at RODBC with the library ("Loaded with RODBC"). Thank you! If you are using on a Mac, then I use drivers to connect to Access database Has achieved success by doing so. If you have already set up the ODBC connection, then using the Odyssey Source Administrator on Mac, the rest of Windows or the Odbi administrator are quite simple. Library (RODBC) # Open the database, supply the name of the name of the ODBC connection and user name data. Lt; -odbcConnect ("ODBC_Connection_name", uid = "user_name") There is also an option to provide password in the ODBC Connect, but I have set up the connection with "password" . sqlTables (data.ch) # Check the connection for a...

MySql select from subquery slow (even though subquery on it's own is fast) -

I am trying to speed up this query: SELECT order.id FROM (`order` with 'o' select o.id oi.order_id = o.id and` o`.` canceled '= 0 and (`o`.` return_date`>" 2011-03 - 14 "OR oi.checked = 0 or '2011-03-14' & lt; oi.last_update)) As 'order' it clocks in 0.0930 seconds. Its subquery (SELECT * FROM order as o ...) on its clocks in 0.0005 seconds, the table I am testing contains approximately 10000 rows, 43 rows Returned by sub-clauses, where-clause In addition to accelerating the query, I would really love if someone could explain to me why when I wrap it in another query, the query becomes 100 times slower? The MySQL interpretation tells me that it already selects o and then oi . MySQL first explains the full query (what is 2 derived on it?), Then o and oi in that order. I am adding a lot because of this subquery being a subquisite which is not in the segment (which I have excluded from the code and benchmark) if I use th...

Is there a patch to lua for composite operators (+=,-=,*=...)? -

I know that the overall operator is not necessary, but I really want it. Your first stop should be, if it is not anything to produce, you can search through it , Or try mailing list to ask yourself. I think that you need to create it manually using the provided Lava source, but the bitwise ops patch on the power patch pages shows you all the places you want to patch

autoload - confusing "cannot redeclare class" error (PHP) -

I have a strange problem. I have a static method that loads classes (load_library) when it comes to a particular class It loads, it gives me a fatal error "can not recapture the class", but checking that if it is present before using the load_ library method to load the class, it says that the class not available. The load_library method works elsewhere without such errors. If I call load_library, then it says that the class is not actually used later after some lines stranger still, if I have my registered class autoload Instead of function, everything works perfectly, even if it does not check the autoload function directory that class I is trying to load. This is a complex problem involving many complex files, so posting this code is difficult, but can anyone be aware of this problem? My load_library method: public static function load_library ($ name) {if (! Class_exists ($ name)} {if (file_exists ('application / library /' . $ Name. '.php...

jquery datatables adding row_selected class to a row -

I have a table that is coming up with some data. One of the pillars is a combobox in which there is information of the year. When click on the row, it is automatically selected. However, when I change the combo of the year, the selection disappears (which is normal). Whenever there is a combo change I should select the row again. Both the click functions and the combo changes function are given below: $ ("# rulesTable tbody"). Click (function (event) {$ (rulesTableGlobal.fnSettings (). AoData) .each (Function () {$ (this.nTr) .removeClass ('row_selected');}); $ (event.target.parentNode) .adclose ('row_selected'); var row = getSelectedRowIndex (rulesTableGlobal); var selected yuan = $ ('# ComboYear' + row + 'option: selected'). Text (); var properties id = rulesTableGlobal.fnGetData () [ Line ([']'; ' ;}); // combo changes, attemps with all my attempts to add any of those lines to the square. $ ("# comboYear" +...

c# - How to get range from excel binary data stored in db -

I can excel binary data in saved in SQL Server 2005, now I get pre-("A" to "O") binary data in the selected category, how to get it in C # You must save binary data in a file, then open the file using your program using "Visual Studio Tools for Program" And Excel objects to obtain data in cells Use methods Odl.

network programming - Real-time Transport Protocol is not used in youtube? -

Image
I came to read about the real time protocol in Wikipedia, in which the following is mentioned: "In RTP communication and entertainment systems It's used extensively that includes streaming media " I was curious about this protocol and wanted to see it in Wirehark. I thought that youtube.com is using RTP while playing the video, but was surprised to see that only a TCP packet is being sent when a video is being played Do any other free website It can tell which RTP applies, so that I can see it in the wires. (I really want to explore Network Optimization Opportunity using RTP because it is OK to loose some packets in my server applications) , the RTP is the payload of the UDP (or TCP), as the book points out. Here is a picture of the book: , only RTP on UDP can be detected by WireShark (thanks)

Iphone graphics -

Can anyone give me simple code to create a line in the mirror? Edit: The code for the picture below is line - (Zero) Direct: (CGRTact) rect {CGContextRef c = UIGraphicsGetCurrentContext (); CGflotTl [4] = {1.0F, 0.0F, 0.0F, 1.0F}; CGContextSetStrokeColor (c, red); CGContextBeginPath (c); CGContextMoveToPoint (C, 5.0F, 5.0F); CGContextAddLineToPoint (C, 50.0F, 50.0F); CGContextStrokePath (c); }

resize - Thumbnail creation in Java -

I want to make thumbnails for a group of images, for that I am using the following code. Public Zero Run () {try {bufferedImage originalImage = ImageIO.read (new file (url)); Int type = original image.tatype () == 0? BufferedImage.TYPE_INT_ARGB: originalImage.getType (); IMG_HEIGHT = (Original Image. Giant (* 600) / Original Image. Geteworth (); Buffetedesize resizemage.gpg = resize image (original image, type); ImageIO.write (resizeImageJpg, "jpg", new file (thumbs)); OriginalImage.flush (); ResizeImageJpg.flush (); System.gc (); } Hold (IOException e) {System.out.println (e.getMessage ()); System.out.println ("not created:" + url); }} Private static BufferedImage resizeImage (BufferedImage original image, int type) {BufferedImage resizedImage = new BufferedImage (IMG_WIDTH, IMG_HEIGHT, type); Graphics 2DG = resized image. Categorization (); G.drawImage (original image, 0, 0, IMG_WIDTH, IMG_HEIGHT, empty); G.dispose (); System.gc (); Refunded image; } Thi...

Increase timeout for tiles in OpenLayers -

I have an open layers XYZ-layer, while loading the layer, some tiles are not visible. However if I reload the tile it shows (AKA, nothing is wrong with the tile) I think Open Layers have any kind of timeout mechanism, and will not render the tile If it takes too long. Do anyone know how to increase timeouts? I think it is not possible to do this I had only one problem a few months ago , And I found the best solution Open Layers IMAGE_RELOAD_ATTEMPTS was set to be fixed. Open Layer IMAGE_RELOAD_ATTEMPTS is a variable to specify how often you want to try to reload the tiles when its expired. You just need to include this sentence at the top of your sentence and play with your value to set the best for you: Open Layer. IMAGE_RELOAD_ATTEMPTS = 5; I hope it helps.

Launching IE 9 64bit using selenium grid -

I want to use IE 9 64bit with selenium grid, but when I have a new RC with environment . Client starts * iexplore opens it i.e. 32 bit version so i want to know how to run your test cases on the 64 bit version of ii. "* i.e. Explorer C: \ program files \ Internet Explorer \ iexplore.exe" I think

mysql - TRIGGER based on spatial data -

मेरे पास pano_raw नामक एक टेबल है जिसमें 3 कॉलम अक्षांश, एलएनजी, और लैटलांग है। lat और एलएनजी सिर्फ दशमलव (10,3) और लेट्लेंग एक स्थानिक सूचकांक प्रकार POINT है। यह एक ऐसा उदाहरण बयान है जो अक्षांश और एलएजी के आधार पर डेटाबेस को अपडेट करेगा। pano_raw (latlng) मूल्यों में INSERT (GeomFromText ('POINT (-72.34 32.45)')); मैं ऊपर दिए गए बयान के आधार पर एक ट्रिगर तैयार करने का प्रयास कर रहा हूं, जो स्वत: अपडेट हो जाएगा जब मैं एलटी और एलएनजी को अलग से अपडेट कर दूंगा। क्वेरी के विशिष्ट होने के बाद से एसक्यूएल के साथ हर बार स्थानिक डेटा कॉलम को अद्यतन करने में यह एक दर्द है। ट्रिगर (सिद्धांत में) लिखना बहुत आसान होता है जो अद्यतन होगा जब मैं तालिका में एक साधारण दशमलव मान लिखूंगा। मुझे जो समस्या है वह वाक्य रचना के साथ है I यह मेरा सबसे अच्छा (2 घंटे का शॉट है)। SET @sql: = CONCAT ('POINT (', pano_raw.lng, ', pano_raw.lat,') '); प्रत्येक पंक्ति के लिए pano_raw पर INR से पहले ट्राइगर trig_pano_raw बनाएं SET pano_raw.latlng = GeomFromText (@sql)); सम...

Cherry Py - Return output as XML in Python -

My intention is to implement a web service in Google App Engine. I am using CherryPy because it is very easy to understand. import sys.path.insert (0, 'cherrypy.zip') Import Cherrypy Import Expose Class Converter from CheroePop: @expose Def Index (self): Returns "Hello World!" @expose def fahr_to_celc (self, degree): temp = (float (degree) - 32) * 5/9 return "% .01f"% temp @expose def celc_to_fahr (self, degree): temp = float (degree) * 9 I would like to know how to return output in XML format, such as & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Root & gt; & Lt; Answer & gt; Hello World! & Lt; / Answer & gt; & Lt; / Root & gt; I'm starting in Python, please help me. Hariharan I had a similar problem. My solution was to use xml elementtree, it was something like .... #elementtree is stored in weird places ... it mostly tries to: import xml.etree As Elemen...

java ee - Offering EJB to clients using HTTP -

I am developing a server that persists in customers connecting through HTTP. Customers will be based on various technologies: Web, iPhone and Android; So I thought of using HTTM in the first place (maybe it's a better way). In the server, I am using Java 6 implementation with EJB and JPA to achieve my firmness goal. Servlets are just a dummy proxy to provide access to EZB interfaces to clients, so I Sure, my client should have a framework or better way of serving as an EJB service. I am trying to find a way to avoid all the dummy proxy servicelet. You can apply

JavaScript on jsfiddle.net -

Image
You will see a lot of this code below that is an addEventHandler function that runs on window load. If I want to test it on jsfiddle.net then how can I change this code, keeping in mind that the page does not load on jsfiddle.net is here Please be aware That I am a newbie, so try to answer as much as possible. Thanks Function addEventHandler (Onode, EVT, OFFIC, BACKACTURE) {if (window.attachEvent) oNode.attachEvent ("+" + EVT, oFunc); Other Onod.Edit Listener (EVT, OFFIC, BICACHTURE); } Function getEventTarget (e) {if (window.event) returns window.Event.SeventElement; And e.target back; } Function div1Handler (evt) {var e = evt || Window.event; Var target = getEventTarget (e); Event handler for Var str = "div1, target:" + target.getAttribute ('id') + ", type:" + e.type; If (E.EventFace) str + = "; Step:" + E.EventFash; Warning (STR); If (e.cancelBubble! = Null) e.cancelBubble = true; E. Eastopprogation (); } Function div2Handler ...

java - Where does the XXX comment prefix in Eclipse come from? -

Why was I just wandering XXX ? So far as I know that Notes / Reminders (or at least this is what I use for it and for most people used for this type of link it is used We do). So does anyone know that the XXX prefix came from? from: A marker that needs attention Generally, programmers are used to indicate the areas to be used in the comments. Some hackers explained 'XXX' with a comic heavy-movie movie rating. make comparisons.

java - Reading a XML File from a servlet class and displaying it on JSP page -

First of all I would like to know whether my view is correct or not. I have products that are stored in an XML file. I am reading this file and storing the products so that I can pass it on the JSP page. Here is my Product.xml file I should also know what kind of data structure should be used. Since the product page, I have to add a cart button for each product. & lt; Inventory & gt; & Lt; Products & gt; & Lt; Name & gt; Dictionairy & lt; / Name & gt; & Lt; Details & gt; Words from the English language & lt; / Description & gt; & Lt; Price & gt; 400 & lt; / Pricing & gt; & Lt; / Products & gt; & Lt; Products & gt; & Lt; Name & gt; Calculator & lt; / Name & gt; & Lt; Details & gt; Number of resolutions & lt; / Description & gt; & Lt; Price & gt; 1000 & lt; / Pricing & gt; & Lt; / Products & gt; & Lt; Products & gt; & Lt; Name ...

regex - How to match Arabic Unicode characters in a string with Java? -

All of the Greetings; I have a desktop Java application that gives the following output in the console window: [["Eve": "Ana" "HWS": ["\ u0623 \ U0646 \ u0627 "]}] I would like to strip this string:" \ u0623 \ u0646 \ u0627 "to proceed further on this string, from the whole output. I do not know how to do this? But one of the ideas is to use Reggae but how can I do this? Would you help me? Additional information Output will not be arabic characters \ u064A. . e.t.c. My idea was to find the output \ u064 A ... to line up and convert them to Arabic. Are you my thing I do not know how to solve it, I'm starting in Java. Sorry for the illusion and thanks for your feedback. And that input comes from you, you can solve it like this: import java.net *; Import java.io * *; Import java.util. *; Import java.util.regex *; Public class URLConnectionReader {public static void throws exceptions {URL googleUrl = new ...

.net - Entity Framework upgrade from v4 to v4.1(RC) -

is out Can an upgrade break the 4 to 4.1 changes? Now is there any good reason not to start working on upgrades? ? Any warning? You do not need to upgrade. EF 4.1 is the only additional library, it is primarily included DbContext API Code-First Development Approach The code- Not what you are looking for is the moment. If you are using the ObjectContext API and EDMX + POCO T4 template, then you can continue with it. EF 4.1 from its perspective has only different APIs to do the same function. There are some benefits (but there are some missing features) but there is no reason to work on the project already running. You can use some features from EF 4.1 in parallel with your EF 4.0 code - for example Insert strong code available on the IQueryalbe interface extension method.

How to post a photos on facebook through iPhone app? -

I am trying to post an image on facebook but have not been successful yet, my codes are: - (zero) posttrack {IIM IIM = 1; NSDTA * MyMagatta; MyimgData = [NSData DataWidth Contentoff: saveImagePath]; // pstimg = myimg data; NSArray * chunks = [separable string from pstimg components: @ "."]; NSString * atch = [section ObjectEntIndex: 0]; NSString * filePath = [[NSBundle main bundle] pathForResource: atch ofType: @ "jpg"]; IMG = [[UIImage alloc] initWithContentsOfFile: filePath]; // Start FBDialog * Dialog = [[[FBstream Dialog Alloc] init] autorelease]; NSString * str = @ "Hello"; Str = [Str String Bayer Recording Okurrenceoffstring: @ "" with string: @ "+"]; Dialog.cmessage = str; Dialog.userMessagePrompt = @ "Enter your message:"; [Dialog show]; NSDTA * search; // Edit from here (IM == 1) {findata = myimgData; } Other {findata = (NSDT *) img; } NSMutableDictionary * param = [Object Endake with NSMutableDictionary Dictio...

c# - How to define a property whose type in database is bit? -

I have a source of type bit in the database but I want to set my value in my program. How can I do that? I know it was a simple doubt but I was a little confused. Do I have to use a byte when setting this way or not? Anyone can help me immediately. Use for representation bits from the database: ), the bit mapped to the default by bool Will go

xcode4 - Xcode 4 new functions - which one do you use, and which one you don't? -

With the new XCode 4, some new functions have been introduced. Which of these new tasks does you often use? Which do you use and why? For those people, you can tell that whatever you do is more than using new ones provided for you and why is it more and more? There is a great one that I totally agree with (including part about document changes).

c# - Run / execute Exchange 2010 Inbox Rules by code -

Is anyone likely to run / run the Exchange (2010) Inbox Rule by code? Not in Outlook, it must be running on the server, the best EWS I do not think so. You can parse the terms and actions of the rule and execute them against a specific message or group of messages.

android - Loading Images From Remote Server? -

I have many images on some of my activities, and all of them are connected to remote servers. The problem every time I go to one of these activities in which images break away from the remote. All images should be loaded first or else you will get a black blank screen. Sometimes it takes around 1-5 minutes to load, and sometimes even closes the device, can I fix this issue anyway? Here's the code I'm using: ImageViewimgView = (ImageView) findViewById (R.id.image01); Drawable drawable = LoadImageFromWebOperations ("http://forum.roda.hr/images/customavatars/avatar10164_2.gif"); ImgView.setBackgroundDrawable (drawable); Private Dry Load Load ImageWebWeb Operation (string URL) {try} {InputStream = (InputStream) is the new URL (.org) .getContent; Drawable d = Drawable.createFromStream (is, "src name"); Return D; } Hold (exception e) {System.out.println ("exc =" + e); Return tap; }} I am trying to understand it, please help me, really matters...

How do you get assembler output from C/C++ source in gcc? -

How does it? If I want to analyze how something is compiling, how will I get the emission code emitted? Use the -s option for GCC (or G ++ ). gcc -s helloworld.c This will run the preprocessor (cpp) on helloworld.c, stop the initial compilation and then before executing the assembler . By default this will output a file to helloworld.s . The output file can still be set using the -o option. gcc-s-o my_asm_output.s helloworld.c This only works if you have the original source optional If you only have the result If the object is the file, then - disassemble option (or -d form briefly) using objdump . obzump-s - dysassable hellcarold & gt; This option works best if the debugging option is enabled for the Helloworld.dump object file (at -g compile time) and the file is not snatched . Running file helloworld gives you some prompts as the level of detail that you will get by using objdump.

iphone - selected view in UITabBar -

How can I find out when a user selects an item in the tab bar? I want to run some commands every time, when users select the second or third tab bar view. (I have a tab bar based project, and tabbar items are selected in View Controller Interface Builder) I have solved this issue with the use of" viewWillApear: (BOOL) animated "method of each view.

c# - LoadLibrary call from MVC application running in IIS -

I have a problem executing this line of code in my MVC application: Code> IntPtr HModule = Load Library (Bondprovy settings. AssessmentFilePath); The problem is that hModule is always 0 . If I run the same code with the same value for BondProbeSettings.AssemblyFilePath , but instead of MVC app hModule instead of a console application, non-zero Should I consider any security issue? The signature for the load Libre is: [DllImport ("kernel32.dll", chartset = CharSet.Auto)] Static extern IntPtr LoadLibrary (string lpFileName); Change the announcement to: [DllImport ("Kernel32.dll", Charset = Charset Auto), SetLastError = true)] Static Extern IntPtr LoadLibrary (string lpFileName); And your code: IntPtr hModule = LoadLibrary (BondProbeSettings.AssemblyFilePath); Throw new system (hModule == IntPtr.Zero). ComponentModel.Win32Exception (); Now you will know why it does not work.

AlertDialog in android -

मैं AlertDialog दो EditText और 2 TextView ? custom_dialog.xml & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8"? & Gt; & Lt; LinearLayout एंड्रॉइड: ओरिएंटेशन = "क्षैतिज" एंड्रॉइड: एंड्रॉइड: एंड्रॉइड: एंड्रॉइड: padding = "10.0dip" android: layout_width = "fill_parent" एंड्रॉइड: layout_height = "fill_parent" xmlns: android = "http: / /schemas.android.com/apk/res/android"> & Lt; TextView android: layout_width = "fill_parent" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: text = "Libellà ©" android: id = "@ + id / text_libelle" / & gt; & Lt; EditText android: id = "@ + id / edit_libelle" एंड्रॉइड: layout_width = "wrap_content" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: टेक्स्ट = "" / & gt; & Lt; EditText android: id = "@ + id / edit_ url" एंड्रॉइड: layout_width = "wrap_c...

Binding multiple objects in a Spring form -

I have a problem getting the correctness of my JSP footwear. I intend to do what is included in a list that contains questions and Each question object is a list with a text field and option. My intention is to be able to edit multiple questions (both enable the text of the question / edit the name and edit the option containing.) My backing object is now Sending a list question. Here is my JSP which is failing with illegal property, Bean class. & lt; Form: Form CommandName = "Question" & gt; & Lt; Form: Errors Path = "*" & gt; & Lt; Fieldet class = "stdframe" & gt; & Lt; Story & gt; Question & lt; / Narrative & gt; & Lt; / Fieldset & gt; & Lt; / Form: Errors & gt; & Lt; Div class = "stdframe" & gt; & Lt; C: forEach var = "q" item = "$ {query}" varStatus = "s" & gt; & Lt; P & gt; & Lt; P & gt; Question: & lt; / P ...

mysql - Get last auto inserted ID in identity column from DB Using Entity Framework -

I am using the code to get the newly entered ID in the Auto-identity column from the database. Using (TESTNTS institutions = new testtyte) {T2T2 = new T2 (); T2.Value = "Some Value"; Entities.AddToT2 (T2); Entities.SaveChanges (); Console.WriteLine (t2.id); } When I add my application to MS SQL, then it is working fine, but if I'm connected with MyScall, it always returns 0 (zero). How to get the last entered ID to use another Entity Framework? Thank you ... Retrieving record IDs after SaveChanges I had to change the identity system. I am using Visual Studio 2010 and Tele-Open Asset ORM. Open the unit model diagram in Visual Studio. Right-click on the interest table and select Properties. The identification mechanism property is set in database serverclub.

formatting - In VS 2010, "Format document" command (ie: Ctrl-k, Ctrl-d) swap tabs to spaces althought set reverse in options -

आप Visual Studio 2010 में "फ़ॉर्मेट दस्तावेज़" कमांड (यानी: Ctrl-k, Ctrl-d) का उपयोग करते हुए, अंतिम परिणाम एक ऐसा दस्तावेज़ है जहां मेरे सारे टैब रिक्त स्थान के साथ स्वैप किए जाते हैं जो कुछ भी हो, मैंने उपकरण-विकल्प-टेक्स्ट एडिटर- C # -Tabs को इस प्रकार सेट किया है: मुझे अपना बग मिला। यह मेरी सभी XAML फाइल के साथ था, जिसमें मेरी समस्या थी मुझे एहसास हुआ कि मेरे बग को ठीक करने के लिए 2 differents तरीका है: सामान्य दस्तावेज़ के लिए "टैब" विकल्प सेट करें (यदि आपने XAML "टैब" विकल्प को संशोधित नहीं किया है)। XAML विकल्प अनुभाग में सीधे "टैब" विकल्प सेट करें। धन्यवाद एरिक

ruby - How does rescue_action in Rails3 work? -

मैं इसे लागू करना चाहूंगा class securitytransgression & lt; मानक त्रुटि; अंत डीईफ़ सुरक्षा सुरक्षा उल्लंघन बढ़ाते हैं जब तक ... अंतिम श्रेणी ApplicationController & lt; ActionController :: बेस def बचाव_एक्शन (ई) केस ई जब सुरक्षा सेगमेंट सिर: वर्जित एंड एंड एंड से। समस्या यह है कि यह काम नहीं करती है। मैं एक प्रतिबंधित पृष्ठ नहीं देख रहा हूँ लेकिन मानक रेल त्रुटि पृष्ठ "MyController # कार्रवाई में सुरक्षा उल्लंघन" है मैंने खुदाई की है कि कुछ बचाव_आवेशन विधियों केवल उत्पादन मोड में काम करता है। मैंने कोशिश की और यह वही है। कोई बदलाव नहीं। मेरा प्रश्न : क्या बचाव-क्रिया विधि (और अन्य) के कोई भी अच्छा दस्तावेज़ हैं? रेल 3.0 के तहत यह काम करता है? क्योंकि ऐसा लगता है कि यह कुछ पुराना है बचाव में से एक पर नजर डालें।

java - How to JUnit test for object immutabily? -

मेरे पास इसके जैसा एक तरीका है सार्वजनिक शून्य विधि (अंतिम वस्तु ए) { ....} अब मैं एक परीक्षा लिखना चाहता हूं जो ऑब्जेक्ट A हमेशा सुनिश्चित करता है कि वह हमेशा अंतिम होता है। मैं इस तरह के परीक्षण कैसे लिखूं? मुझे डर है कि आप यह नहीं समझते कि आपकी विधि क्या करती है किसी विधि में एक अंतिम पैरामीटर का अर्थ है कि पैरामीटर को विधि में फिर से निर्दिष्ट नहीं किया जा सकता है। सार्वजनिक शून्य डस्टफर्म (स्ट्रिंग्स) {s = "OK"; } लेकिन सार्वजनिक शून्य doStuff (अंतिम स्ट्रिंग्स) {s = "त्रुटि निर्दिष्ट नहीं की जा सकती क्योंकि यह अंतिम है!"; // कारण त्रुटि} ऐसे में, कोई ऐसा व्यवहार नहीं है जो परीक्षण कर सके। यदि यह मान्य नहीं है तो यह संकलित नहीं होगा। संपादित करें: यदि आप चाहते हैं कि आप अंतिम के लिए इकाई परीक्षण करें, तो संभव है कि यह संभव नहीं है क्योंकि मेरा मानना ​​है कि संकलन के समय सूचना खो जाती है एक बार इसे आंतरिक रूप से चेक किया जाता है।

php - Problem with foreach loop -

मैंने यह कोड बनाया है: $ matches = array (); Preg_match_all ('/ "प्रकार": "। +?", /', $ Text, $ matches); विदेशी मुद्रा ($ मैच [0] $ मैच के रूप में) {अगर (isset ($ _GET ['DVD']) & amp; खाली ($ _GET ['DVD'])) {$ dvd = $ _GET ['dvd' ]; अगर (स्ट्रिपोज़ ($ मैच, 'डीवीडी')! == गलत) {$ match = ''; }} Echo $ match; } इस कोड में मैं $ टेक्स्ट में "टाइप" शब्द खोजता हूं और यह पूरी लाइन को सरणी में इसके आगे के शब्दों के साथ संग्रहीत करता है। और फिर मैं प्रत्येक के माध्यम से लूप और देखें कि शब्द डीडीडी है यदि ऐसा है, तो इसे हटा दिया जाता है और एक रिक्त पंक्ति प्रदर्शित होती है। अब मैं निर्माता को मानने के लिए खोज करना चाहता हूं और उसे हर प्रकार के नीचे प्रदर्शित करना चाहता हूं। परिणामस्वरूप लगता है: प्रकार: HDD निर्माता: WD प्रकार: फ्लैश ड्राइव निर्माता: ट्रांसकंड प्रकार: सीडी निर्माता: सोनी तो मैंने इसे करने की कोशिश की एक और preg_match_all अभिव्यक्ति डालकर: $ anotherMatch = array (); Preg_mat...

java - Spring3 Security JDBC how to load connect info -

I am working on the sample 2 weeks now and I was working on this, but datosorcing was done on applicationcontext, but now I am unable to load the connection information from my file. I have coded it hard and it works, but I would like to load it with a file. Someone can tell me what I'm missing from my AppicationContext to work .. Thank you ApplicationContext-Security.xml & lt; Beans: Bean id = "data source" class = "org.springframework.jdbc.datasource.DriverManagerDataSource" & gt; & Lt; Beans: property name = "driverClassName" value = "$ {database.driver}" /> & Lt; Beans: property name = "url" value = "$ {database.url}" /> & Lt; Beans: property name = "user name" value = "$ {database.user}" /> & Lt; Beans: property name = "password" value = "$ {database.password}" /> & Lt; / Beans: bean & gt; has been changed to the...

cygwin ssh batch script for windows 2008 -

Sigwin is configured in Windows Server 2008, now we need to implement automation, I'm writing a batch script to add the user to the signin \ etc \ passwd using the following command mkpasswd -l -u% username% -p / home & gt; & Gt; / Etc / passwd Please help me to execute the following CMD in the batch file c: chdir C: \ cygwin \ bin bash - Login -i mkpasswd -l -u% Username% -p / home & gt; & Gt; Windows and Unix mix in your windows batch file is running as a Windows command, such as the mkpasswd command in Windows / etc / passwd There is no concept and throws an error, maybe something like that; D: \ cygwin \ bin> mkpasswd -l -u testusr -p / home & gt; & Gt; The / etc / passwd system can not detect the specified path Looking at what you are doing with mkpasswd I suggest that you find a way to run your automation from within Saigwin. Probably the establishment of a

android - How can i use ShowDialog? -

I was reading about Android, and this was a method ShowAlert, but a friend tells me that ShowAlert is in ShowDialog Was updated but I do not know how to use it. Someone can tell me how I can use it ??? Thank you! In Android, you can create the following types of dialog: AlertDialog ProgressDialog DatePictureDialog TimePictureDialog In addition you can also create your own custom dialog. You will need to use the Class Alert Dialog for the change dialog. You can set the properties of the warning dialog by creating the builder of the dialog: AlertDialog.Builder builder = new AlertDialog.Builder (this); You can now set some properties of this builder by using some functions like SetMessage (), setCancelable (), setPositiveButton (), setNegativeButton () etc. The last step is to create your dialog for: AlertDialog alert builder.create (); And then you can use alert.show () to display your alerts.

javascript - Problem with jquery appendTo function -

There are several textures on my page and I use the jquery Focus function to clean textarea False (function () {if ($ (this) .attr ("has_desc") == "false") {code is: $ (" Textarea.text ") {$ (this) .val (" "); $ (this) .attr (" has_desc "," true ");}}); The user has the ability to dynamically add new textres and I use the attachment function to add a new one. The problem is that the above code does not work for the attached texts! HTML code is exactly what is not dynamically added! Can anyone please tell me what is the problem? . Focus will not work for dynamic elements you can use. ('Focus', function) ...

javascript - Converting ascii to text -

How do I take an ASCII code and convert it to my character using Javascript? I am in the nested loop and need to label each loop 1A, 2A, 1B, 2B, etc., and I would like to save every character from code coding using the statements. You can use String.fromCharCode (ascii_value) This is a plain JavaScript though. If you want to use the hex number, then convert them to decimal before using parseInt, such as: parseInt ("ff", 16)

Update query in Microsoft Access 2007 -

I need to update many fields in the table. If I already have data in a field, then I will see the data in the next field I want to insert Example: Date 1 Date 2 Date 3 If date 1 has a date, then fill Date 2, if Date 1 and Date 2 have a date then populate Date 3 and in the same way. . update table set date2 = IIF (not IsNull (Date1), SomeDateValue, Date2 ), Date3 = IIF (not IsNull (date1) and not IsNull (date 2), some date-wise, date 3) Other criteria is true if date 2 or date 3 should be determined The question about is unclear. In this case, I thought that some value ( SomeDateValue ) is not mentioned.

javascript - Can anyone tell me why this .SWF loads fine into IE but not firefox or chrome? -

Why is this SWF loaded via Javascript? This is a required browser HTML: & lt ;! DOCTYPE HTML Public "- // W3C // DTD XHTML 1.0 Transcription // N" "http: //www.w3 org / TR / xhtml1 / dTD / xhtml1-transitional.dtd" & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en" lang = "en" & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = utf-8" & gt; & Lt; Title & gt; Host & amp; Nbsp; Log-in & lt; / Title & gt; & Lt ;! - saved from url = (0014): Internet - & gt; & Lt; Style type = "text / css" & gt; Body {background color: #FFFFFF; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body style = "margin: auto;" OnLoad = "javascript: sf.focus ()" & gt; & Lt; Br / & gt; & Lt; Script type = "text / javascript" language =...

How to represent a blueprint with clickable areas in Android -

I need the direction of getting the following guidelines: I have a template that includes specific zones that clicked For zoomable (sequentially clickable areas), I also need a blueprint. Is it better to have 2D graphics, plain Java code or XML rendering, or other method? Unfortunately, there is no built-in widget or functionality that supports this. To handle resizing zooming / panning / clickable area, you probably have to type a custom code. This tutorial might be a good starting point: But at zooming you have to handle size modifications on clickable areas. Perhaps consider using OpenGL for it, though it would be an overkill that I think.

java - Shoutcast media metainfo updates -

Hi, I've implemented the Shoutcast streaming protocol to get stream metaffe (as described on the Web). I get a string with the title of the song and the author, but during the stream, what happens when a song ends, another begins .. How will I recognize that the song has ended and gets the new metaInfo? How is it applicable to other players? They immediately present the title of the current song because it changes in stream ..? It should help: In short: when metadata is requested Then you will get the Metadata block after each N byte of the stream (the N is back in the header reader) the server connects and blocks the metadata after the song changes.

javascript - Why is my function not working? -

Now that I have other questions, this function is not working. What is wrong? function myFunc () {return {obj = this; }; } JavaScript is not currently being functional because the semicolon is added automatically. Your return statement is being read as Javascript: back; {Obj: this; }; You must return { return : } to the same line) Obj: this; }; In addition, objects should be {name: value} .

Android pre-3.0 memory question -

I have read that stack is done before 3.0 data like bitmap outside the heap. But where is it actually stored? And how can I recover the amount of memory consumed by my bitmap? Everything about OOM are located in the original pile. for more information . You can get runtime information about the local heap using these methods.

Core Animation with custom view -

मुझे निम्न drawRect: विधि के साथ एक दृश्य उपवर्ग मिला: - (शून्य) ड्रॉरेक्ट: (सीजीआरएक्ट) रीक्स्ट {[myBackgroundImage drawInRect: rect]; ... // अधिक, स्ट्रिंग्स, लाइन, आदि जैसे जटिल ड्राइंग।} मैं एक पृष्ठभूमि छवि संक्रमण को किसी अन्य पृष्ठभूमि छवि को चेतन करना चाहता हूं, जबकि शेष दृश्य ऊपर खींचना चाहते हैं पृष्ठभूमि छवि एक समान रहती है मुझे यह कैसे करना है? क्या मुझे एक अतिरिक्त CALayer ? ऐसा लगता है कि आप एकाधिक उपयोग कर सकते हैं परतें: प्रत्येक पृष्ठभूमि के लिए एक और बाकी के लिए एक अग्रभूमि में शेष। ताकि आप अलग-अलग प्रत्येक परत पर एनिमेशन और परिवर्तन लागू कर सकें। यह एक समाधान है कि मैं सफलतापूर्वक फ्लेक्स में स्प्राइट के साथ प्रयोग कर रहा हूं: अलग-अलग ग्राफ़िकल वस्तुओं का उपयोग कर एक प्रदर्शन सूची का आयोजन किया है जो एक दूसरे से ऊपर स्तरित है और घूमने / घूर्णन / लुप्त होती है और जो भी उनमें से किसी पर लागू होता है। डिजाइन सिद्धांत यह आईओएस सहित सभी ग्राफिकल वातावरणों में काम करना चाहिए। एक बात ध्यान में रखना: बच्चों के सुपरलेयर पर लागू परिवर्तनों को एक ही बार ...

Relative paths for git-svn SVN authors file? -

I have cloned a SVN repository by working using git-svn. During the initial cloning, I provided a SVN authors file. When I initial cloned, git had set the author file as a full path though, I keep copies of this GIT repository on a machine and laptop and copies of copies (they two Not a separate clone, but a single clone). The path of my GIT is different on the repository work machine and laptop, which means that the author file will not be found on the work machine, where the full path is invalid. Git-svn should accept a relative path to the author file, instead, so that authors' file is always found and I can safely read git svn rebase and git SVV DCIT Either by the machine? When I initially cloned, set git Authorsfile as a full path. You can change it in a relative path. If you open the .git / config file in a VIM or a text editor, you can edit it relative to the .git folder. By doing this, you should allow the same authors file to be used on all your...

Firefox Extension - How to use preference for a menulist? -

मैं की स्थिति को सहेजने के लिए टैग & lt; वरीयता & gt; कोड> & lt; menulist & gt; । लेकिन मुझे पता नहीं है कि मैं क्या गलत कर रहा हूं। यहां मेरा कोड है: & lt; प्राथमिकताएं & gt; & Lt; प्राथमिकता आईडी = "चुनिंदा pref1" नाम = "प्राथमिकता। नाम" प्रकार = "इंट" / & gt; & Lt; / वरीयताओं & gt; & LT; menulist & gt; & Lt; menupopup वरीयता = "चुनेंpref1" & gt; & Lt; menuitem label = "option 1" value = "1" / & gt; & Lt; menuitem label = "option 2" value = "2" / & gt; & Lt; menuitem label = "option 3" value = "3" / & gt; & Lt; menuitem label = "option 4" value = "4" / ​​& gt; & Lt; / menupopup & gt; & Lt; / menulist & gt; मुझे पूरा यकीन है कि आप ऐसा नहीं कर सकते आपको बस प्रत्येक मेन्यूम्स पर एक आदेश को जोड़ना होगा, जो वरीयता को बदलता है आप "पॉपअपशोइंग...

add watch not working in Visual Studio 2010 -

मैं 1 घड़ी विंडो में राइट-क्लिक करें और वॉच जोड़ें लेकिन कुछ नहीं होता है। यह बहुत unintuitive है यह कमांड एक नई पंक्ति जोड़ने और उसे चुनने से परे कुछ भी नहीं करता है। आप अगले चर का नाम टाइप करेंगे अधिक सहज ज्ञान युक्त संपादक विंडो में एक आइडेंटिफ़ायर नाम पर राइट-क्लिक करना + वॉच जोड़ें या खींचें + उसे घड़ी विंडो में छोड़ दें।

command line - Yii Shell history using up and down arrows -

I have searched a lot for some things, to enable history for how to open Yii but I could not find anything . When Ruby is developed on Rail, I often use the console which keeps history after connecting with any one. I'm bad now and I need it Yii! If it is not in existence, then I am willing to try to make it myself, but I thought I would ask in advance since I am new. I looked for a while I found nothing answered: make it self, sorry.

Ruby Koans: explicit scoping on a class definition part 2 -

I wanted to clarify some things from this origin. The answer is suggested that Ruby for constant definition in this order: attached scope any external scope (Repeat until it reached the top level ) module object kernel To clarify, at what phase (1-6) is found continuous LEGS legs_in_oyster ? Is this superclass animal ? Is the class MyAnimals been ignored because it is not considered an attached scope? Is this clear because of the definition of MyAnimals :: Oyster class? Thank you! Just trying to understand here is the code: class animal lags = 4 def pi_in_anel legs and class nestedAnimal def pI_Insted_Animal Legs and end FI test_nested_classes_inherit_constants_from_enclosing_classes assert_equal 4, animal :: nested enmil.new Legs_in_nested_animal and # ----------------------------------------------- ------ ------------- Class MyAnimals Legs = 2 square birds & lt; Animal def 2 assert_equal foot end end end def test_who_wins_with_both_nested_and_in...

wcf - Visual Studio project type for DTOs that should be accessible in Silverlight -

Which VS The project type should be selected so that the data-transfer objects that I create in it can be accessed in both my Silverlight project as well as my WCF service project. (Instead of making VS in my CRLLITE project, I want to be able to reuse the DTO defined in both projects, reference to the web service for the WCF service). IE, my question is, can this project be a Windows class library, or should it be a Silverlight Class Library (so that my Silverlight project as well as WCF project). You have three main options: Two Share the files between class library projects (targeting a silverlight, other .NET framework), and files between them, as I discuss in this article: Create your class library as a silverlight class library. SerialLite applications can not complete class libraries which are full .NET frames Target Rk, but the full .NET Framework (such as Dblusif service) refers to applications that target class libraries (typically) which target the Silve...

statistics - Entropy and Information Gain -

I hope simple questions. If I have a set of such data: Classification Specialty-1 attribute-2 perfect dog dog right dog dog wrong dog cat right cat cat Wrong cat dog wrong cat dog Then what is the benefit to notice of the attribute -2 related to the specialty -1? I have calculated the entropy of the whole data set: - (3/6) log2 (3/6) - (3/6) log2 (3/6)) = 1 Then I'm stuck! I think you need to calculate the attributes of attribute-1 and attribute-2 as well. Then do these three calculations in the calculation of profit? Any help will be great, thanks :). Well first you have to calculate the entropy for each attribute, after that you calculate the information profit Do just give me a moment and I will show how it should be done. for attribute -1 attr-1 = dog: info ([2c, 1w]) = entropy (2 / 3,1 / 3) attr-1 = Cat Information ([1C, 2V]) = Entropy (1 / 3,2 / 3) The value of the attribute -1: Information ([2C, 1V], [1C, 2o]) = (3/6) * Information ([2C, 1...

autocomplete - Auto append/complete from text file to an edit box delphi -

I am trying to create an edit box and I want the text entered during typing to auto-fill Able to do. The text will be added with a "suggestion" from a text file. Let's say that my suggestion file contains: Marilyn Monroe Marlon Brando Mike Myers As I started typing "M", in the edit box, the rest highlight ( Or not) will appear: "Arylin Monroe" and as I keep typing "MI", then "the myers" will appear in the end, I hope I am making this obvious enough for you! Thanks for your help! You can use this feature easily. Dropbox in your code Autocomplete set the property to True In Follow the steps: sorted property correct style property to csDropDown Set onext combobox event adds a code like this const MaxHistory = 200; // Maximum processing of items TForm1.ComboBoxSearchExit (Sender: Toबेस); Start / check that if the text in the written form is entered, then do not add it to the list (trim (combobox...

CRUD in ASP.NET MVC 1 vs MVC 3 -

O People I'm at www.asp.net It has been written for ASP.NET MVC1. Although most of the stuff works for MVC3, I have a question about this code: ASP.NET MVC 1.0 (directly from the tutorial) ( [AcceptVerbs (HttpVerbs.Post)); {_entities.AddToContactSet ( Try contactToCreate; _entities.SaveChanges (); Return Redirect Action ("Index");} Hold {Return View ();}} ASP.NET MVC 3 ( Microsoft Action Project by Micro 3 project generated by Microsoft 3 Project) [HTTP post] Create public action roles (try {_details.edu.contacts (collection); // sync Error: Error: Check Changes (); Return Redirect Action ("Index");} Hold {Return View ();}} So my question is that in the first case Contact Contact Contact why pass Es, but form Collection in the other? I can easily replace the argument in another example, just contact the contact contact. , but I'm curious about what is this collection of archives stuff? Why did MVC 3 make it for us? If it is pos...