Posts

Showing posts from March, 2010

- Where Developers Learn, Share, & Build Careers

I am in the process of learning subversion, and by now I have learned one or two things, and I have a simple project To store, just created a Google code account and a svn repository, my problem is how to organize my svn repository. Imagine I just have an Android project called "Hello World" and a test project called "Hello World Test" Made, why Both projects should import my repository trunk? Does it make sense to put my exam project in the repository trunk? SSIT in local file: From the best practices suggested by Google: / P> You can create a test project anywhere in your file system, but the best way is to add the test project so that its root directory is at the same level as the src / directory is the main application Project This helps you find the tests associated with an application Ta does. For example, if the root directory of your application project is a myofix, then you should use the following directory structure: MyProject / Android...

- Where Developers Learn, Share, & Build Careers

I need to deploy a file fileC which is a combination of two other files fileA and fileB . In my current setup, the three files are in the cookbook, which has been declared a cookbook file resource. But it is unnecessary that I would like to announce the big file as the function of two other people. When I needed the fileC before, I found the file resource's content to be "almost done" by destroying IO.read (file1) + IO.read (file2) as . But as soon as the recipe is deployed to a node, because fileA and fileB are not present at the compilation time. I tried to use the information of Ruby objects where the cookbook can be deployed. But the more I saw, the more I believed that my chef / ruby ​​is possible with the level of knowledge. The resource provider gap looks very broad. I would like to avoid the solution of the cat fileA fileB> fileC type for the following reason: In the future, I will need to reduce nodes which require nodes from C That i...

- Where Developers Learn, Share, & Build Careers

In setting parameters for my component, I want one of them to be an article ID that opens and uses is done. According to, text is the only option. Can the integers be specified, or is there any way to validate the input? As far as I know, text is your only standard solution Joomla, however, allows for custom parameter types. You can imagine that for an integer, but if this is for article selection only, then what can you do for Joomla for the com_content component? Create a new folder in your admin component called: admin \ component \ com_mycomponent \ elements Copy admin \ components \ com_content \ elements \ article.php in your new folder (and for index.html security) You can now add "Articles" to your component as shown below You can specify a parameter type, and component configuration will have a dropdown of your articles. Be sure to include the adapter in your Elements folder in your "Parameters". & lt; Parameter addpath =...

php - SQL JOINs with CakePHP -

मेरे पास एक चित्र तालिका और एक सर्वर तालिका है। छवियों में एक server_id फ़ील्ड है जो आईडी फ़ील्ड में सर्वर तालिका के लिए एक विदेशी कुंजी है सर्वर तालिका में नाम नामक फ़ील्ड भी है, जो मुझे प्राप्त करना है। यहां मेरा नियंत्रक कार्रवाई कोड है: $ images = $ this- & gt; छवि- & gt; खोजें ('सभी', सरणी ('शर्तें' = & gt; सरणी ('Image.user_id' = & gt; $ this- & gt; Auth- & gt; उपयोगकर्ता ('आईडी')), 'ऑर्डर' = & gt; सरणी ('Image.uploaded DESC'))); $ इस- & gt; सेट ('चित्र', $ चित्र); इस तरह से डेटा प्राप्त होता है: सरणी ([0] = & gt; सरणी ([छवि] = & gt; सरणी ([आईडी] = & gt ; 103 [orig_name] = & gt; शीर्षक रहित- 5.jpg [हैश] = & gt; MnfWKk [फाइलनाम] = & gt; MnfWKk.jpg [अपलोड किए गए] = & gt; 2012-07-12 00:09:08 [दृश्य] = & gt ; 0 [album_id] = & gt; [user_id] = & gt; 15 [server_id] = & gt; 1))) server_id के बजाय, मैं चाहता हूं सर्वर ताल...

php - Pass array values into select option fields within a form? -

This is based in PHP. Is it possible to take an array like this: $ SELECT_INDUSTRY = array ("medicine" => gt; "attribute", "medical" => Specialty "," hair disease "=>" specialty "); And pass those two values ​​in something like this: & lt; Select & gt; & Lt; Option value = "$ SELECT_INDUSTRY []" & gt; $ SELECT_INDUSTRY [] & lt; / Options & gt; & Lt; / Select & gt; Where the medical value is being given, and the special public must face. This is the function I use for the actual selection box: $ SELECT_INDUSTRY = array ("medical", "medical", "hair disease"); $ FORM_SELECT_SIZE = 'Input-min'; Function get_options_industry ($ arr = array ()) {global $ FORM_SELECT_SIZE; = "Industry" & gt; Industry & lt; / Label & gt; & Lt; Div class = "controls" & gt; & Lt; Echo to select name &...

objective c - Draw bordered text efficiently in iOS -

I have a view with a custom drawRect method in which there are two text lines in the fixed width. This view is constantly being copied at a rate of about 16 timers per second, the state of the text and the content of the text varies from time to time. I need to be prepared in such a way that it is clearly visible in any background, and for that purpose I do the following: CGContextSetTextDrawingMode (ctx, kCGTextStroke); // Border mode [string dotau point: point to font: font]; CGContextSetTextDrawingMode (ctx, kCGTextFill); // text mode [string drawAtPoint: with point font: font]; This code draws text in range mode with fixed line width, and then drages the text to the same position, but in the fill mode. In this way, I get a blue text with white border around each letter. Except for the performance, it is absolutely satisfying for me to use the Time Profiler that I have seen that approximately 70% of the spent time spent on drawing the whole scene is used to execute the...

- Where Developers Learn, Share, & Build Careers

Elements should be user-editable, so that it can be cleaned (Selenium :: WebDriver :: Error: : Invalid ElementStart Error) (Eval): 2: In `attach_file` When I run my facility that contains attach_file step, this will give me this error is. Here is the line of my feature that fails: and "file_field" / "file / cake / 1.jpeg" file for "file_field" And here is my step definition: when / ^ (?: | I) attach the file "([^"] *) "To" ([^ "] *)" What is it? (?: "(":: "(" [: ":]" $ / Do | path, field, selector | with_scope (selector) enclosed_file (field, path) is within the end ( The body knows what the problem is? There is a problem in Capibara 2. See.

Chrome equivalent of Firefox Firebug CSS select path -

I've taken steps for Chrome, but this is one of the most troublesome features with 'Firebug Lite' That it allows you to copy the CSS path of the object. In Firefox, I mean to visit, go to google.com and inspect the logo with firebug. Right-click on 'hploos' and select 'copy css path'. You will get something: html body # gsr div # main span # body.ctr-p center div # lga div div # hplogo this is an incredible This is a useful feature that I can not get on Chrome, it seems that you can only copy Xpath. Is there any way to use this type of functionality in Chrome? There is no fundamental way to get this information in Chrome You can do a bunch of hacks using jQuery and bookmarks as a hack: Also here: However, you should get this extension you want, and for a little easier use: This will drag XPath and CSS paths and will allow you to easily copy the text.

javascript - function while loop -

I'm trying to work this function properly in JavaScript, okay it's working properly I can down console.log (work ("gallon water is extracted from carpet.")); I can not be removed from the "gallon water carpet." To show in the same line of code. // global variable var water gallon = 40 var function = function (total) {var water = 0; While (water and lieutenant; water gallon) {console.log ("carpet company was called to remove" + water + "gallons of water.) Water + = 4;}; Return Water Galon;} Console.log ( The work ("The gallon of water is extracted from the carpet.")); So what I am doing using the answers I have received has helped me because of the global variable I need to use I, my story will change by changing the global variable. var total = 40 var = Function (total) {var water = 0; while (water and lift; total) {console.log ("carpet company was called to" + water + "to extract from the water jum.) Wate...

- Where Developers Learn, Share, & Build Careers

As I call my SP, it only gives me the first result, and on the second call, Returns: / P> Error: SQLSTATE [HY000]: General error: 2014 can not execute questions, while other unanswered questions are active. Consider using PDOStatement :: fetchAll (). Alternatively, if your code is only running against mysql, then you can enable query buffering by setting the PDO: MYSQL_ATTR_USE_BUFFERED_QUERY setting. Well, I have examined the related questions as some suggested by Staxahovarflow gave me this idea, but when I tried it did not work. This is a loop inside my function that makes my SP call: foreach ($ filenames $ value) {$ queryssid = "call GetUniqueSSIDByCategoryCombine ('$ username ',' $ Value '); "; $ DataAssenseId = $ this-> User- & gt; Query ($ queryssid); Public relations ($ dataUniqueSSID); } This is my sp: make DEFINER = 'root` @ localhost process' GetUniqueSSIDByCategoryCombine` (URI VARARAR (50), file name VARCHAR ( 50...

- Where Developers Learn, Share, & Build Careers

itemprop = "text"> Long story short, a co-worker's computer crashed and lost its work with its last push. As a last resort, I thought that before they were originally transferred from the original to the local, before it was ascertained to what extent the origin was revealed. If the original is working at some temporary place, does it anyway come back to the code? In GIT, the remote only "tracks" through a different repository through two * mechanisms: fetch , in which they explicitly request references, and push , in which reference is provided to them from any other repository If the entire local drive has become corrupted, and now you can save most of the .git directory in the repository, then you are sadly limited to the drive recovery Methods - GIT can not help you beyond this: Sorry (( If you have a repository and it's just in a bad condition, then the git reflog command can help you , Or if you offer more specificity then you can ...

linux - hacking whoami to return a fake username -

I have created a new whoami command for which a fake username is required and / The path created by adding in .profile is made in a way that is written in the written form which is called whoami before the actual yonamite The main reason for doing this is that I have a Hadoop cluster I'm using remotely to access and copy the files under the duplicate usernames I received. When I call whoami in the shell and even call $ PATH, then all this works well, before all of my Shrimated shows the way to humami. But for some reasons, when Hadop is called, then it does not take the created 'Jomi' > Most users do not use whoami to define a user's username or group. For example, to get more detailed information about you or id [username] (like id root ), enter id You can also use groups with groups to get more detailed information about other users, in addition to various programming languages ​​such as C to determine user identity Are your ways Ase t...

- Where Developers Learn, Share, & Build Careers

I get some instructions on how to install git, but they do not need leopard or something , Or do not require some skills to manually install. I suck with computer, so I will actually find an answer for the answer to the computer. My computer is MacBook Air with Mac OS X 10.5.8. You can try MacPortes - MacPorts Install the DMG file, then in the terminal, do the following: sudo port install git If you want a GUI front end for GII, then you Check for Mac and / or GitHub. (I believe the latter will work with non-GitHub accounts) There is also software which is paid.

oauth 2.0 - How do I access posts.xml from GAS? -

I am trying to URLet RSS / Atom feed from my site's news page "Post" URL. This works for me as a logged user in the browser. I want to url a file because it looks super fast way to get the count of pages and date (& lt; 2 seconds). Do this via SitesApp page recurrence or 5 to 25 seconds of search). The site is a small content with lightweight content & lt; 50 pages. Anyway, so I want to url the URL of my site and I think that I need the oyoth area and will receive a token. I use it on the "https: / /sites.google.com/feeds/" GDAT sites API and on Playground 2.0 and this document works for API feed url but my site's Post. Not for XML URL So my question is: Is it possible to use ULFET with UAL token for the use of pages? I have a 401 "token invalid - there is a wrong scope in Athshub tokens" when I try to access it in the playground. Posts.xml? What out scope are I using to get a token? URLFchap currently only supports OAuth 1...

java - How to make the row editable(false) in JTable -

संभव डुप्लिकेट: मैं नेटबीन्स का उपयोग कर एक आवेदन विकसित कर रहा हूं। मैंने एक जेटीबल प्रारूप में एक रिपोर्ट तैयार की है। यह ठीक से काम करता है लेकिन पंक्तियों और कॉलम संपादन योग्य हैं, और मैं उन्हें गैर-संपादन योग्य। अपने टेबल मॉडल में आप isCellEditable () विधि: सार्वजनिक वर्ग MyModel डिफ़ॉल्टTableModel {सार्वजनिक MyModel (वस्तु [] [] डेटा, ऑब्जेक्ट [] cols) {super (data, cols); } सार्वजनिक बूलियन है CellEditable (int row, int col) {return false; }}

javascript - how to get WFS later? GeoExt -

Can you help me with WFS on GeoX? Read the tutorial and see this code. Proxy: New GeoExt.data.ProtocolProxy ({Protocol: New Open Layers. Protocol. WFS ({url: "/ geoserver / ows", Version: "1.1.0", FeatureTip: "Park", feature ns: "http://medford.opengeo.org", srsName: "EPSG: 4326"}}}) After this I have this vector vector layer = new See Open Layer. Layer.Vector ("Editable Features"); And do not understand how to make a layer. So I have some questions. How to get 1 URL? (I use Geosarvers) 2 Type the specialty feature. 3 more important. Is this code correct? I search for it here Hope it helps someone // wfs var myStyle = OpenLayers.Util.extend ({}, open layers.feature.vector style ['default']); MyStyle.strokeWidth = 1.5; MyStyle.strokeColor = "# ff0000"; MyStyle.fillOpacity = 0.1; OpenLayers.ProxyHost = "proxy.cgi? Url ="; Var Renderer = Open Layers.out.get parameter (window.location.h...

What is the difference between OmniAuth Identity strategy and Devise? -

I'm looking for authentication options for my train app, the option to link the user with their Facebook, Twitter, Foursquare etc. Username / password authentication is required. I usually search for people who use Devise and OmniAuth for this purpose. But, OmniAuth 1.0 comes with Omnibus Identification Strategy for username / password, so what's the benefit of using Devise? Will not this an Omniaith create unnecessary complication than just authentication? With OmniAuth-identification you can create a user and authenticate it with OmniAuth OmniAuth - Another provider for identity authentication and you can not link it to other providers, such as Twitter, Facebook etc. It has been mentioned at the very end. Use Devise + OmniAuth (see) if you want to link it.

- Where Developers Learn, Share, & Build Careers

Here I settled the method in aspx.cs, but I'm not sure how to deal with objects Is Obvisoly correctly I surf it from the net and used it in my code, can you please say that the object is removing in the right format. This is my method aspx.cs public list & lt; Cause field & gt; List (datatelle dt) {list & lt; Cause field & gt; Lst = new list & lt; Causefield & gt; (); Foreach (DataRow line in dt.rows) {Uses (due to reasons FacebookBook sign up its description = new reasonfield ()) {SignUpDetails.FirstName = line ["first name"]. ToString (); SignUpDetails.ListName = Line ["Last name"]. ToString (); SignUpDetails.Birthdate = Line ["Birthday"]. ToString (); SignUpDetails.Gender = Line ["Gender"]. ToString (); Lst.Add (SignUpDetails); SignUpDetails.Dispose (); }} Return List; } My class file: Completion of public class reasons: IDisposable {public string first name {get; Set; } Public String LastName {get; S...

java - How to create buttons and other images required for a project -

Basically I'm a Java developer and I want to know how to create the necessary buttons and other images for my Java project. P> According to my knowledge, we will use Photoshop to create images. But someone tells me the exact process and any related videos or links how to do this task. EDIT: According to your comments, you may want to take a look at this. As far as buttons and images are concerned, all you need is a plain HTML tag. In addition, if you are considering creating an N-tier web application, then you might want to take a look at a framework (like tutorial). Spring should make some things easy.

html - Why is there a visible gap between adjacent DIVs on iOS Safari? -

Image
After pulling all my hair, it has come to this minimal HTML page which appears to be incorrect on iOS: & lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Style type = "text / css" & gt; # Folds {background: url (https://s3.amazonaws.com/gigantt_pub_imgs/2012/07/1342078193.png) top left; Minute-height: 350px; } # Feature {background: url (https://s3.amazonaws.com/gigantt_pub_imgs/2012/07/1342078193.png) top left; Minute-height: 350px; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "fold" & gt; & Lt; / Div & gt; & Lt; Div id = "features" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; On seeing in iOS (or for that case in the iOS simulator), you can see a small line between two blue divisions. If you zoom in So this white line disappears. And of course this is not visible in any other de...

MongoDB Service taking off -

Whenever the server has started the Monggoode service, its display and use of PF will have to be shot up to 3.5 9 GB, although it has good configuration (Server 2008, 4GB RAM) and the mongled 64 bit latest release (2.0.6) Is using. Please understand me about this. Thanks I'm not sure how much you know about MongoDB But Mongo uses memory map files to access data, which results in a large number of monogodes are displayed for the process. When using memory-mapped files, this is normal. The amount of mapped datafile is divided into virtual size parameters Is shown in and Asey bytes show how much data is being cached in RAM. Bigger your data files, the maximum voxize of the Mongode process If other processes require more RAM, then the virtual memory manager of the operating system will discard some memory from the cache and the bytes remaining on the monogode process will be left. It is recommended to use a certain pagefile size. If you use a dynamic page file, t...

Embedding Java in PHP -

संभव डुप्लिकेट: अब एक समय के लिए, मैं खोज रहा हूं कि जावा में PHP कैसे एम्बेड किया जाए, लेकिन ऐसे प्रश्न पाए गए, जो संभव समाधान और दूसरों को बताते हैं कि यह असंभव है। मुझे कुछ जावा कोड काम करना है और मुझे ज़रूरत है यह एक php अनुप्रयोग में काम कर रहा है, मैंने php भाषा में एक ही सटीक कोड बनाने की कोशिश की (ज़ाहिर है, php में), लेकिन यह काम नहीं करता, इसलिए, मुझे क्या जानना है: मैं कैसे कर सकता हूं आपको पूछना चाहिए अपने आप को जो आपकी वास्तविक समस्या के लिए सही तकनीक, वास्तुकला और प्रोग्रामिंग भाषा है और यह विशेष रूप से कौशल के बारे में आपकी समग्र रणनीति से संबंधित है। आपको अपनी समस्याओं को बड़े पैमाने पर हल करने के लिए उपयुक्त उपकरणों के एक सेट को सीमित करने की कोशिश करते हुए किसी समस्या के लिए "सही" उपकरण का उपयोग करना चाहिए। यदि आप अपने मामले में कुछ वेब फीचर्स के लिए PHP की आवश्यकता है तो आप जावा सर्वर फ़ंक्शंस कॉल करने की जांच कर सकते हैं उदा। REST या अन्य संचार प्रौद्योगिकियों के माध्यम से।

Java SPI - ServiceLoader - adding multiple JAR's to APP classpath -

I have a problem in implementing this argument in my project using Im ServiceLoader and I do not know or This is also possible, but I want to add JARs to some known directory for dynamic app so that the app can load them when it starts. What I have achieved is that I know how to make a jar (with meta-INF / services) so that I will add more and more providers and classes (implementation) to this jar. Jar is included in class like ordinary library, so the app knows about it. What I want to achieve: I do not want to file a jar, but I want to extend the application by adding more jar like plugins, along with the providers (services), but I do not know how. Thanks for the help! You just need (a) URLClassLoader which is created with all the URLs of those directories Please call JR files, and (B) calls.

- Where Developers Learn, Share, & Build Careers

I have a mxn two-dimensional array of an object Foo . So I have foo [] [] foosArray . In Java, the list & lt; Foo & gt; What is the best way to change it? this [[array [0] -alems], [array] [2] 1] ames] ...] public & lt; T & gt; & Lt; T & gt; Dodiarolist (T [] [] Two Eduardo) {List & lt; T & gt; List = New Arrestist & lt; T & gt; (); (T [] array: dodayarere) {list.addAll (Arrays.asList (array)); } Return list; }

tfs - storing knowledge in team foundation server -

We use Team Foundation Server I was wondering if it is possible to store knowledge in any form in TFS . For example, if someone fixes a bug, it would be good to document the solution and it will also be available for others / search (other team projects). The solution can actually be applied in other contexts. We also use SharePoint, so the integration of both of these is possible. For a workgroup for localized information (say, a screenshot for a bug, etc.) that There is a way to distribute data directly in the workplace. Consider the SharePoint in the life-time data that is beyond the working knowledge (knowledge base accessories, ongoing documentation, etc.). So for your example, if there was some data to get rid of the defect that was localized and there was no real long term value, then you would leave it in the workplace for historical reasons - but if for this If there is long-term value, then consider sharing it back into Sharepoint (Wiki or any other document), an...

extjs4 - Generating about thousand or more controls with ExtJS -

We have decided to use Extjs for one of our large application's web remakes and we need to create a screen / form Where we then will I know what is the best way to do this? I have tried to create about it in thousand control and client-side takes more than 6 seconds and that is also dependent on client configuration which I am positive about at least - The least dual-core system will be most of the time. But on the local host more than 6 seconds is like 10 seconds on the internet so I'm worried, I have the option of mixing the normal HTML form / controls when there is a high load, but then it's EXJEs Touch (Combo / number control, etc.), any help or share if you feel the same. What would the XTemplate be faster in the above case? I am still new to extjs if you know / share best practices. The best way to do it in such a way is to create thousands of controls in large amounts Memory will be needed, no matter how you do it, as you have seen, it makes an appli...

Where are the sample projects in Xcode 4? -

In older versions of Xcode they are in the developer folder, just thinking they are now available, what do I download From somewhere? If you want the project name you want from the Documentation tab in the Organizer, you can choose simple "Open Project" And it will be downloaded to the folder of your choice. Make sure that you first use xCode / Preferences / Downloads / Documentation / Check & amp; Install now.

- Where Developers Learn, Share, & Build Careers

I have followed the C # code and is it possible to convert an easy to javascript? I need this to run 100% of the browser. As I understand that anangam does not exist and can be replaced with a string instead. In short, a class deck holds an array of witch cards, the class card has some properties, including ranks, symbols, etc. and also has a shuffle function. I hope no one has to change all the code here, but how can I do this as an indicator. Public Enum Suites {Club, Diamond, Heart, Spade}; Public class card {public suit suit; Public full value; Public string text; Public intercourse HCP; Public card () {} public card (suite_ suite, int-value, int_HCP, string_text) {suit = _suit; Value = _value; HCP = _HCP; Text = _text; }}; Public square deck {public card [] card = new card [52]; Public deck () {card [0] = new card (suit.pad, 14, 4, "A"); Card [1] = new card (suit.pad, 13, 3, "K"); Card [2] = new card (suit.pad, 12, 2, "Q"); Card [3] = New c...

- Where Developers Learn, Share, & Build Careers

I have an ideal in which I have an abstract class (it's called vehicle ) and Classes in the form of many heritage bikes , motorbike , car , van etc., it is basically a real Simplified version is world problem Abstract class auto id; Int wheelcount; String OwnerName; Class Bike Datetime Latest Security Checks; Class motorbike-engine engine class car double engines class van double storage capacitance I have a system that is IEnumerable & lt; Vehicle & gt; in which each of these threads is contained in Secure Singleton Class, which essentially acts as an in-memory database. I want to make a method in my application (in singleton or separate class) which allows me to query only for a certain type of vehicle. Initially I thought of a method: Internal IEnumerable & lt; T & gt; GetVehicles & lt; T & gt; () Where T: Vehicle In order to be able to provide a type T , which would like to retrieve that type. I know that I can use type () to...

postgresql - Dedicated database server heavy iowait spikes -

We have a dedicated database server that runs PostgreSQL 8.3 on Linux Debian. The database is being routinely inquiries for a lot of data, while updates / insertions are often done. Databases are not a response to a short period (like 10 seconds) and then it can be used for normal performance Goes in again flows. What I saw through the top is that the time that remains for as it is during a iowait nail that is, until the database does not respond, the pdflush becomes active at the same time. So my idea is that the PDF has to write back data from the cache memory space on the disk based on the messy page and background ratio. The rest of the time, when PostGraceCalclass works normally, no iPhite is running because pdflush is not active. The values ​​for my VM are as follows: dirty_background_ratio = 5 dirty_ratio = 10 dirty_expire_centisecs = 3000 My meminfo: I'm thinking of making changes The uration, which remains in a dirty page memory (dirty_expire_centisecs), a...

asp.net mvc 3 - A first chance exception of type 'System.Data.OptimisticConcurrencyException' occurred in System.Data.Entity.dll -

Good afternoon, completely stumped on this one. Everything was recovering until I add more records to my database. I get this error when I press edit: Type 'system.Data.OptimisticConcurrencyException' is a first exception to System.Data.Entity.dll My code is as follows: Edit Public Functionality (int id) {From time to time = DB. time. Single (T = & gt; T.index == ID); See Return (Time); } // // Post: / Default 1 / Edit / 5 [HTPOST] Edit Public Action Result (Time Timing) {System.Diagnostics.Debug.WriteLine ("HERE"); If (ModelState.IsValid) {db.Times.Attach (time); Db.ObjectStateManager.ChangeObjectState (Time, EntityState.Modified); Db.SaveChanges (); Return Redirect Action ("Index"); } View return (time); } I was doing MVC programming for that long, so the laymans terms will be welcomed! Thanks I have started a new project and the whole of the controllers, The code is copied, it seems that has worked. I think the main issue was ...

iphone - SimpleAudioEngine takes time to play sound -

I use SimpleAudioEngine to play sound in my cocos2D application I am If I have to tap on a button and shoot a bullet, then the sound of the sound is going to continue shooting pills. When I continually tap the button to shoot, the game footage shocks this when I am integrating sounds This is the code that I tap on the button: - (zero) rocket buttontap: (id) sender {[simple audio engine shared engine] playfact: @ "rocket_ford.WOW"]; NSLog (@ "pencil rocket"); If (int_pencilRocketTagCount> gt = 220) {int_pencilRocketTagCount = 215; } [Self Performance Selector: @Sillector (Shoot Pencil Rocket)]; } Please suggest me a path ... thanks in advance .. Before the game starts, do this: [[SimpleAdOonIngin Shared Eggine] Preload Effect: @ "Rocketfire.wave"]; This effect loads into memory if the problem does not fix it then the problem may be somewhere else. For example, many sound effects play at once if the rocket fire sound is several sec...

- Where Developers Learn, Share, & Build Careers

परिदृश्य निम्न है: jdeveloper के साथ एक jsp अनुप्रयोग विकसित करना ओरेकल वेबलॉगिक में तैनाती सभी फाइलें एक ही प्रोजेक्ट में हैं स्रोत फाइलें src फ़ोल्डर के अंदर के अंदर हैं अंदर संसाधन फ़ोल्डर दो फ़ाइलें हैं: menu.json और TestWS.properties इसलिए , मैंने एक जावा वर्ग बनाया है जिसे menu.json पढ़ना चाहिए और इसकी संरचना के आधार पर एक मेनू (html) में वापस करना होगा। जब कक्षा के अंदर, मैं ऐसा करता हूं InputStream I = Thread.currentThread ()। GetContextClassLoader () getResourceAsStream ( "संसाधन / menu.json"); BufferedReader r = नया BufferedReader (नया InputStreamReader (i)); InputStreamReader कंस्ट्रक्टर एक NullPointerException फेंकता है, मुझे लगता है क्योंकि यह फ़ाइल नहीं मिल सकता है। मजेदार बात यह है, अगर मैं TestWS.properties को लोड करने की कोशिश करता हूं, तो इसे ठीक से लोड किया जाता है। मैंने परियोजना के गुणों की जाँच करने की कोशिश की, मैन्युअल रूप से परियोजना के अंतर्गत दोनों फाइलें जोड़ दी स्रोत पथ - & gt; संसाधन , .json को...

How to detect blue color object using opencv -

Image
I'm using that to detect blobs of a certain color. On that guide, it checks the orange blob and uses these values: int orange [3] = {200, 250, 10}; On the guide it says that this value represents orange in HSV. I do not know how they calculate these values, but I try to check the value of the blue color converted from RGB to HSV but it does not work. I want to find this color: How to fix HSV value to detect colors, any ideas? For blue , it can be used as HSV values: thanks! [120,255,255] I call it GIMP An open source image processing tool like Photoshop. Similarly you can use any tool to do this. But remember in OpenCV, Hu from 0-180, S = 0-255, V = 0-255 but in GIMP, Strong> This is H = 0-360, S = 0-100, V = 0-100 . So you have to implement scaling accordingly. Many interactive sites are available on Googling, you can try it. Check how to change these values ​​ Or you can see OpenCV docs to see how it works in OpenCV: I have affixed th...

c# - How can I design a window too look just like this pop-up in windows 7 taskbar? -

Image
I need a round thick border and a single color. Is this visual available anywhere in the studio form? Here's one: Add a new look. SetControlBox = false. ShowIcon = false. SetGripStyle = Hide Add three required buttons using the docking functionality. / Li> I hope it helps. Note. When you run it, you will see excellence as needed. Then you have to worry about the situation, but this is another question ...

php - Submit a form inside colorbox with ajax -

I used this code to post data from within the Color Boxes window until I entered encoding errors Instead of "ΔΙΧΡΩΜΟ" "ΞΞΞ§Ξ'Ξ © ΞΞ": $ ("# productadd") was doing. Submit (function () ($ (.post ($ (this) .attr ('Action'), $ (this). Serialize (), Function (Data) {Warning ('Added to Product Cart!'); $ (). Colorbox.close ();}); After some searching, I decided to change my code, so I can set the encoding while posting, but it Some help is needed to complete: $. Ajax ({type: post}, url: $ (this) .attr ('action'), contentType: "application / json; Charset = iso-8859-7 ", data type:" json ", data:" {id: '' + someId + "'}", success: ph Quote (Jason) {Warning ('Product Added to Cart!'), $ (). Colorbox.close (), $ ("#Success") .HTML ("json.length =" + Json.length); Items AdClack (JSN);}, Error: (xhr, textStatus, errorThrown) {$ ("# Error") on...

search - is it possible to change the delta import command to delete the unwanted documents based on a criteria? each time when delta import runs -

I have a dataImportScheduler that is configured to increase the index or import the changes, post and the HTTP request. What I want to be able to do, every time Delta Import runs, it should also run a removal query, in which there are some criteria for deleting unwanted data in the index, documenttype: deleted . I'm using Delta Import Query http: // Address: 8080 / SLR-Multicore / Datamport? Command = delta-import and clean = false & amp; Commit = true You used the deleted PkQuery to clear deleted records can do. - & lt; Unit name = "album" query = "SELECT * from album" deleted PkQuery = "deleted deleted id deleted from deleted WHERE deleted_at> '$ {dataimporter.last_index_time}' '& gt; / Code> This will help you delete the record without timestamps.

c# - Creating all binary trees with unique permutations -

I have a silly question that I swear is not homework for my life, I do not remember that I have ever To do this, we have studied an algorithm, and the eye / creativity of my mind is failing me. I have a list of unique nodes I have to generate all the unique changes in the binary tree with these nodes. Chirality, if you are thinking, matters; A binary tree flipped on its axis (left / right) is not the same Some background information, if you are thinking: This is for the evolutionary program for seed production algorithm, A large number of is OK. Edit: Explanation of Specification Example: it: 1 / \ 2 3 Not so: 1 / \ 3 2 1 / 2/3/2>> Eric Lepert has a relevant post (Actually the beginning of the series of posts) The main bit is the recursive LINQ method: Fixed IEnumerable & lt; Node & gt; AllBinaryTrees (integer size) {if (size == 0) returns the new node [] {null}; Select the new node in AllBinaryTrees (size - 1 - i) from AllBinaryTrees (i) with ring (0, ...

visual studio - Does documentation for file Microsoft.CSharp.targets with default C# targets exist? -

जब मैं दृश्य स्टूडियो 2010 में सी # प्रोजेक्ट बनाता है, तो फ़ाइल Microsoft.CSharp.targets शामिल है क्या इसके लिए कोई दस्तावेज उपलब्ध है? इसमें किस लक्ष्य का उपयोग किया जाता है, किस प्रॉपर्टी का उपयोग किया जाता है? विशेष रूप से वीएस के बिना मैन्युअल रूप से स्क्रिप्ट को संपादित करते समय उपयोगी है। लक्ष्य के साथ फाइल की मैन्युअल रूप से जांच की जा सकती है (जो मैं समय-समय पर करता हूं)। लेकिन ऐसे मामलों में यह स्पष्ट नहीं है कि परिवर्तन की बात क्या है, विनिर्देश द्वारा क्या है और क्या नहीं है। हर बार मुझे माइक्रोसॉफ्ट के बारे में कुछ चाहिए। सीएसएआरपी। लक्ष्य मुझे इसे अलग-अलग जगहों में मिला। मुझे सभी विवरणों के साथ "एक स्थान" नहीं मिला है। क्या पूरा संदर्भ उपलब्ध है? धन्यवाद। मुझे पता है कि कोई विशिष्ट दस्तावेज़ नहीं है, यह सी # परियोजनाओं के लिए एक कार्यान्वयन विवरण है। आप MSDN लाइब्रेरी में MSBuild के बारे में बहुत सारे दस्तावेज़ीकरण पा सकते हैं, माइक्रोसॉफ्ट। सीएसरप.लाइजेट्स फ़ाइल में केवल ऐसे लक्ष्य हैं जो सी # प्रोजेक्ट के निर्माण के लिए विशिष्ट हैं। ...

linq - How can I change my method to achive the following? -

I have a way to find a collection of employees by name. I pass the array of last names which I want to meet, and the law gives employees with these names is simple. Public IQueryable & lt; Employee & gt; GetEmployees (IEnumerable & lt; string & gt; last name) {var query = employee. Where (E => Last name is included (E. Last Name)); Return query; } Now I need to change the law so that I can cross the array of partial last names, and get all the employees whose last name matches the partial last name Eat. / P> Public IQueryable & lt; Employee & gt; So if I have employees with these names: Sigourney Weaver, Amanda Beaver, John Smith, Jane Matheson (Ianumerable & lt; String & gt; partial ListNames) And I pass partial "unknown", "mathematics"], it will return a query to me which can be sent to the questioning signer, Weyener, Amanada Beaver and Jane Matheson How can I do this? Thank you I think you are look...

delphi - C# application with unmanaged DLL freezes whole system -

I am currently writing a software in Visual Studio 2012 for communication with RFID-card. The problem is: My software is running fine on the machine, on which VS 2012 is installed on other systems it freezes itself or the whole system I have it x32 and x64 configuration on X XP / 7/8 Trying to do with I am using .NET 4.0. After connecting to the reader, the software background worker, which starts with an order for the invoice card in the reader RF-field with the reader (at the rate of 200ms), reader. What is the actual accident is 10 sec 20 seconds after the reader is connected, in the Private Static Extraction Inventory (Intex ExtraLAN, Infrastructure Experiences) [in] Ref Intel Intel, Interpret UID, UINT 32HFFtime); public string getCardID () {if (ConnectConnectet ()) {IntPtr UIDs = IntPtr.Zero; Int lane = 2 * 8; Byte [] zero = new byte [lane]; UID = Marshall Olochem; len; Thread.Sleep (50); Martial Copy (zero, 0, UID, lane); Int count = 0; Int erg; String writ; Try {erg...

python - Installing pip for python3.3 -

I downloaded the POP Then I then Also, when I try to use pip-3.3 then the terminal is compliant. - Bash: Pip-3.3: Command not found However, pip-2.7 works with deployment. I have also tried curl-o http://python-distribute.org/distribute_setup.py sudo python3.3 distributed_setup.py sudo python3.3 - M easy_IPP but pp3.3 still does not work. What do I do to install PIP for Python 3.3? Note that there is a related thread, but the answer is simply "install distribute ... and then use it to set up the pipe" which is not useful for me because I tried to do it And it is not working. The probability is that pip successfully somewhere However, is not anywhere probably not on your PATH and therefore you do not know the shell (Bash) where to find it. For me, pip-2.6 has been installed in: / library / framework / python. Frameworkwork / version-2.6 / bin / This is a common route for you (3.3 instead of 2.6). Of course, the shell is ...

numpy - Plot really big file in python (5GB) with x axis offset -

Image
I am trying to plot a huge file (~ 5GB) using Python and Metaplib. I am able to load the entire file in memory (there is a total of 16 GB available in the machine), but when I conspired by using simple eyeshov, then I get a split mistake. This is most probable for the upside, which I have set up to 15000 but I can not set the higher I have come to the conclusion that I have to sort my array in batches and therefore have made a simple code to do this. My main purpose is that when I plot a batch of large arrays, the X coordinate starts from 0 always and there is no way that I can overlay the images to make a last big one. Please tell me if you have any suggestions, besides this, I am not able to install new packages like "image" on this machine due to administrative rights. Here is a sample code that reads the first 12 rows of my array and creates 3 plots. Import Import Import SP Import SPP import as sapy import plt import pickle DEF readalllines (file1, rows, freqs) as i...

javascript - Is there a cross browser way to set a timeout on Third Party (cross domain) Async Dom Injected Scripts? -

Our tag manager went down today, from which our site was crawled to an attack. As the code mission manager in the tag manager is not critical (analytics, etc ...), is there any way to do something like that? var extScript = document.createElement ('script'); ExtScript.type = 'text / javascript'; Extcript.src = 'http://third-party.com/scriptfile.js'; Var s = document.getElementsByTagName ('script') [0]; S.parentNode.insertBefore (extScript, s); Window.setTimeout (function () {// script is not loaded - "necklace"}, 3000); // 3 sec If this mission is not important, then you want to keep it The script is loaded at the end of the body tag, as soon as the document is fully loaded. window.onload = function () {var extScript = document.createElement ('script'); ExtScript.type = 'text / javascript'; Extcript.src = 'http://third-party.com/scriptfile.js'; Document.body.appendChild (extScript); }

rails form partial for new and edit on same page -

I'm running into issues trying to isolate a scene partially. I want to use the same form for the new and edit the scenes. Both of these are on the same page The new model is at the top of the form page and uses a variable that I set in the controller. & lt;% = form_for @new_hire do | F | & Gt%; & Lt;% = Render: Partial = & gt; 'New_hire_requests / form' ,: local = & gt; {: F = & gt; F}%> & Lt;% end% & gt; Then I am partial for pending approval which is provided by any other partial and pending approval partial within me & Lt;% end% & gt; This is an error throwing undefined method # & lt; new_hire_request_path '; # & Lt; Class: 0x0000010488ac98 & gt ;: 0x0000010223ffc0 & gt; Is there a way to use form code for both a new and editing form on the same page? Controlling logic @new_share = newhearquest.new @ nuveer_request = current_user.New_shire_requests @ pending_ approval = @ new...

c - function parameters `...` what does it mean? -

संभव डुप्लिकेट: मैं Win32 प्रोग्रामिंग के बारे में एक किताब पढ़ रहा था और मैंने इस तरह से एक फ़ंक्शन देखा था: इंटेल CDECL संदेशबॉक्सप्रिंटफ (टीसीएचएआर * एसज़ कैप्शन, टीसीएचएआर * एसज़फ्रेम, ...) {टीसीएचआर एसज़बफर [1024]; Va_list pArgList; Va_start (पीआरआईएलआईस्ट, एसज़फ्रैट); _vsnprintf (szBuffer, sizeof (szBuffer) / sizeof (TCHAR), szFrmat, pArgList); Va_end (पार्लिस्ट); वापसी संदेशबॉक्स (नल, एसज़बफर, एसज़ कैपेशन, 0); } फ़ंक्शन के मापदंडों में , ... क्या होता है? मैंने खोज के साथ उत्तर ढूंढने की कोशिश की लेकिन मुझे मिल गया उपयोगी कुछ भी नहीं इसका मतलब है कि आप उस फ़ंक्शन के निरर्थक संख्या के तर्कों के बजाय वरीय संख्याओं का तर्क हो सकते हैं। एक आदर्श उपयोग के लिए होगा उदाहरण के लिए, हम कहते हैं कि हमारे पास औसतन फ़ंक्शन है डबल औसत (int num, ...) {va_list तर्क; // तर्क की सूची को संचित करने के लिए एक जगह डबल राशि = 0; Va_start (तर्क, संख्या); // सभी संख्याओं को जमा करने के लिए (int x = 0; x & lt; num; x ++) // लूप के सभी मूल्यों को जमा करने के लिए तर्कों ...

- Where Developers Learn, Share, & Build Careers

I have to keep a workstation connection from two CVS servers running on a Solaris and do a setting in Windows and GT the wanted; Preferences & gt; Team & gt; CVS & gt; Extension Connection Method & gt; CVS_SERVER "/ opt / csw / bin / cvs". The other CVS server runs on Linux and for this, the Settings window & gt; Preferences & gt; Team & gt; CVS & gt; Extension Connection Method & gt; CVS_SERVER "/ usr / bin / cvs" (In fact, the Linux server probably does not require this setting at all, it probably will work with the default path. But the path to the CVS in the default path for SSH login on Solaris does not include So that setting is necessary for Solaris connection. ..) Is there a way to create specific "CVS_SERVER" setting for connection so that a workspace can support two different settings? Of course, I know that symbolic links can be seen both paths similar to CVS to both servers or both servers, but I ho...

- Where Developers Learn, Share, & Build Careers

I'm working on a little iPhone app I am trying to change the font and color of the text inputed by the user I am They type something and then click on a button and the font or color changes and is displayed. I can not find any example code of this online, should anyone do this how it can be done? Thank you If you are accumulating text and display it, but this font for label A basic example of implementing changes is [myLabel setFont: [UIFont fontWithName: @ "someFontName" size: 1 9]]; Edit: - (IBAction) changeFont: (UIButton *) sender {[myLabel setText: myTextField.text]; [MyLabel set font: [UIFont fontWithName: @ "someFontName" Size: 1 9]]; }

How to ensure Blob metadata is kept when copying blob in Python App Engine -

I am uploading an image file on the server and resizing it to save the disk space in the datastore. My method of resizing and then removing the original blob and keeping the small version of the blob all the metadata removed. Is there a way to copy Blob metadata from the original blob and copy it to a smaller version? def post (auto): upload_files = self.get_uploads ('file') blob_info = Upload_files [0] if blob_info: img = images.image (blob_key = blob_info) img.im_feeling_lucky () Img.resize (width = 600, height = 800) smallVersion = img.execute_transforms (output_encoding = images.JPEG) file_name = files with files.open (file_name, 'a') blobstore.create (mime_type = 'image / jpeg' ) F: In the form of f.write (smallVersion) files. Finalize (file_name) blob_key = files.blobstore.get_blob_key (file_name) blobstore Delete (blob_info.key ()) blobCacheURL = images.get_serving_url (blob_key) when If you create a Blob with the file API, you can set the up...

bash - Kill sibling process -

मुझे एक स्क्रिप्ट है जिसे: एक ट्रिगर करें 2 & amp; & gt; 1 | कम-आर फ़ोल्डर में हर परिवर्तन को सुनें ( inotifywait -R का उपयोग करके) जब फ़ोल्डर संशोधित होता है , स्क्रिप्ट को कम प्रक्रिया को मारना होगा और पुनरारंभ करना होगा। मुझे यह करने के लिए सही तरीके के बारे में निश्चित नहीं है (चलाने के लिए स्क्रिप्ट की दो शाखाओं को अनुमति दें समांतर में + देखे जाने की नौकरी को कम नौकरी के बारे में पता करने की अनुमति देता है, क्योंकि बाद वाले को अग्रभूमि में होना है)। अगर आप हर बार कुछ बदल गया है, तो आप स्वचालित रीकंपाइल ट्रिगर करना चाहते हैं, तो आप निम्न प्रयास कर सकते हैं: जबकि inotifywait -qqr / dir /देखने के लिए; बनाओ | कम किया गया मुझे एहसास है कि यह समाधान प्रत्येक कमांड को हर बार पुनः कंपाइल जारी करने से नहीं मारता उपर्युक्त एक मामूली भिन्नता निम्न के बाद कम करना है: जबकि inotifywait -qqr / dir / to / watch; करो कम यह संस्करण तुरंत पुनः कंपाइल को ट्रिगर करेगा (पहले मेक समाप्त होने के बाद), लेकिन यह आपको कम से कम आउटपुट के माध्यम से पृष्ठ की आव...

tablet - When is available to buy Surface with Windows 8 Pro? -

Depending on the Windows site, it indicates that the surface is coming soon with Windows 8 Pro. So the question is when it will be on the market Microsoft said two months ago that ground supporters will be available After 3 months of surface RT launch, it keeps the launch date in the last days of January or early February. Windows 8 is expected to begin about 90 days later, H Focal Points for the tech industry in the first quarter of 2013.

java - Where is the exception caught? -

I am reading a friend's note from the class, and I'm wondering what answer is in response to the question ? Public invalid withdrawal (double amount) {if (amount & gt; remaining)) {Invalid illegal collection exception exception1 = new invalid record exception ("amount exceeded balance"); Exception 1; // where caught ?? } Balance = balance - amount; } Invalid agreement exception is an unchecked exception, so if you hold it somewhere Your program will move it all the way until it accesses VM and prevents execution. With JBNizet credits: When your method is brought from the thread which is not the main thread, the thread will be closed when the exception is thrown. But the main thread will continue its execution.

NoClassDefFoundError developing library with Android app, Maven, and Eclipse -

Image
I am developing an Android library () whose artwork is managed through Maven, and for development I'm using Eclipse. I am packing artifacts as a jar file, because I do not have any assets in the project, there are only Java classes and there are also. I am also developing an Android User Interface application () It depends on the SiriRestClient library Problem: I started because Maven SiriRestClientUI dependency management on SiriRestClient library, if I have a library project and open simultaneously in SiriRestClientUI eclipse, I get a NoClassDefFoundError when I try to deploy SiriRestClientUI app for a device Please. For example: 11-01 16: 11: 52.288: E / Android Random (9 409): java.lang.NoClassDefFound error: edu.usf .cutr.siri. Android.client.config.SiriJacksonConfig 11-01 16: 11: 52.288: E / AndroidRuntime (9409): at edu.usf.cutr.siri.android.ui.MainActivity.onCreate (MainActivity.java:100) 11-01 16 : 11: 52.288: E / Android Random (9 409): Android. App Activ...

- Where Developers Learn, Share, & Build Careers

I have an object, which has some XML metadata in the form of a property named Metadata XML. I need to capture values ​​within XML tags and store them in php variables. I have been able to do this on the XML structure: [MetadataXML] => "& Lt; metadata & gt; title & gt; a title & lt; / titel & gt; & lt; body & gt; some text in body & lt; / body & gt; & lt; / metadata & gt;" with this code: $ meta = simplexml_load_string ($ item-> metadata xml); $ Heading = (string) $ meta-> Title; $ Body = (string) $ meta- & gt; the body; But now I have an XML structure that looks like this: & lt; Metadata & gt; & Lt; Two_related_books & gt; & Lt; Book & gt; & Lt; ID & gt; 20 & lt; / Id & gt; & Lt; Title & gt; A title & lt; / Title & gt; & Lt; / Book & gt; & Lt; Book & gt; & Lt; ID & gt; 55 & lt; / Id & gt; & Lt; Title & gt; ...

python - Why does my class raise an AttributeError? -

I can be blind, but I can not really see why this class fails: AttributeError: DataTime Import TimeDelta Class in the Next Sandwich Event NextSunday (): Datetime Import Datetime from DataTime Import Time from Def __init __ (Self, Trigger = 1) An attribute 'Trigger' from datetime ' none): "" "Get the date, and until next Sunday, until the following Sunday. Logic: -` trigger ': an extra week which Hen If the number of days is less than the trigger. "" "Self.str = u '% s% S days)% (Swdeti). Date (), self No_de ()) self.trigger = trigger dig __incodes __ (self): return self. RRF __str __ (self): Return Unicode (self) encode ('utf-8') def __repr __ (self): Return '& lt; Next Sunday: '+ self .str +' & gt; Def no_days (self): "" "Get the next Sunday date." "Day" = no limit to (7): dt = datetime.now () + timedelta (days = i) if dt.weekday () = 6: days = i # add another week if...

java - Convert Map to Sorted List -

I try to convert a map to an ordered list Based on the values ​​in the map Suppose I have the following: Maps & lt; String, integer & gt; Map = maps.newHashMap (); Map.put ("foo", 1); Map.put ("boo", 3); Map.put ("bar", 2); // List integer value - List of ASC or DESC & lt; String & gt; List = // elegant guava call? The list should be: {foo, bar, boo} list & lt ; String & gt; List = ordering Natural (). OnResultOf (functions .map) .sortcopy (map.keySet ()); ... I think?