Posts

Showing posts from May, 2011

transparency - Delphi + Transparent forms with parent -

I want to create a form, but use it to keep an image (like a splash form) I use these lines to create a form like this: SetWindowLong (handle, GWL_EXSTYLE, LexStyle or WS_EX_LAYERED); UpdateLand window (handle, 0, zero, @litmap size, LBITMAP, sheeting handles, 0, @lb.l.andf Function, ULWALAPAAA); This image is a PNG image with a transparent layer. The form should be in the form of a parent or should be treated as a form. The problem is, if I add some component to this form, it does not show only the component. And if I make a parent for it, its transparency is lost. But I need to add components to this and I need to set up parents in the form Do some people know in other ways to do this? You can try not to set parent property directly, but using subclass ... Assume that TParentForm is the parent form and is form with TAlphaForm image. When creating a TAlphaForm example, pass the example of TParentForm as the owner parameter and make changes in the manufactu

Visual Studio - Splitting so that Design mode is on top -

VS2008 has a new feature that allows a website to be divided into source code and design aspects on the same page. This feature looks great, though it is the default for the design part and top part code part on the bottom half of the screen. Unfortunately, my brain does not work like this and in the past I have a problem rather than continuing to switch backwards when I need it. Is there a way to swap them so that the part of the design is on top and bottom code part? Most other tools in VS are drag and droppables, so I can not see why not, but I can not find the setting anywhere, I did a quick Google search and found a way to make the segmentation vertical, but it is not what I Seeing. I'm just looking for a single horizontal partition with a design piece at the top. Thanks This is an alternative approach that can help if it's a The traditional .aspx page (which contains a codebahind), you can open both documents simultaneously then right-click on one of the tabs a

How do I easily add a new method in Eclipse? -

A new coworker from the eclipse (jebolder) wants to know how to just click on a class and add a new method . I have right-clicked the class in the outline view, and it is not enough to ensure that there is no "new way" command, I can generate gates and setters, and prepare methods, and remove methods I can pull methods or push them down, all of which are very useful, but I do not know how to prepare a new method. > I can type in private (or public), there is no place, and using code-assistance with control-space, and I can make a new method, and then I will use the right- I can click and change method signature from Refactor menu (Alt-shift-C), but it seems that in any way to immediately click on a class and create a new way to bring that method signing wizard instantly Be a good way to be Be it Is there any way to do this? The closest you can describe is that 1. Type the name of the method ( No modifier or anything else) 2. Press Ctrl-1 -> Create Method St

sharepoint - How to add a new WebPart in a specific Group after it is deployed -

I am constantly writing custom webpelt, but after deploying them, they always add to the "Miscellaneous" category. How do I add a webpage to a specific category? The category I refer to here is displayed in the "Add Web Parts ..." popup, which is clicked on a zone when "Add a Web Part" is activated . Thank you You need to update your Web Part Manifest file Add more: & lt; Property Name = "Group" Value = "Custom" /> Follow the instructions for details.

c# - Pinning an updateble struct before passing to unmanaged code? -

I am using some older APIs and need to pass an ectopic driven code to an indicator of a structure. In other words, when I give the structure indicator for unmanaged code, the unmanaged code gives copies to the indicator and gives it back immediately. Unmanaged code can use that structure in the background, in the second thread. I have no control over the unmanaged code that runs in another thread and neither threads. The specified {} statement can not be used for pinning because it is not designed for async unmanaged pinning. GCendal can only reference the reference, so the structure must be boxed to use GCindal. I tried it and it works. The main problem with this is that you can not update the Managed Code structure to update any structure, first we need to unbox it, then update, again box , But ... oh ... the box again?!? This means that the previous indicator in memory still indicates the old non-up-to-date strat, and is another indicator of the new structure, and that

java - How do I use XMLUnit to compare only certain parts of files? -

How do I use XMLUnit to compare 2 or more nodes (in the same name) in 2 separate files? I have 2 XML files that look like this: & lt; SearchResults & gt; & Lt; Result type = "header" & gt; ... Ignore it .... & lt; / Results & gt; & Lt; Result type = "seconds" & gt; ... Ignore it .... & lt; / Results & gt; & Lt; Results & gt; .... data1 .... & lt; / Results & gt; & Lt; Results & gt; .... data2 .... & lt; / Results & gt; & Lt; Results & gt; .... data3 .... & lt; / Results & gt; & Lt; Result type = "footer" & gt; ... Ignore it .... & lt; / Results & gt; & Lt; / Search results & gt; And this is my method that I use to compare so far. The problem is that I do not want to compare parts of XML, resulting in a special flag on any type of tag. How can I do this? Compare public with zero XMLqualityToLastTest () throws an exception {System.ou

sql server - T-SQL - How to write a complex conditional join including a many-to-many join -

I have tried to post another related question to solve this problem which is centered on some parts of the query. Although I can fully post and see if anyone can help. I have the following tablets with the following fields: tblPerson - PersonID, PersonName tblGroup - Group ID, Name tblGroupMembership - PersonID, GroupID tblPersonCities - CityID, PersonID, City < / P> This is a very simple setup. We have a person and group and there are many people to join group membership. And then people can have many cities. Whatever I am trying to do, is writing a stored procedure for exploring this data based on a few different criteria. The collected procedure will only take away the information of the person stored procedure should take 3 parameters: @PersonName - is the name of a person or a person's name GroupIDList - A comma delimited list GroupIDs @City - Name of a city or part of a city I would not like the value of any parameters for the stored procedure, so if a

c# - Load a DateTime array into ListBox? -

How can I save properties? Settings. Default format using date date (only with time)? OK, I found it Add a setting, choose Browse and Search the system Collection ArrayList To save values ​​ if (properties.Settings.Default.test == faucet) properties. Setting.default.txt = new system Selection.orialist (); a quality. Setting.default.txt.Add (new date time (200 9, 1, 1)); Properties.Settings.Default.Save (); To retrieve values ​​ the system. Selection.reel list list = properties Setting.default.txt (Int iDate = 0; iDate & lt; list.Qount; iDate ++) {DateTime Date Values ​​= (Date Time) List [iDate]; } Take a look at

iphone - Sharing image between two view -

I am trying to learn basic and very important to developing decent iPhone apps. But I do not understand what I have not got. Here's the question: I have a window project, which has 2 views - View 1, View 2 On each view (via IB) I removed an image view control. When I call the function in Scene 1, I want to set the image control image 2 of the view. How do I do this? There should be a simple way, but I have not managed to find an easy simple way to do it (and find a lot) to understand the least concept. Thank you in advance - ME You do not necessarily need to share the image . is it big? Are you downloading it? In other words, does it really need to be shared? If this happens, you can instantiate the UIIm in your app representative and you can pass the controller to each view whenever you make it. Set a property for each visual controller for the image. Something like this: see Controller 1 * Controller 1 [[Viewer 1Iloc Init]; [Controller 1 set image: image]; [

jquery - jQTouch loading remote data -

I am using jQTouch which is a jQuery implementation with some extra stuff for mobile devices. I have a div with the id = testinner when I use this code, it works fine with the local file: $ ("# testinner"). Load ("test.html"); But if I do a test with a remote file, then nothing loads $ ("#testinner") .load ("http : //www.google .com "); Anyone have any ideas that I am doing wrong? Crack-domain restrictions exist, even for jQtouch applications. If you want to access external data, then it must support JSON-P (callback with JSON) or it must exist on the same server present on your code.

Insert data in a form inputbox with jquery -

In my main page, I have a div in which some external HTML content is displayed here I have some radio buttons When the user selects a radio, then the parent page has to be changed. The external code is such: function update form (val) {$ ('#photourl', window.parent.document.frm) .val (val) .change (); }; ... & lt; Input name = "photo" id = "photo" value = "someVal" onclick = "updateForm (this.value)" type = "radio" & gt; It works fine in Firefox, Opera, Flock, MSI. It does not work at all in Chrome and Safari . Can anyone help me? Thanks $ ('# photoreal', second argument in window.parent.document) Frm ) has been acquired with a nonstandard technique. Try code ($ '' ('# photourl', $ ('# frm', window.parent.document) [0]), or because it is actually in a document (according to your comment), just get Get rid of it

Can Ruby 1.9 used with Rails by a Ruby/Rails beginner? -

Almost half-a-year ago, when I started learning Ruby and Rail, I tried Ruby 1.9 before but I left soon, because nothing was done from the box at the time and almost every blog was helpful or The tutorial was designed for Ruby 1.8. What about now? (December 2009) Is there an existing rail application run by Ruby and running railways, it is possible to avoid problems, which can only be determined by Ruby and Railway professionals? Unfortunately I did not get good experience with Ruby 1.9 and Rail. You can read more here: My opinion is that migrating an existing Rail app for Ruby 1.8.x to Ruby 1.9.1 is not as easy as you think, an excellent test suite Incident with I am pretty sure that most problems arise because of trying to change existing problems because you are working with an established code base. You should start with a new Rail app with Ruby 1.9 because you can find a problem because you write a line of code so that you can easily separate which component is not compa

command line - Save Matlab invisible plot under terminal as an image with same size -

I am connecting SSH to a Linux server and doing some MATLAB programming. I would like to save the invisible plot as figH = shape ('visible', 'off'); Plots save some% plot as an image with the same size as the plot closed (figH); Seta () and print () will resize the size of the saved image separately from the size of the plot. In addition to print () , all three renderer modes ( -opengl , -ZBuffer and - painters ) Can not be used in terminal emulation mode on linux server getframe () does not work either. I wonder how can I solve these problems? Thanks and regards! Use the following sequence commands to connect and start MATLAB: ssh -x user @ server # disabled X11 forwarding unset display # unset DISPLAY variable matlab -nodisplay # MATLAB start without desktop Then a simple conspiracy for example: figure, close to # should be done first, otherwise plot is empty plot (1:10) # normal file to print # save file.ps saveas (gcf, 'file.ep

importing c++ data types to haskell with ffi -

I am writing a hascal cover for a C ++ library and as much as I import the function from the library into my haskell program I can not have a clue how to import C ++ data types For example, I have a function that takes the form of a parameter: Video :: E_DRIVER_TYPE EDT_OPENGL type defined in some.h file Has gone, and as I said before, It is importing functions with FFI Foreign import ccall ... proper compiler-mangled function name but I call the function to call hackle Because I did not know how to import / use specific video driver data types Now, I know that you can make a type in Haskell but still I need a starting point how to define the type of C ++ representation. (I'm confused at this point) I appreciate any kind of help! Thanks Calling from Haskell to C ++ is difficult; List some options.

Is there a comprehensive list of Google App Engine applications out there? -

I'm thinking of using Google App Engine for a small side project, but before I Got into the head and started coding my app (which are quite trivial and common stuff) I have already been done, who want to check out But I can not find a place that already shows the list of types of apps available there. Does anyone know such a place? will be for a starter ...

string - Convert spaces to tabs in RegEx -

How do you say the following in regex: foreach line look at the beginning string Convert 3 groups of each group to one tab Once a character is found in addition to a location, then stop it This is what I've done so far: / ^ + / \ t / g However, it converts everywhere to 1 tab Any help will be appreciated . with Pearl: perl -pe '1 while s / \ G {3} / \ For example, with the following input, between the three loops, between three loops, three six places, three in the middle six, space Output (tab replaced by \ t ) is $ perl -pe '1 while s / \ g {3} / \ t / gc' input |

javascript - What functions are necessary to program a PHP script that can interact with an AJAX website like a normal browser? -

I want to know what is necessary to create a PHP script that interacts with a website like a normal browser Could. The website will be rich in Ajax, so it is important for PHP scripts to know how to handle JavaScript functions and maintain a continuous connection with the website. You are asking a HTTP client asking PHP to have a call: & lt ;? Php $ ch = curl_init ("http://www.example.com/"); $ Fp = fopen ("example_homepage.txt", "w"); Curl_setopt ($ ch, CURLOPT_FILE, $ fp); Curl_setopt ($ CH, CURLOPT_HEADER, 0); Curl_exec ($ ch); Curl_close ($ ch); Fclose ($ FP); ? & Gt; Curl does not JavaScript though if you need to evaluate JavaScript, it is a very long order and I can suggest that you look at Google , But this is a C ++ project.

java - How to send data to ActionBean via JavaScript? -

I am playing with strips and I wonder if it is possible to send javascript-generated data to Actionben. To be more specific, when I click on some element on the page with my mouse, after clicking on the tabs: link , I have to return the ID of that element to the actionbane. I have already saved that ID in SS variable id , how do I do it? Are you using parameterized links? & lt; Stries: link id = "mylink" href / beanclass = "..." event = "..." & gt; & Lt; Stries: Ultimate name = "id" value = "some_default_value" /> click on me! & Lt; / Stripes: Links & gt; Most possibilities arise: http://mysite.com/...?id=some_default_value , which you will use later in JavaScript Some Note : The suggestion is unverified. Edit : On the second thought, why to write some code, just type some javascript "id? =" + Id; at the link's URL address?

c# - Setting does not get removed? -

मेरे पास एक ListBox ( AlarmBox ) और एक ListView ( listView1 )। वे दोनों 2 अलग-अलग गुणों में सहेजते हैं। सेटिंग ( अलार्मलिस्ट और अलार्म लिस्ट 2 )। properties.Settings.Default.AlarmList.Remove (AlarmList .SelectedItem); Properties.Settings.Default.AlarmList2.Remove (listView1.SelectedItems); AlarmList.Items.RemoveAt (AlarmList.SelectedIndices [0]); listView1.Items.RemoveAt (listView1.SelectedIndices [0]); यह निकालें बटन के लिए कोड है, लेकिन जब से सूची VIEW में SelectedItem फ़ंक्शन नहीं है, तब मैंने SelectedItems का उपयोग करने का सहारा लिया था। जब दोनों बॉक्स से कोई आइटम निकालते हैं, तो अलार्मबॉक्स दोनों अनुप्रयोगों और सेटिंग्स से सही ढंग से मूल्य निकाल देता है, लेकिन जब listView1 से निकालते हैं, मान केवल ऐप से ही हटा दिया जाता है, लेकिन सेटिंग्स से नहीं हटाया जाता है। संपादित करें: इसके अलावा, जब listView1.एचले गए आइटम को AlarmList.SelectedItem , यह सही ढंग से निकालता है। क्या आपने कोशिश की है .remove (listView1.SelectedItems [0]); ठीक है, तो क

RequestDispatcher with Struts2 -

वर्तमान में मैं getRequestDispatcher से नीचे स्ट्रश 2 से विफल हूं: अनुरोध डिस्पैचर आरडी = httpReq.getRequestDispatcher ("/ category.htm"); त्रुटि को नीचे दिखाया गया था: अनुरोधित संसाधन (/xxxx/category.htm) उपलब्ध नहीं है। लेकिन यह ठीक काम कर रहा है जब http: /xxxx/yyyy/category.htm? Id = 21 निष्पादित कोई विचार करता है? अगर यह /category.htm URL को मार रहा है ? Id = 21 , लेकिन यह /xxx/yyy/category.htm पर जाता है, तो आप अपने getRequestDispatcher () invocation में अंतिम URL के समान अनुरोध नहीं बना रहे हैं। इसके बजाय इसे आज़माएं: अनुरोधडिसीपचर rd = httpReq.getRequestDispatcher ("/ yyy / category.htm");

php - MySQL syntax for Wordpress -

Let me retrieve data from a parent / child> child relationship class installation the wanted. Help? Post text "itemprop =" text "> You do not have to ask the database. They are called breadcrumbs.

java - use EventObject.getSource in Actionlistener -

I am restructuring some code for assignment - currently there are lots of buttons and menus in the scene and an action listener Which decides that using Event.getSource (), people from what I've read feel that it would be better for each GUI component to become its action listener, perhaps by some kind of factory. However, besides cleaning the code, what some other benefits does it mean - does not it mean that too many objects will be on the heap and can its performance be affected? Thanks, Aly Earlier this code runs slightly faster. The second increases the maintenance and expansion of your code. If you want to add a new component, you do not need to modify existing methods. Methods, and hand-held remittances are necessary for the use of some types of switch mechanisms to isolate different components. Go, whose incidents you are handling. The system is better for you to do this. The possibility of error in this switch structure and difficult to

php - Accessing $_POST variables cause errors -

I was wondering if you could help me with the following: A form on the next page. I am using the $ _ POST method. Although the information is visible in the browser, when checking the code shows an notification: the undefined index error and the value of that value There is no mark where it should be (in the code). I think it is related to the above error. The way I am calling it is for the former: $ name = $ _POST ['name']; Besides this, I am trying to get the same information in a hidden area so that to store them in a database (after viewing the page) here but here no one Even the values ​​could not be passed. The value in the hidden is empty. Sorry if this is a silly thing ... but at stake and I do not know what I'm doing is wrong. Thank you very much for any help. Francisco In PHP you can not read the variable which Does not exist. For non-existing simplified variables such as $ foo or $ bar you will get an unchanging variable notice, such a

How can I safely solve this Java context classloader problem? -

The The one and only problem in starting my Java desktop app users find me only when about one third of its begins to formula exception "AWT-EventQueue-java.lang.NullPointerException (Hashtable at 0" java.util.Hashtable.put: time is thrown at a NullPointerException startup Other two-thirds .java: 394) javax.swing.JEditorPane.registerEditorKitForContentType (JEditorPane.java:1327) javax.swing.JEditorPane.registerEditorKitForContentType (JEditorPane.java:1309) javax.swing.JEditorPane.loadDefaultKitsIf required (JE ditorPane.java:1387 javax.swing.JEditorPane.getEditorKitClassNameForContentType (jEditorPane.java:1340) at) Javax.swing.JEditorPane.getKitTypeRegistry (jEditorPane.java:1344) on javax.swing.JTextPane. & Lt; Init & gt; (JTextPane.java:76) on java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:209) on .Launcher $ 1.run java.awt.EventQueue.dispatchEvent (EventQueue.java:633) on myapp (Launcher. Java: 13) java.awt.EventDispatchThread on .pumpOneEv

emacs - Viper mode in all modes -

I am going from vi to emacs and, using viper and vimpulse, when i cw cw can not return to the original one with a single window and with the same order because another buffer, which can be a support buffer, is not in wopar mode. How can I fix this? I tried to add other methods in the wiper configuration and started them with hip via snake mode by default: (Viper-vi- State-mode-list 'help-mode' (ad-hook 'help-mode (lambda () (setic wiper-mode t))) But none of these commands actually works In the first one generated the following error: Warning (initialization): `/home/konrad/.emacs.d/init.el 'There was an error while loading: Wrong type Error: In addition to symbolp, (elemental-mode ... Cw Cw , I also recall due to not being able to navigate using hjkl. There is no way to re-use the keybindings determined by the virus, instead of rebooting them for each mode? The error is because you have the variable viper-vi-state-mode-list as such: (add-to-l

latex - Fullpage picture in two column layout -

I would like to insert a picture into a document that is using a two-column layout. However, I want it to take a full page and should not be centered on one of the columns. Currently if I add a [p] modifier to a figure, then the whole image on the last page is land, instead of between the documents. How can I force a page to switch back to a single column layout and put a big picture there? \ \ begin { Document} \ start {multicols} {2} blah blah blah text \ end {Multicols} \ start {number} {hj} / code> This is ugly and filthy. And you will need basic where you have been depicted to balance the text, but this is what you asked.

objective c - Beginning mac software development -

I recently downloaded the iPhone SDK that came with the encoded. Do I want to know from ur experience that with the development of iCax, is the development of app development for Mac from anyone? Has been a web developer for a long time and mainly wants to go into software development on Apple devices. What type of application are for Mac today? I know what are windows for security of antivirus or firewalls and maybe some other stuff like windows, but what are they selling today on Mac or have a great demand? Can I also use Mac application Xcode or do I have to use some more? Objective-Mac is development language or it is only for iPhone thanx With the release of the lion a lot It is clear that iOS and Mac OS X development are starting on the path of convergence. Therefore, the fiscal question is whether Mac development is beneficial or not, it is less relevant. As a 20-year-old third party developer especially on apple-based products; The market was definitely stronger th

ruby on rails - config.cache_classes = true affecting type coercion with RubyDBI -

पर्यावरण: रेल 2.3.2 डीबीआई 0.4.1 डीबीडी / ओडीबीसी 0.2.4 < / P> परिदृश्य: मेरे पास एक रेल ऐप होता है जो नियमित एसएसएल डीबी में बाहरी एसक्यूएल डीबी से डाटा का नियमित बैच जॉब्स के माध्यम से आयात करता है। उन बैच की नौकरियां रेल पर्यावरण को लोड करते हुए शुरू होती हैं, फिर रूबीडीबीआई के माध्यम से सीधे डाटाबेस कनेक्शन बनाने के लिए आगे बढ़ें। एक बार जब मैं कनेक्ट हो जाता हूं, तो मैं डेटा को निकालने, मसाज करने, और एक्टिविरकॉर्ड ऑब्जेक्ट का निर्माण करने के लिए चुनिंदा बयान चलाता हूं। मुझे सिर्फ एक अजीब मुद्दे पर आ गया है, जहां उत्पादन में उत्पादन में भिन्नता है। ऐसा लगता है कि जब config.cache_classes सत्य है, तो डीबीआई वापस लौटा एसक्यूएल डैटईटाइम प्रकार को रूबी डेटटाइम में ठीक से रोक देता है। यहां एक निकाला गया कोड उदाहरण है: ## config.cache_classes = true query = "शीर्ष 1 [EPOLeafNode] का चयन करें। [Lastupdate] AS [last_update] [EPOLeafNode] से" conn = DBI.connect (' डीबीआई: ओडीबीसी: ड्रायवर = फ्री टीडीएस; टीडीएस_विर्सियन = 8.0; सर्वर = एसक्यूएल; डाटाबेस = ईओपी

c++ - The procedure entry point _ftol2 could not be located in the dynamic link library msvcrt.dll -

I've recently been compromising a small game project using VC ++ 2008. I am using SDL, OpenGL, Boost and Box 2D library included. It works fine on my windows 7 machine, just like a friend's W7 machine will never work on my second friend's XP SP3 machine , As well as the vc ++ 2008 SP1 redist pack has been installed. When he. If Exe starts, it receives the error: "The process entry point can not be located in the _ftol2 dynamic link library msvcrt.dll" I Most forum threads have read that msvcrt.dll is corrupt or outdated. My version of Msvcrt.dll is 7.0.7600.1385 and its 7.0.2600.5512 can not be found for any update, it can not be replaced only because it comes back to the old version on reboot, and this is the folder of my game Just does not help in including your msvcrt.dll. According to the thread at Gamedev.net, OpenGL calls 32.dll to _ftol2. Their conclusion is that installing the vc ++ 2008 redist pack, which I mentioned is already installed. Any

image - jQuery picture load -

Image
I need some help in jQuery What I want to do is create a small, very, very easy picture gallery of some kind. I have to do some small pictures on the left hand side of my page. By clicking on one of these small images, I would like to load this photo in another device where it is shown in full size. & lt; A href = "image1_big.jpg" square = "small-small" /> & Lt; Img src = "image1_small" /> gt; & Lt; / A & gt; & Lt; A href = "image2_big.jpg" class = "small" / "gt; & lt; img src =" image2_small "/> gt; & lt; / a & gt; & lt; a href =" image3_big.jpg "class = "Small" ">"> gt; & lt; / a & gt; & lt; div id = "bigpic" /> gt; & lt; img src = "Image1_big" /> All of my jQuery attempts failed because I could not change the source of the image within this large piece of media. This should do for

yard - Limitations of PEG grammar & parser generators? -

I was enjoying a lot of yards: I was able to create a fully functional calculator. I am evaluating the yard to PHP parser Please PLEASE advise on the limits of PEG grammar; Parser generator Thanks a lot! I think the big "problem" with PAG is that they do not fit the grammar general In classification, because they work fundamentally differently. Normal grammar is "backward" in this sense that they describe all possible sentences (programs) that can arise. PEG explains how to parse - they come to the problem from the other end. In my opinion this is a more natural way to think about the problem, and of course, any hand-written (recursive-line) parser I do not do anything else.

objective c - iphone Development - analyze error -

NSString * temp = [आत्म यादृच्छिक BallPick: temp]; निम्न त्रुटि: संदेश अभिव्यक्ति में पास-दर-मूल्य तर्क अनिर्धारित है क्यों? - (NSString *) RandomBallPick: (NSString *) oneFilename {// फ़ाइल नामों की एक सरणी NSMutableArray * imageArray = [[NSMutableArray alloc] init] बनाएँ; के लिए (int c = 0; c & lt; 37; c ++) {NSString * imageName = [NSString stringWithFormat: @ "ball_% d.png", सी]; [छविएरेऑडऑब्जेक्ट: छविनाम]; } // एक फ़ाइलनाम को चुनना int numFileNames = [imageArray count]; Int चुना = arc4random ()% numFileNames; एकफ़िलननाम = [छविएरेरे ऑब्जेक्टअटइंडेक्स: चुने]; [छवि एरे रिलीज]; वापसी एक फ़ीमेल नाम; } जहाँ तक मैं बता सकता हूं कि आप 37 फ़ाइल नामों की एक सरणी बना रहे हैं - (NSString *) randomBallPick {[NSString stringWithFormat: @ "ball_% d .png ", arc4random ()% 37]; } यदि आप सरणी को चारों ओर रखना चाहते हैं और इसे पुन: उपयोग करना चाहते हैं, तो मैं ऐसा कुछ करूँगा: - (NSString *) randomBallPick {static NSMutableArray * imageArray; If (! I

silverlight - C# DatacontractSerializer over Sockets multiple root elements -

I am writing a Sivlerlight chat application using Sockets and DataContractSerializer. I have a class categorization with serializable objects that have been shared between the Silverlight client and the C # server. When a friend logs, he sends messages to the server and if they are verified they receive a receipt after a number of messages which tells them who is online (and some other messages as well). The customer is again waiting on the socket and ready bytes. This will then attempt to cancel the result of the byte stream object. However, because the server has sent many messages, the byte stream will contain XML for more than one element and when a DSR is done, a multi-root exception is thrown. What is the standard solution for deserializing a stream of objects away from a socket using DatacontractSerializer? Thanks I found a solution It looks like a little heck Is it Because the data contract produces serializer XML, so I decided to write an extra '\ 0'

python - With sqlalchemy how to dynamically bind to database engine on a per-request basis -

I have a Pillons-based web application that connects to a postgraze database (v0.5). Instead of following the simple pattern of simple web app, for safety, (as seen only in all tutorials), I'm not using a generic postgrazy user (like "webpap"), but I want it That the user is using his own postgraduate user id and password, and using that connection. This means that we get the full benefit of postgrace security. To make things still complicated, there are two separate databases to connect to it, although they are currently in the same postgres cluster, they should be able to move different hosts at a later date. We are using the package of Sclaimimi, although I do not know whether this is any effect on the case. Most examples of sclechemy are used with a normal database user with common applications and once set metadata with password, such as through a web application. It usually creates metadata.bind = (), sometimes even on the module-level in database model fi

matlab - Making a plot out of a list of points -

मेरे पास अंक का एक सेट है 1 1 2 5 3 10 4 20 .. .... मैटैब में ग्राफ़िक्स में यह कैसे साजिश कर सकता हूं? जब मैं कार्यक्षेत्र में मेरी "अंक" चर और मेनू में "प्लॉट" हिट करने का प्रयास करता हूं, तो यह पहला कॉलम नीले रंग के रूप में और दूसरे को हरे रंग के रूप में दिखाएगा। मेरा मानना ​​है कि यह दोनों स्तंभों को अलग-अलग कार्यों के रूप में मानता है, और यह वही नहीं है जो मैं चाहता हूं। मेरा पहला कॉलम एक्स और दूसरा वाला वाई होना चाहिए। धन्यवाद p = रैंड (50, 2); % # 50 यादृच्छिक अंक की साजिश (पी (:, 1), पी (:, 2), 'आर।')% # प्लॉट डेटा को लाल अंक के रूप में 1 स्तंभ% # के रूप में एक्स-निर्देशांक और दूसरा कॉलम y- निर्देशांक के रूप में

asp.net mvc - How do I add an order by to server side code in my mvc View -

How do I include the first line in and OrderById . I'm confused with this, i.e. Foonk & amp; Chief selector etc. & lt;% foreach (Miscellaneous items in the model. PaymentTemplates) {%> & Lt; TR & gt; & Lt; Td> & Lt;% = Html.Encode (item line)%> & Lt; / Td> & Lt; Td> & Lt; Strong & gt; & Lt;% = string.format ("{0: C}", item.mountTotal)%> & Lt; / Strong> & Lt; / Td> & Lt; Td> & Lt;% = string.format ("{0: c}", item amount)%> & Lt; / Td> & Lt; Td> & Lt;% = string.format ("{0: c}", item.mountIndex)%> & Lt; / Td> & Lt; / TR & gt; & Lt;%}% & gt; foreach (Miscellaneous item in module. PaymentTormatotals.order BI (PaymentImotMontal) = & Gt; But to make your view stupid, consider placing this command in your model or controller.

html - Problem in php upload script? -

फ़ंक्शन getExtension ($ str) {$ i = strrpos ($ str, "।"); अगर (! $ I) {वापसी ""; } $ L = strlen ($ str) - $ i; $ Ext = substr ($ str, $ i + 1, $ l); वापसी $ ext; } परिभाषित करें ("MAX_SIZE", "2000"); यदि (isset ($ _ फ़ाइलें ['file_upload'])) {$ errors = 0; $ छवि = $ _ फ़ाइलें [ 'file_upload'] [ 'नाम']; यदि ($ छवि) {$ filename = stripslashes ($ _ फ़ाइलें ['file_upload'] ['नाम']); $ एक्सटेंशन = मिले एक्स्टेंशन ($ फाइलनाम); $ एक्सटेंशन = स्ट्रटोलर ($ एक्सटेंशन); अगर (($ एक्सटेंशन! = "जेपीजी") & amp; amp; amp; ($ एक्सटेंशन! = "बीएमपी") & amp; amp; ($ एक्सटेंशन! = "पीएनजी") & amp; amp; ) {गूंजती '& lt; h1 & gt; अज्ञात एक्सटेंशन! & Lt; / h1 & gt;'; $ त्रुटियों = 1; } और {$ size = filesize ($ _ फ़ाइलें ['file_upload'] ['tmp_name']); यदि ($ आकार & gt; MAX_SIZE * 1024) {गूंज '& lt; h1 & gt; आप आकार सीमा पार कर चुके

php - Add all lines multiplied by another line in another table -

I hope I can explain this quite well. I have 3 tables Wo_parts, workorders and part2vendor I am trying to get the cost of all the parts selling in a month. I have this script $ scoreCostQuery = "total_score as yoga (part2vendor.cost * wo_parts.qty) on selection part2vendor interiors (wo_parts.pn = part2vendor.pn) Where workorder = $ Join workorder wo_parts "; What I'm trying to do is in each part wo_parts (under PARTNUMBER [PN]). The cost of that item is in part2vendor (part number [pn] below) I need each part of the value in part2vendor will be multiplied by the quantity sold in wo_parts. The way all 3 tie-up is workorders.ident = wo_parts.workorder and part2vendor.pn = wo_parts.pn. I hope no one can help the above script give me the same total as when added to the calculator. An answer It is not, just a comment. Why do not you take out the amount / multiplication operations outside the SQL statement? I know, it sounds stupid because it will increase the

html - Using background-repeat and background-position together -

I am trying to implement a layout on the website. In essence, it involves tiling a background image on the div in which both vertical columns are kept, it seems that both columns move downward. My columns look like this: XXXX MMMM XXXX MMMM XXXX XXXX YYYY XXXX YYYY XXXX YYYY XXXX YYYY XXXX YYYY With a column on the left which goes all the way down the page, but with the menu and at the top of the right column, transparency and stuff ("M"), I just got the wrong column after the actual right column ("Y") I want to start the background, and I want to ignore everything due to the transparency between the menu and the Y-Column. To do this, I was planning to drop the image below 200 pixels to offset the background image (background-condition: 0 pixel 200 px), it does not work. I quickly realized that the image is standing repeat in two directions above and above the original offset point, it does not undo the effects of the offset, Recurrence - Y needs t

c# - programmatically change the windows color border of windows 7 -

संभव डुप्लिकेट: विंडोज़ 7 पर हवाई चलते समय सी # का प्रयोग करके आप प्रोग्रामैटिक रूप से विंडोज़ बॉर्डर रंग कैसे बदल सकते हैं? यह है एक खिड़की का रंग अलग-अलग बदलना संभव नहीं है, लेकिन आप resgistry के माध्यम से ओएस चौड़ा रंग बदल सकते हैं। प्रविष्टि कुछ ऐसा होना चाहिए: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ नियंत्रण कक्ष \ ग्लास Colorization \ Swatches के साथ संयोजन के साथ HKEY_CURRENT_USER \ सॉफ्टवेयर \ Microsoft \ Windows \ DWM - ColorizationColor < / कोड> अपने कोड के भीतर से आप केवल अपने ग्लास सीमा के आकार और आकार को समायोजित कर सकते हैं, लेकिन मुझे रंग नहीं लगता इस और अंदर।

version control - How to git svn fetch older history? -

I have tested the svn repo via git, but not the first svn commit. Now I want to expand history sometime back. Is this possible? You can follow the possibilities you specify Actually, you can To import their SVN repo with a committed limit, then merge two GIP repos together.

python - Using AppEngine XMPP for Client Notifications -

I am searching for a way to tell customers about the ending things and the XMPP implementation of APEFENGIN is really interesting It can be reliable because it is scalable and can be up to 100kb of data. But as I understand, before any customer can hear the message, he must have a Gmail account. It is very unimportant Is there a way to experiment with this can create a temporary read-only XMPP account? No this is not true: / API Engine can get Robot as a contact with XMPP-based network. Unless you are talking about the need for a Gmail account to create an App Engin robot ... then in that case you must have a Google account.

ajax - Jquery Datatables Fully Modifiable Data Table -

I am currently trying to create a fully modified data table with Jquery's Datatable plugin. With a completely revised table, I mean that a user will be able to edit, remove, update columns in the table. Based on the examples, I am currently trying the following javascript code: function var_dump {ifj (object type obj == "object") {return "type: "+ Obj.constructor?" \ N Constructor: "+ obj.constructor:" "+) \" value: "+ obj; } Other {Return "Type:" + Type (OBJ) + "\ n Value:" + OB; }} // And Function var_dump var oTable; Var giRedraw = false; Var giCount = 11; $ (Document) .ready (function () add a click handler to the rows - it can be used as a callback * / $ ("# example tbody") Click (function (event) {$ (OTable. FnSettings (.aoData) .each (function () {$ (this.nTr) .removeClass ('row_selected');}); $ (event.target.parentNode) .addClass ('row_selected');} ) / * Add a click handle

php - Forward to given URL string -

Currently I am creating a controller (ZendFramework) that has a URL string with the given ID from the database. / linker / show / id / 6 i.e. id = 6 / products / list / type / Games . LinkerController I will use _forward ()) Methods to pass alternate paragraphs (post, received), but this method parameter Like ($ action, $ controller, $ module, $ parameter) and my string I do not even want to redirect to this URL (user does not see this It should be ProductController ). Any idea how to solve it? You can not forward url (due to the nature of forwarding - creating a new internal request object) You can only forward the request (module, controller, action). Use the reinstallation (in the controller): $ this-> _helper-> Redirector-> GotoUrlAndExit ($ url);

java - Evaluation of curve in Java2D -

What are the methods of evaluation or Java 2D curves at a given time? I know the algorithm is simple, but I suspect that there is already a way in Java. For whatever reason, they made all things private (but you already know it You can have Kvadkurvi 2D (and cubic crow 2D) source for reading in SDK, and all the T-wise codes are within it.

javascript - Forcing windows resize to fire -

I have a problem with my layout, when I manually change the window again and restore it normally I am in the right place. Is it possible to trick the browser and do something with Javascript, which in fact the browser thinks that the page has been resized so that my layout looks like it should? Update: Can I re-size and restore the window so that the user can only notice? It is possible (which means that it can also be done without a framework), here An example is: window. AddEvent ('domready', function () {window.addEvent ('resize', function) {warning ('F');}); (Function () {window.fireEvent ('resize');}) delay (3000);}); After loading the DOM-structure, 3-second resize-event will be removed for window-object. Edit; I do not have any clue how motuum resolves my fire avenues for resizing event. I tried Google, but got Nada. You can of course resize the window manually, but this is actually a hack: FireOnResizeEvent () {var

image processing - Extracting IPTC/EXIF data from tif files in using Java -

Metadata with JPEG files using com.drew.metadata, the system I'm working on Removal feature package Although it is limited to JPEG files, and now a customer has asked about the removal of TIF, and possibly other image formats to IITTI. Is anyone aware of Druk Knock similar API, which can remove IPTC from TIF? Ideally this would be a pure Java approach such as com.drew.metadata one. This is an old question nowadays my metadata-extractor library of TIFF files As well as support JPEG, WebP, PSD, PNG, GIF, BMP, ICO, PCX and many camera raw formats. The project was recently taken to GitHub: and is available by Maven: < / Div>

ios - UITextField border color -

It's great to set me your color in the UITextField range but so far I could know how the style of the border line To change I have used background property to set the background color in this way: self.textfield .backgroundColor = textFieldColor; But I have to change the color of the UitextField border too. And my question was how to change the border color. import quartzcoser outline in your category: #import & lt; Quartzcore / Quartzcoreot & gt; To change the border color, use the following code snippet (I'm setting it in red), textField.layer .cornerRadius = 8.0f; TextField.layer.masksToBounds = Yes; TextField.layer.borderColor = [[UIColor redColor] CGColor]; TextField.layer.borderWidth = 1.0f; To return to the original layout, simply set the border color to clear the color, serverField.layer.borderColor = [[UIColor clearColor ] CGColor]; In fast code textField.layer.borderWidth = 1 textField.layer.borderColor = UIColor.whiteCo

speech recognition - Voice recogntion engines for embedded applications -

मैं Windows CE आवाज सक्षम अनुप्रयोग विकसित करने के लिए उपलब्ध आवाज मान्यता इंजन और एसडीके की खोज करने की कोशिश कर रहा हूं। मैं अति सूक्ष्म अंतर में भाग लिया है, लेकिन कुछ और नहीं देख रहा हूँ यदि संभव हो तो मैं एक। नेट एसडीके को पसंद करता हूं, लेकिन मुझे लगता है कि सबसे ज्यादा सी / सी ++ होगा मैं किसी भी सुझाव की सराहना करता हूं धन्यवाद। अति सूक्ष्म अंतर ने मूल रूप से हर कोई खरीदा है वे भाषण बाज़ार पर शासन करते हैं, मैं डरता हूं ... ऐसी कुछ अन्य कंपनियां हैं जो तकनीक में काम करती हैं, लेकिन मैं नहीं जानता कि वे एम्बेडेड बाजार में कितनी अच्छी तरह करते हैं। वहाँ और, जो दोनों मजबूत गैर-अंग्रेजी प्रेसीडेंस (और उनका अंग्रेजी भी बहुत बुरा नहीं है)। फिर भी आईबीएम अभी भी है वे हैं। उद्योग के लिए इंतजार कर रही बड़ी चीजों में से एक यह देखने के लिए है कि माइक्रोसॉफ्ट के अधिग्रहण से क्या निकलता है, लेकिन मुझे लगता है कि एम्बेडेड बाजार में वे प्रोसेसिंग को " क्लाउड "है, जहां पर टेलि एक लंबे समय से रहा है।

c++ - what's the difference between hpp and hxx? -

They should be the same, for the GCC? One of them is more popular, I am now preparing a project from scratch and I would like to choose one of these two. In C ++, the file extension does not really matter .h, .hpp, .hxx , Or any file extensions are not by all conference. The standard library does not use any file extension for its header files. Use many projects, .hpp, including Boost. Use many projects. H Just select one and stay consistent in your project.

testing - is there any way to automatically run a test suite from within Selenium IDE upon opening firefox? -

I would like to create a script or a batch file window that automatically opens the Selenium IDE (plugin) and opens and runs The test file is I would recommend Selenium RC to run automatic selenium test. You can easily export from IDE to multiple languages ​​supported by Selenium RC and then use a suitable test framework. It is also possible to run an IDE test written in HTML through Selenium RC using the HTMLSuite command line parameter.

regex - Regular Expression search/replace help needed, Python -

I want a rule that if the last vowel (aeo) of the string is before a character ('t , 'K', 's', 'vaccine'), then a : should be added immediately after the vowel. So, if I have Python in string "orchestras" I need a rule that will change it to "orchestra: s" < / P> Edit: The last letter in the string (T, K, S, TK) < Pre> re.sub (r) ([aiō]] (t | k | s | vaccine) ([^ ayuu] *) $ ", r" \ 1: \ 2 \ 3 "," orchestra ") Again You will not say that "Vibe (R" ([AiOU]) (T | K | S | TK) $ ", R" \ 1: \ 2 "," Orchestras ") Can there be other dishes after T / C / S / T The first reggax allows for it unless there is no more tone, so it will turn "fast" into "fiest". If the term should end with T / K / S / TK, then use the second reggae, which will do nothing for "fist".

vb.net - Free or commercial code analysis service for Visual Basic -

Anyone knows a good code analysis service or tool for vb.net? C # with Style Police for Visual Studio 2008 Team Edition or C # for C # Update: My bad, I'm only using Visual Studio Pro in my new workplace, so I code Could not use the analysis for the Visual Studio 2008 team edition I believe code analysis can be found in VB Works also on the NET code. I just tested, and it works.

Accessing Videos AND Photos on Android 1.5 + -

So I'm trying to select a special piece media with my Android application which is the method used here Is doing this: It works great, except for the fact that I can either choose between the video or the photo to present the user, not both at the same time . A good way to do this is: startActivityForResult (new intent (Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI), SELECT_IMAGE); Thanks! I have used it many times, the best way is: Intent Media Chooser = New Intent (Int. Action_GET_CONTENT); // Comma separated MIME type mediaChooser.setType ("Video / *, Picture / *"); StartActivityForResult (MediaTouch, 1); Even this is not perfect at all, even if I have worked fine in everything used in it. This is an additional called "data" intended for the video onActivityResult () in each picture / user's gallery with the activity of each gallery / ASK, which will have content in selected media: / / URI EDIT

java - What's wrong with my factory? -

I've got some code like this: public abstract class Fu {public Fixed Foo getFoo () {Return New FooImpl (); } Elixir Zero DoFoo (); FooImpl Foo {public FooImpl () {} @Override void DoFoo () {}}} extends but I'm assuming any type of Foo Not attached in the example. So how can I work it out? I have tried to make it as easy as possible that it will be compiled: public abstract class Foo {public static Foo getFoo (new) FooImpl ( ) back); } Private Static class FooImpl Foo {public} Expandes {}}} And I still get the same error What am I missing? Fixed! I have changed the line to new FooImpl (); to back to the new Foo.FooImpl (); Great explanation - In short, you need to create a class FooImpl static ; Therefore, it is bound only to the external class, not the typical example of the external class (which you do not have). The getFoo method also seems like it should be stable, BTW - Otherwise, example 's Foo were you planning to call it?

xcode update from 3.1.2 to 3.1.4 -

Update xcode for 3.1.2 to 3.1.4 for iOS development, in fact approximately 3 GB free space is required? Here are the steps: 1. Download this file iphone_sdk_3.1.2_with_xcode_3.1.4__leopard__9m2809.dmg 2. Uncheck 3.0 SDK and 2.2 SDK (Interface Builder, Quartz etc.) The first checkbox can not be properly unchecked?) Just want to confirm Cause I am running out of disk space and I have to ensure that I do not install unnecessary things I am here. Thank you, T This will take up such a blank disk space, but lots Old files should be overwritten during installation. It assumes that there is no previous installation and you will not install unless you have the necessary space. I will not worry about disk space if you have already installed the previous version, as the footprint will be about the same principle, unless you add all kinds of random features That you did not have before.

ASP.NET MVC - Controllers Not Recognized -

I have Apress' Pro ASP.NET MVC Framework on my ASP.NET mvc site all good and good and the app runs just fine Used to be. I'm almost done with it, I was trying to move it to the test server for QA, when the server administrator wanted to remove my extensions system and at the end of my controllers wanted to add .mvc or .aspx. When I added it to my Global. ASAcc rout table, my app no ​​longer works locally. The site I found mentioned in that if I am using an extension then I need a root route. I did this and now the default home page now works but my navigator does not work. I am using the HTML app link, so they sang properly, adding the extension properly. But when I click on them, I get an error: The specified method is not supported. I have Grrr with every controller ... And what exactly is the reason for making me a bomb that when I change my changes to global Give it AXX routes, after admin, by removing that file extension: "{controller} .mvc / {action

php - Installing Pdftk on Linux server -

I have been using my windows pdftk.exe local machine to play with some pdf and works fine . I want to upload it to my server which is linux. On the search I came to know that I have to install pdftk on my own as a compiled package on the server. how can I do this ?? Any rpm or no special case for another Disto package System. Rpm-i .rpm

css - Increasing height of a div while dynamically loading content -

I have a div that has an unordered list ... after some user actions I have div with a long list I.e. loaded i.e. use the jquery high level AJAX functions to do this over the last item list. The problem is that when I load it through AJAX, then the list elements divide the bottom of the divis and some of them are displayed outside the div. I have not set any height to contain the DAV assuming that it will expand to accommodate long lists of any future. I will post the code below and if someone tells it out, then it will be very grateful .... # sidebar1 {float: left; Width: 15%; / * Since this element is on, a width should be given * / background: #FFE8BF; / * Background color will be displayed for content length in column, but not forward * / padding: 15px 0; / * Padding up and down make scene space within this div * / text-align: center; } & Lt; Div id = "sidebar1" & gt; & Lt; Div class = "sidebarmenu" & gt; & Lt; Ul id = "sidebar

java - CAMEL is processing the file before the "mv" command completes -

We are experiencing a problem in our monitor script. The program's flow is File in the "script" directory in the backup script. Cac renames the file to .aaa file Another bad script moves the ".aa" file to the "Destination" directory and changes the file back to ".csv" CAMEL is monitoring the "Destination" directory if any file is in the "destination" folder and there is no extension equal to ".aaa", then it will start processing the file. Here the Step 3 is failing, Bash successfully transfers the script file but receives the CAML file when changing the file from ".aaa" to ".csv" and starts processing. Does. The CAM fails with the "Footer is not present" error because that "MV" command was not completed and "MV" was processed by CAM before it was completed. So it processes an incomplete file. Since we use scripting, we have very less flexibility in

java - Struts2 URL with .action -

मुझे नीचे प्रारूप के URL चाहिए P> यह कैसे स्ट्रोंस 2 में प्राप्त करने के लिए? आप कर सकते हैं या (या बाद के समाधान पर अधिक जानकारी के लिए देखें) का उपयोग करें अन्य विकल्पों में सर्वलेट फ़िल्टरिंग या mod_rewrite शामिल हैं।

iPhone + UIScrollView -

I have a UIScrollView on the screen. There is a scene in the scroll view that has UIButtons. The problem is that while scrolling the view, if I press any button between my scroll view, it will either bounce up or down the screen, that means it will not be in that place where I have pressed the button Take a look at the UIScrollViewDelegate class. When scrolling starts, you want to disable the button when scrolling is done.

cocoa - "Private methods" or static functions in Objective-C. Which one should I use? -

I ended up with a programming style suspicion which is a better solution to this problem (in terms of style) ? To use a category and to declare it in the .in file in the interface @ Interface or go with a static job achieving an object. Thanks If you do not have an immediate answer that is to use, So like the function. I spend most of the time (> 90%) of the function. The methods are useful for polymorphism and interface. There are other ideas for each: Functions are usually small, fast and the ability to inline them in the compiler, if there is no reason to cause any problems using any method And you do not need to use any exclusive in-class, go with the function. Methods (or categories, if you want) if you do not want an accessor overhead or want some other feature that is available in the intensification method, like @Synchronize. In my programs, there is very little scope for these features, and generally there is no need to use methods. Ways to export add

c# - How to extract the RDF snippet out of an HTML page? -

I want to remove the RDF snippet from a web page. Since it can also be in an HTML-comment, I am at a loss here, does someone point me in the right direction, to use libraries or classes or something like that? The goalback is to keep the trackback URL to send the trackback. My solution was to use pingback instead of trackback and I recommend everyone else to do this. .

Ajax - How to change URL by content -

I will explain: I have a picture gallery, the first page is display.php . Users can flip through pictures using arrows, when you click on an arrow, it sends an Ajax request to get the next image from DB. Now I want the URL to be changed according to the picture. So if the first picture is: www.mydomain.com/display.php?picture=Paris at night I will flip to the next one and the URL www.mydomain.com/display.php?picture=The Big Ben How can I do this? The trick here is spaced with an anchor piece. is a part of the first of the '#' points for a resource on the Internet, and normally after assigning the anchor to the page. The browser is the same, the browser does not refresh but is currently moved to anchor position. In this way you can keep the browser history from an usable point of view, while on the page some parts can be kept with Ajax for fast and responsive user interface. / P> Using a plugin like jQuery's history (as suggested by others) is

linux - How do I determine an open file's size in Python? -

is a file that I want to make sure it does not exceed 2 GB (as the system should run on Ext Uses 2). What is the best way to keep in mind the size of a file that I will write this file in the middle of the check? In particular, do I need to worry about buffed, unflished changes which have not been written to disk yet? "post-text" itemprop = "text"> You can start with something like this: class TrackedFile (file): Def __init __ (self, file name, mode): self.size = 0 super (TrackedFile, self) .__ init __ (filename, mode) write def (self, s): self.size + = len (s) You can use it like this: & gt; & Gt; & Gt; F = Traced file ('palindrome.txt', 'w') & gt; & Gt; & Gt; F.size 0 & gt; & Gt; & Gt; F.write ('a man planning a canal') & gt; & Gt; & Gt; F.size 21 & gt; & Gt; & Gt; If you are not writing the file from scratch, this implementation does not work, but you can customize

osx - Using GWT with Mac OS X Leopard -

I'm just starting with GWT, but I can not even run initial examples without the following error: location 0x10 eip = 0x93624148 I know about "Java Hosted mode 32 bit" stuff, anyway I try every combination I was thinking and still could not get away with the error I tried: Use of the eclipse plugin all the numbers Use the command line tool Set the Java environment as Java 5 32bit in the preferences pane, and without success, Redo all previous options (I saw that "Java-version" effectively gives me the right 32-bit jvm) Any suggestions? I can not believe that what must be immediately obvious is very difficult ... Thanks for your help Best Relationship Nicola Montecaío To be decided in GW 2.0. Alternatively, try using WebKit Knightley. Step here:

eclipse - Using hibernate tools to reverse engineer pojos from Postgres -

I am trying to reverse engineer Pauses from a database (HyperNet Tools Plugin v3.2.4x incl. 3.4 2) which I created in postgres but my table is not being ignored. This works if I specify 'public' as the value in my hibernate profile for the 'hibernate.default_schema' property, but nothing happens when I try to specify a different schema . I have tried to modify the case (i.e. low, upper, camel) but I still get the same result here my hibernate cf.xm file is: & Lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE Hibernate-Configuration PUBLIC "- // Hibernate / Hibernate Configuration DTD 3.0 / N" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> & Lt; Hibernate-configuration & gt; & Lt; Session-factory name = "myfactor" & gt; & Lt; Property Name = "hibernate.connection.driver_class" & gt; Org.postgresql.Driver & lt; / Property &

design patterns - Make sure only corresponding implementations or childs of it will be handled -

निम्नलिखित स्थिति की कल्पना करें: जैसा कि हैंडलर - बच्चे और कॉस्टयूमर - बच्चे एक दूसरे से मेल खाते हैं प्रत्येक हैंडलर में ऐसी कोई विधि होती है जो उपभोक्ता को लेती है। क्या यह सुनिश्चित करने के लिए कोई अच्छा तरीका है कि एक हैंडलर - कुछ उदाहरण: हैंडलर सब कुछ ले जाएगा कोड> कॉस्ट्यूमर हैंडलर ए CostumerA और ग्राहकए लेगा लेकिन CostumerB या costumer हैंडलरए केवल costumerAA ले आएगा कुछ विचारों के साथ: हैंडलर कार्यान्वयन की जांच करें अगर यह costumer है, तो यह जानता है एक डिस्पैचर बनाएं जांच करता है इनमें से कोई भी अच्छा नहीं लग रहा है क्योंकि आपको हमेशा संरचना को हार्डकोड करने की आवश्यकता होती है। यदि आप एक अन्य उपखंड को जोड़ते हैं तो आपको सभी तर्क बदलना होगा जो कि बहुत खराब है की जांच करता है। सटीक आवश्यकता, ऐसा लगता है कि केवल प्रत्येक वर्ग या उपवर्ग को पता होना चाहिए कि वह अन्य श्रेणी में संबंधित वर्ग या उपवर्ग है। मुझे इसके उपवर्गों को जानने की कोई आवश्यकता नहीं है कई सरल कार्यान्वयन आपकी ज़रूरत के अनुरूप हो सकता है: