Posts

Showing posts from May, 2010

Is it possible to encode a video on client machine with a click of a button on the browser? -

This is a strange request from my client and they want to encode video using customer's machine instead of reducing customers. Server workload I wonder if this is possible? For example, I have this video and then I click the download button to download, which will download the video in my current format, and then download it will be encoded in the other format so that the client's media player Can be playable such as Windows Media Player and with more than 10 years as a programmer for my experience, I do not think Something like this is possible that there is at least one that is cross-browser compatible ... I was thinking that it could be actively able to do this, but I have to say that it is possible or No, there is no prior experience in activex to enable it. Thank you for your comments and ideas on this! Take a look at Sorenson Square gives you your browser Is not the access to Squeeze encoding power straight squeeze? You can still get encoded and any video u

sql - Should I use Primary key here? -

एक उदाहरण के रूप में, मेरे पास 3 टेबल हैं: स्कूल: ID int, नाम Varchar छात्र: ID int, नाम varchar StudentInSchool: StudentID int, SchoolID int अब सवाल यह है कि मुझे एक कॉलम ID int रखना चाहिए StudentInSchool तालिका में प्राथमिक कुंजी ? यदि हां, तो क्यों? क्या यह अनुक्रमण करने में सहायक होगा? कोई भी मदद की सराहना की। व्यक्तिगत तौर पर, मैं समग्र पीके ( StudentID और SchoolID ) इस तरह तैयार करता हूं। यह विशिष्टता भी सुनिश्चित करता है। अगर, विशिष्टता की आवश्यकता नहीं है, आपको प्रत्येक पंक्ति को विशिष्ट रूप से पहचानने के लिए एक आईडी कॉलम जोड़ना होगा। आम तौर पर, एक अलग आईडी कॉलम के अलावा ज्यादा मदद नहीं मिलेगी: बहुत कम प्रश्न (यदि कोई हो) वास्तव में इस कॉलम का उपयोग करेगा। प्रदर्शन के लिए, आप प्रत्येक कॉलम के लिए अलग-अलग अनुक्रमणिका बना सकते हैं और आप बस ठीक हो जाएंगे।

python - Help me understand Inorder Traversal without using recursion -

I am able to understand the previous traversal without using the rearrangement, but I have been having a hard time with the Inner Traveler. I do not seem to get it, perhaps, because I have not been considered for the inner work of repetition. This is what I have done so far: Def traverseInorder (node): lifo = Lifo () lifo.push (node), while true: node If no one: break the node. No left, none: lifo.push (node. Left) node = node. = Node while true: if no node is: brake print node .value prev = node node = lifo.pop () node = pre node. There is no right: lifo.push (node. Right) node = node. : Break The internal timing loop just does not look right. Apart from this, some elements are being printed twice; Maybe I can check that the node has been printed first, but this requires another variable, which does not seem to be correct again. Where am I going wrong? I have not tried postorder trials, but I think it is similar and I must face the same conceptual blockage there too. T

How to correctly free a PDO instance -

For example: $ db = new PDO; // using some code $ db here // and after that, I want to free this var and close all connections and $ db = NULL; // How correctly? Is the correct way to free all SQL results and connections? You can do this, but often not necessary if a function is created and another If the Vars is not using it, then it will release the content of $ db when it gets out of the scope (usually at the end of the function). If $ db is a global, then it will be released when the script ends.

c# - How to programatically access images in a resource file? -

I have 30 PNGs in the resource file and I want to see them again inside the timer. This timer has set the background image of the form to the next PNG of the form to create an original animation. I can not find an easy way to enumerate the resource file and get it on the actual pictures. I'm eager to keep the references to images that are not fixed on their file names, so updating the naming of images within the resource file will not require me to update the code in this section. Notes: Images are named in order of the resource file ('image001.png', 'image002.png' , ...). This resource file is used exclusively to store these images. private zeros form 1_load (object sender, event erggus e) {var list = WindowsFormsApplication1.Properties.Resources.ResourceManager.GetResourceSet (New system. Globalization.CultureInfo ("en-us"), true, true); Foreach (in system.collections.DictionaryEntry img list) {System.Diagnostics.Debug.WriteLine (img.

java ee - Running standalone Glassfish v3 client as Eclipse plugin -

I am developing a standalone client who invites some EJB methods on Glassfish v3. This works fine until I am integrating an Eclipse plugin to run the client in our RCP application. In this setting a classmaker problem appears when you start the naming context, and I get the exception listed below. (Client in client has gf-client.jar and all its dependencies.) This fails m_ctx = new InitialContext (); with exception java.lang.NoSuchMethodException: org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findResources (java.lang.String) . Init & gt; (ManifestProxy.java:34) at com.sun.enterprise.module.single at java.lang.Class.getMethod (Class.java:1605) com.sun.enterprise.module.single.ManifestProxy & lt at. ProxyModuleDefinition. & Lt; Init & gt; (ProxyModuleDefinition.java:78) at com.sun.enterprise.module.single.ProxyModuleDefinition. & Lt; Init & gt; Com.sun.enterprise.module.single.SingleModulesRegistry (ProxyModuleDefinition.java:73). & L

perl - How can I make $1 return alternatives without a substitution regex? -

I recently incorporated the project into the logic of code and database elements. Business logic, such as expat, regular expressions, and function names, are recorded in the database, while reading general code such as files, making xml from xpath etc. are in code base. Most (if not all) the methods that use regular expressions are structured like this: if ($ entry = ~ / $ regex /) {$ req_value = $ 1; } This means that only $ 1 is available and you must always have your RegEx written in your $ 1 to give you the desired results. Problem: The result of the following string is either '2.6.9-78.1.6.ELsmp (SMP)' or '2.6. 9-78.1.6.ELsmp should be ' based on SMP's existence. $ 1 $ entry is not enough for [0]. $ entry [0] = qq | Linux version 2.6.9-78.1.6.ELsmp (brewbuilder@hs20-bc2-2.build .redhat.com) (GCC version 3.4.6 20060404 (Red Hat 3.4.6-10)) # 1 SMP Wednesday 24 September 05 : 41: 12 ADT 2008. | $ Entry [1] = qq | Linux version 2.6.9-78.0.5

Can I get PHP to throw an error when I try to define a function that has already been defined? -

I run this problem periodically, and I'm trying to figure out whether it is a configuration Problem is or is special with PHP Actually, a function fu () in my code will be defined, and then somewhere I will accidentally redefine the fuses with the same name (). I hope that any kind of error is thrown, eg "Fatal error: Function already defined line 234, bar.flip blah blah". But I could not find anything. I get a blank screen debugging can take an infinity because I try to decide that the error message is being redefined by mistake without the help of the error message. My configuration settings for reporting errors have been set to e-mail, and I have all other types of errors without errors. Any insights? Is there anything that can cause PHP to report these errors (so that I can either rename the offensive function or wrap it in the function_exists () section? EDIT: To be clear, I think I have been talking about the examples in which to avoid the namespace co

java - How to determine field-type for SOLR indexing? -

I have a table in MySQL table with a VARCHAR and a "title" for the classified (classified website). Second, there is a text field with "text" for classified. Two questions: How should I decide how to index these two areas? (which field-type, which class to use etc) Currently I have "ad_id" as a unique identifier for each ad, for example "BMW_M 3_82398292" Whenever a 'query match' is found by SOLR, how can I return SOLR to this identifier? (The first part of the identifier is actually the contents of the heading area, the second part is a random number thanks 1 schema Your solar schema is much more specific than your desired search behavior in your schema.xml file, you will see" text "and A bunch of options like "string" will appear. They behave differently. == in a SQL statement. > field type name = "text_way" class = "solar.testfield" increase in positionGee

symfony1 - Symfony, netbeans 6.8 and debugging a web page -

I am using Symfony (1.31) - project ORM to build a website. I recently transferred a text editor, Netbeans (6.8) from using my Dev environment. The compiled language (C ++) is coming from the background, I used to set the brake point in code etc. Debugging I have had to face web development (at least PHP), has been largely killed and remembered - well debugging has been done to say the least, using echo statements, File logging content etc. I've heard that PHP (i.e. debugging is possible set breakpoints etc) I have shown how to set the net to breakpoint (one of the MVC lasers) for documents so that when one If the relevant page opens through the browser, breakpoints will be hit and I can move through the code (ideally, seeing program variables). Is it possible to use Symphony and Netbeans 6.8?

.NET Remoting - HttpChannel vs TcpChannel -

I am new to .NET remoting and I am not familiar with different communication channels that can be used. I know that outside the box there is HTTP channel and TCP channel. I think there is one HTTP while the other is TCP, but I do not understand why TCP is fast. TCP is fast, the reason is that it uses binary to transmit data in wire with TCP channel As a medium, you can use any port number above 1024 (the first 1024 ports are reserved). While with HTT channels, this port is using 80, which is the standard port that is shared with your web browser, if you want to make it flexible with other services, then the HTTP channel is used. In addition, the data passed through the HTTP channel is encoded in the text, which makes it slow, for example, if you are to retrieve an image, then that image is first base 64 data format Will be encoded in and will be transferred. Normally, if you want speed, then you have to go to the TCP channel, if you want flexibility then go to the HTTP channel.

integer - Convert Linux C Char Array to Int -

Need some advice on this as IM struggles for conflict and can not understand it. I have a file that gets updated on a PC, indicating that the system was run and at what time it ran I am writing a very simple Linux console app (finally Will be a Nagian plugin). Who reads this file and responds based on what is found inside the file. I am a new beginner to use programming on C and C. Please be patient and if you interpret any answer, it will be really appreciated. Basically, I want to change a four array of 5 characters in an integer, although the 5th letter in the array is always a letter. So technically all I want to do is convert the first 4 characters into an integer array ... how ?? Ive tried many ways without any success, my problem is that at present I do not have a good understanding of language so there is no real idea what it can do or can not do. Here is the source of my program 3455Y (Number will be random but will always be 4 characters long) Basically a stri

batch file - Filtered tasklist piped into find doesn't show console output? -

विंडोज एक्सपी प्रो यह कंसोल में आउटपुट दिखाता है: डीआईआर | "मुक्त" ढूंढें यह नहीं है: कार्यसूची | "छवि नाम" ढूंढें यह करता है : tasklist | फ़ाइल में उम्मीद की रेखा लिखने / सी "छवि नाम" और और यह करता है tasklist | "छवि नाम" & gt; खोजें & gt; कार्यसूची | "छवि का नाम" छवि का नाम ढूंढना PID सत्र का नाम सत्र # मेम उपयोग यहां पुन: उत्पन्न नहीं किया जा सकता। आपकी दूसरी कमांड लाइन अपेक्षानुसार काम करती है और इस तरह से कोई भी भ्रम उत्पन्न नहीं होता है जब चौथा कोई उस पंक्ति को किसी फ़ाइल में लिखता है। क्या आपके पास अब पिछली पंक्ति से खोज करने के लिए स्ट्रिंग में अग्रणी स्थान था आपने "मुक्त" ? के लिए खोज की है

asp.net mvc - jquery sortable, get list order -

What is the return to some rank in a sequence using jquery? Essentially, what I want to do, what thousands of people are doing (and I have searched well on the StoxHowflowflow) and updated the database in a serial manner. Each item in the database has a "status" property - initially set to 0. Ul populated and pulled out, and I want to update the route controller back and store their position in the list. I am using ASP.NET MVC / C # as my code base - but I am having trouble finding complete examples of this. Ah! I understood it. I am posting it to everyone here. $ ("ul # unorderedListIdGoesHere li"). Index (ui.item); & Lt;% @ Control Language = "C #" Inherits = "System.Web.Mvc.ViewUserControl & lt; IEnumerable & lt; Model. Size & gt; & gt;" & Gt%; & Lt; Ul id = "section" & gt; & Lt;% foreach (Miscellaneous items in the model) {%> & Lt; Li class = "ui-state-default" id

javascript - Problem with Display of jQuery Menu -

does not appear in the menu row, not sure how to call the CSS code. Apart from this, I want a warning to tell which menu item was clicked. & lt; Script type = "text / javascript" & gt; Click the function get_list () {$ ("# tab") (function () {$ (this). (Function () {warning (this);});}); & Lt; / Script & gt; & Lt; Style type = "text / css" & gt; #navbarID li {display: inline; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "tab" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "Type 1.html" & gt; Type 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "type 2.html" & gt; Type 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "type 3.html" & gt; Type 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul

reporting services - Page Headers in ReportViewer Report Displaying A Variable -

I am trying to add variable SName to the report header. After reading this, I copied this = First (Report Items! SName.Value) and it works on the first page of the report. However, this is empty on the second through the final page (I think because the textbox is no longer visible on the snam page) and then it appears empty on the last page. I need the value from Textbox SName Any thoughts to be displayed on each page of the report are very much appreciated Thanks Philip

uiview - Wizard style of interface in iPhone -

How would a wizard style interface be applied to an iPhone? For example, I have a form that I would like to break into 5 different pages or views to view in one page or fill in a view. The interface should have the ability to move first or foremost, when they want to change something on page 2, when they are on page 4. The ability to go into this interface should be able to go straight to page 3 and still go back and forth. It seems that the use of UINavigationController will not work here because the views 1 and 2 are not on the stack, so the last thing will not work. Update: View the "Gas Density" application. What I'm looking for is UITableView presents items that you can fill. Selecting a row takes you to the detailed viewer to enter the data and fill in other information and the last and Next is UINavigationController seems like a clear solution that gives you a good, familiar page transition, and if you have any If you need to go to a specific p

ruby - how to use nokogiri methods .xpath & .at_xpath -

I am learning to use nogogiri and I have some questions depending on the code given below 'rubygems' requires' mechanize' post_agent = WWW :: mechanize.new post_page = post_agent.get ('http://www.vbulletin.org/forum/showthread.php?t=230708 ') "\" Minor path with taba gives zero "post_page.parser.xpath (' / html / body / div / div / div / div / div / table / tbody / tr / td / div [2] ') Xpath ('text') ._to_s.strip.inspect says "\ n.at_xpath returns an empty string" post_page.parser.at_xpath ("// div [@ id = 'posts'] / Div / table / tr / td / div [2] "). At_xpath ('Text ()'). To_s.strip.inspect "\ ntwo lines place with the solution .at_xpath returns an empty string" line = post_page.parser.xpath ("// div [@ id = 'posts'] / Div / table / tr / td / div [2] ") rows [0] .at_xpath ('text ()'). To_s.strip.inspect puts" two lines working code "lines = p

c# - Tool for creating .NET wrappers for a COM DLL? -

Is there an open source tool for automatically creating NET wrappers for a COM DLL library? You can try to use which is capable of creating the wrapper code. It can also be useful.

What kind of applications are appropriate for clojure? -

Therefore, just recently learned about closure, I am interested in drowning my teeth in some good official languages. What kind of applications would be good for the closure? Web application? Client app with window? Command line utilities? How is a terrible solution for closure? I think there is only one thing that can not be closing one-off command-line scripts Good for JVM startup time Even when walking with the -client flag does not get so hot, projects like Nelgun provide something about a functioning but there is some serious security effect with that approach. Otherwise, I think Closer is ideal for any work.

Nhibernate ICriteria - Check property value length -

I am trying to return all the institutions where no given asset is not empty. The problem is that IsNotEmpty () applies only to the collection below is the general viewpoint till now, it does not clearly work. icteritia lvCriteria = NHibernateHelper.GetCurrentSession () .CreateCriteria (typeof (FunctionCall). SetsMaxResults (100) .AddOrder (Order.Desc ("LogId")); If (pvMsg.HasValue) {lvCriteria.Add (restriction.Ennotonal ("Message")). Add (restriction. ISNOTPT ("Message")); } Any suggestions? Is it possible to get this result by checking the length of the property's value? Thanks! Finally, I found out that the combination was detected! lvCriteria.Add (no restriction. (Expression. Eq ("message", string.Empty))); This combination of restrictions and expressions works as expected; I do not know why I could not get these results before: .apti))); Thanks to all those people who try.

linear algebra - LAPACK + C, weird behaviour -

I am trying to solve a simple linear equation system using LAPACK. I use the dbsvg method which is optimized for banded matrix. I have violated a real strange behavior when I fill the matrix like this: for (i = 0 ; I & lt; dim; i ++) AB [0] [i] = -1; For (i = 0; i & lt; dim; i ++) AB [1] [i] = 2; For (i = 0; i & lt; dim; i ++) AB [2] [ii] = -1; For (i = 0; i & lt; 3; i ++) (j = 0; j & lt; dim; j ++) {at [i * dim + j] = ab [i] [j ]; } and call: dgbsv _ (& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; ; Amp;;; U; and; NRHS, AT, & LDAB, myIviv, X, and LDB, and INFO); This works perfectly, however, when I do this: for (i = 0; i This is the result with a vector filled with Nayen. Here are the announcements: Double AB [3] [DIM], AT [3 * DIM]; Double X [DIM]; Int'myyipiv [DIM]; Int N = DIM, KL = 1, KU = 1, NRHS = 1, LDAB = DIM, LDB = DIM, information; Any ideas? You are not laying out the entries in the band storage properly

java - How do I handle user logins with Spring MVC? -

I'm using Spring MVC for a web app. I want to use OpenID for my application, but I'm just thinking that Spring MVC is usually a good way to handle authentication. My web app is a question and answer app. Here's a scenario about which I am confused: When a user wants to ask a question, he records a question in a text box And pressed to submit it, and it posts the form for "/ Question / Construction", for anyone in the map Create My Question in the Controller Method At this point, if they are logged in, then this question Will add to the database, but if they do not want to, then I would like to see the login screen, and then the question will be successfully added to the database after logging in. / P> What I can not understand is the way to automatically add questions to the database after the login screen, because form values ​​will be form values ​​for the login screen, and do not add form values Question Screens Now More You must protect ACE

asp.net mvc - mvc: How do I add a initial Item to a DropDownList with Key of 0 and Description of 'Show All' -

यहां मेरे फॉर्मव्यूमोडल का एक अर्क है: सार्वजनिक सारांशफॉर्मव्यूमोडल (IEnumerable & lt; साइट & gt; साइटों , IEnumerable & lt; जमींदार & gt; जमींदारें) {var साइटें = साइटों .OrderBy (s = & gt; s.SiteDescription)। चयन करें (s = & gt; नई कीवालपेयर & lt; int, string & gt; (s.SiteId, s.SiteDescription)); यह। साइट्स = नया चयन सूची (साइटों मूल्य, "कुंजी", "मूल्य"); मैं (पहले आइटम के रूप में) एक मूल्य जोड़ना चाहूंगा जो कि स्वचालित रूप से डिफ़ॉल्ट होगा यह 0 की एक कुंजी है और 'सभी दिखाएँ' का विवरण है। मूलतः मैं उपयोगकर्ता को कॉम्बो बॉक्स की पेशकश कर रहा हूं ताकि उन्हें परिणाम फ़िल्टर करने की अनुमति मिल सके। मैं = "पोस्ट-टेक्स्ट" itemprop = "text"> एचटीएमएल के अतिभारण में से एक। ड्रॉपडाउन विधि पहले आइटम के लिए एक लेबल स्वीकार करता है। कुछ ऐसा है: एचटीएमएल.डाउपडाउन ("माइड्रोपडाउन", मॉडल। साइट्स, "सभी दिखाएँ") देखें

c# - Create Folder() Showing "<Result/>".But Folder are not getting created on Sharepoint -

I would like to create a folder in SharePoint 2007 with C #, using the DWS Web Service. code: dwsFolder.CreateFolder (@ "Test_FormLib / myNewFolder"); If I use the program for the first time, then I get a message: & lt; Results / & gt; No errors. The second time I get the message: & lt; Error ID = "13" & gt; Already Axis & lt; / Error & gt; But I do not see the folder on my website. What am I doing? In another joker product from Microsoft, I only spend 4 hours on this exact problem. CreateFolder works well only for document libraries, not as libraries. If you are trying to write in a form library, your documents will appear in another folder. For me, they were showing in 'shared documents', even though I was specifying to create a folder under 'test'.

jquery - javascript validation query -

$ ("# submit_js")। क्लिक करें (फ़ंक्शन () {$ .post ("user_submit.php" , (स्कोर: $ ('# ques' + qn)। ('इनपुट [नाम = वोट]: चेक')। Val (), यूआईडी: $ ("# यूआईडी")। Val ()}, फ़ंक्शन (डेटा ) { मैंने पूरा कार्य पोस्ट नहीं किया, लेकिन यह गुंजाइश से बाहर है। मुझे यह पूछने की ज़रूरत है कि मैं कैसे मान्य कर सकता हूं कि उपयोगकर्ता ने एक रेडियो बटन चुना है? सिंटेक्स? $ ('इनपुट: रेडियो: चेक')। लंबाई & gt; 0 < / कोड>

iphone - Cannot read XML File -

There is a slight problem getting the content of an XML file (using TouchXML). My first query works very well, something looks like this: NSString * url = [NSString stringWithFormat: STATION_ID, latitude, longitude]; CXMLDocument * rssParser = [[CXML Document Alloc] initWithContentsOfURL: [NSURL URLWithString: url] Option: 0 Error: Zero]; NSLog (@ "% @", rssParser); So this log gives me the full XML file. Then, in another method, I am trying to: NSString * Url = [NSString stringWithFormat: WEATHER_URL, [positionInformation objectForKey: @ "stationId"]] ; CXMLDocument * rssParser = [[CXML Document Alloc] initWithContentsOfURL: [NSURL URLWithString: url] Option: 0 Error: Zero]; NSLog (@ "% @", RSS parser); But the log is getting (empty). The URL string for URL string gives me empty or empty URL without the URL, for example the URL log looks like this: NSString * url = [NSString stringWithFormat: WEATHER_URL, [ PositionInformation objec

uitableview - iPhone custom UITableViewCell accessory graphic, a HIG violation? -

I want to present a custom pencil accessory image in a table cell and in the standard accessory writethand and uTable electricity case. The pencil image will be used to indicate that the text of the table cell can be edited with a popup modal full screen view. Will Apple punish this innovation during the app review process? My justification is that standard disclosure indicators do not convey true meaning, according to Apple HIC Doctor, ">" disclosure should present a more detailed list view and select the blue reveal button to select the table row Should show additional details about I think opening the text falls between ">" and "+" use, so consider my pencil image. Edit: To complete the picture, there are two variable rows in the table view, there is a multiple-question in the upper row, and the answer to a lesson appears in the lower row. I do not think the apple will punish you for creating custom buttons / icons. It's not a

Flash movie not made available by ASP.NET MVC -

I am working on an asp.net mvc app which uses Flash movie as a banner. I am trying to load it, however for some reasons the URL is considered as an action and the user is sent to the login page. The funny thing is, if I put a file in the same directory If I point my browser to this URL: A different extension (.txt, for example) and try to load it, it is not considered as an action. Does it give a redirection to me / account / logon? Return URL = ..., Standard ASP.NET MVC Access Route. If I point out my browser on this url: / P> This gives me the file, both the URLs point to the files on the server in the same directory Are there. It seems that something The SWF file is blocking the type. I am using IIS 7 Windows, and the checked MIME is such, but the problem is not getting. How does ASP.NET MVC decide whether there is some file or controller action? Ignore the MVC route for ".swf" extension.

What are the steps to create AJAX login in yiiframework? -

I just started learning AJAX and Yiiframework. What are the steps for creating a AJAX login form in Yii? Thank you. Try the following in your view, where the login button and gt; function () {$ ("# result student corrects" full '='> function () {$ ("# Results Student Corrects "). RemoveClass (" Loading ");} ',));? & Gt; #resultStudentCourse that div The ID is where you need to load in your message, eg logged-in successfully Then there is something like this in your controller. If (Yii :: app () -> Request-> isAjaxRequest) {$ this-> renderPatial ('create', array ('model' = & gt; $ model))} Hope this helps

google app engine - Can GAE act as an XMPP server? -

I'm thinking of making a multi-player game using GAE. When player A goes ahead, I want to record the details and then player B would like to know about this step. I thought that I could get some open source XMPP library in my customer and inform the presence if it is possible to my app? I do not want to force the player to sign up for a service like Google Talk, so I will generate Z on the fly based on the session ID. Would love to hear from you! Thanks You will not be able to create your gae app as xmpp server You can not open chairs - doing so is banned by the API. However, what you have to achieve, you do not need to run XMPP server to achieve this. You can use the XMPP libraries available in the Apenzin API to make your app a customer, that your game 'client' speaks to see the Python API: all your game clients do not need the Gotak client, but they Will need to be able to pull in gtalk, which I believe will be most capable. Here is a short example:

Python / Linux/ Daemon process trying to show gtk.messagedialog -

At Ubuntu 8/9, I am trying to write a daemon in Python, which will look at a fixed network position And informs that the user is using gtk.messagedialog. I have installed this script using RC-Update. Daemon starts with boot, but does not show communication even after entering. I believe because the inty.dm starts on my tty1 and no gnome is available. Tried to run a dialogue through a subprocess, but it seems that he is the heir to the same environment. What is the best practice for this type of thing. If five users are logged in X session, do you get the message? Everyone? If someone is logged on locally but only using TTI, and not X11, should he see the message? If someone remotely ssh-off their CPU's graphic application on their system, should they see the message? How do you get them? Linux is very flexible for your current perspective The standard way to do this is for a user who takes an interest in the message you send to receive the message that receives the m

how to convert a hash into an array with particular order? (ruby) -

I have a hash of hash (@post) and I want to save it to CSV. The strange thing for me is that my approach works for header, but not for rows if I CSV < & Lt; (@ Post_csv_order.each {| element | puts single_post [element]}) I can see the correct string on the screen, but the CSV file does not have the value of the hash key that has the value Price Basically, I have 5 rows of headers in my CSV instead of the right values. I think I must convert the post (key) hash based on @ post_csv_order with an order based on post @ [post]. @Post [Key] hash is a hash method but it will not give me the order I need. I think that you can suggest a different approach and can not use the hash of the hand, but I would also like to know how to convert hash into an array in which something The pre-defined sequence is On the other hand if there is an easy way to save CSV / a hash of hash in the table , then I would love to re-write my code Is happening 'code' is required 

compilation - Compiling libmagic statically (c/c++ file type detection) -

Thanks for those people who did me with my help (links for reference only). I type fileTypeTest.cpp , libmagic.a , and magic in a file, and I G + + -lmagic fileTypeTest I can compile CPP FileType Test Later, I will test to see if it runs in compiled windows with Mingad. I am planning to use it in a small GUI application, and I want to compile it for distribution consistently. My problem is that the libmagic external file, magic is required. (I'm actually using my small and compiled version, Magic_Short.MGC, but I want to revert.) To codify the file in a Hummy solution file, create an external file ( And delete) as needed. How can I avoid it? Added for clarity: Magic is a text file that describes the properties of different file types. When called to identify a file, libmagic searches through magic . There is a compiled version, magic.mgc that works faster My application only needs to identify some types of file types before deciding what to do with th

android - postInvalidate() is working slow? -

I am using LinearLayout applied to paint the polygon on it. A draw cycle has ended in about 535 millimeters (milliseconds). Thread to call myLinearLayout.postInvalidate () from non-UI, using the following code: myActivity.runOnUiThread (new Runnabel () {public void run () {MyLinearLayout.postInvalidate ();}}); It has been used to invalidate the view from non-UI threads. You do not need to call again with runOnUiThread .

android - os compatibility on mobiles -

I want to develop an app on Android, WebSite, Vince. There are several types of frameworks that allow you to compile them in native applications for many platforms. Gives permission to They generally dislike each platform, but they will provide a way to create original applications for multiple platforms at once. Example:

php - cURL 'malformed url' -

After the this URL '' Browser but perfectly good in cURL Any ideas on a work around Edit:. cURL code: function get_web_page ($ url) {$ option = array (true CURLOPT_RETURNTRANSFER = & gt; true, // return web page CURLOPT_HEADER = & gt; false, // do not return header CURLOPT_FOLLOWLOCATION = & gt; true, // follow redirects CURLOPT_ENCODING = & gt, "", // CURLOPT_USERAGENT all encoding handle = & gt; "Spider", // Who I CURLOPT_AUTOREFERER = & gt ; stop after 120, // connect timeout on CURLOPT_TIMEOUT = & gt; true, // redirect CURLOPT_CONNECTTIMEOUT = & referenced set Gt 120, // timeout response CURLOPT_MAXREDIRS = & gt; 10, // 10 redirects); $ Ch = curl_init ($ url); Curl_setopt_array ($ ch, $ option); $ Content = curl_exec ($ ch); $ Err = curl_errno ($ ch); $ Errmsg = curl_error ($ ch); $ Header = curl_getinfo ($ ch); Curl_close ($ ch); If ($ $ Errmsg == '') {Dead ($ mistake. ':' $ Errmsg);}

performance - What is meant by CPU Utilization of a process and How can it be decreased? -

What is a procedure used by the CPU? How to measure it? What does it mean to reduce it? I have always been confused with this concept. I have tried to measure the CPU using the 'top' command in Linux. But, what I have seen, when any other user is running, my process is spike-up and 99% CPU seems to not be blocked in I / O. But, if the second process is going on, then it comes to 45% or 50%. When another process is underway, is 99% acceptable for the process of taking CPU? Any link or pointers will also help in the direction. In this context, CPU usage is the ratio of total available processor chunks, which are consumed by each process. If this is just a few long computing-wide calculations, then what you're looking for is normal: the OS is dividing the computing resources between 100% of the resources of the computer that are asking for it . If, instead, your program has some events, such as the user pressing a key or waiting for the input to reach from t

eclipse plugin - How to disable mnemonics? -

I am extending Eclipse using Eclipse plugin infrastructure, and I have come across a problem: < P> I have created an eclipse editor and I would like to disable the memorable menu eclipse, for example: ALT + a menu is similar to search because my editor requires these combinations (Alt + ...). ? is recommended as: your own Create and add the necessary keybinding for it. Add this line to the customization IiI file: org.eclipse.ui/KEY_CONFIGURATION_ID = & lt; Your scheme ID & gt; / P> No new with parents Plan After this you can set as many keybindings as you want, because you will not see any of the default bindings. Create a new plan with default plan origin You will get all basic keybinding, but whatever you define in your scheme, it will be given priority (I think :) Close a child's context of context with some binding; Any keys that you define in your context, will gain priority over the original context. For a special solutio

C# Windows Form with Attached Windows Service -

I know how can I create a Windows service in C # but I have a series of variables that are current user The file in a text feed and I wanted to control this process. So can I attach a Windows project to a Windows Fire application so that things like installing the service, uninstalling the service, starting and restarting can be controlled. Or is it better to separate them altogether and just use the Form app to run system commands to install / uninstall / and use the service controller to start / restart? Thanks I suggest separating it completely.

linq to sql - How to get the sql update method generated by LinqToSql? -

How to obtain the SQL generated by LinqToSql for the update method? I use the following code to show the generated SQL in the debug output window of the VS2008 by LinqToSql, but this only generates the SQL selection method, How do I use SQLQL method Can I locate the SQL method generated by? I can know SQL Server Profiler and Linux (SQL-Update Generated), but I want to show them in VS-2008 or log them into the file. Public Partial Category Linq2: System.Web.UI.Page {Secure Zero Page_load (Object Sender, EventArgs e) {DemoDataContext ctx = new DemoDataContext (); // Then attach it to your DataContext log property ... ctx.log = new DebugTextWriter (); Var Product = CTX Products FirstOver Default (); Product.ProductName = "NewName1"; Ctx.SubmitChanges (); }} // Add this project to your project somewhere ... Public Category Debug TextDriver: System IoTexture {write public override zero (four [] buffer, int index, int counting) {System.Diagnostics.Debug.Write (new string

xml - I need to exchange data with different programs in text format what do you suggest? -

We need export / separate programs for importing / importing our program from different programs, each specially independent From the population Most of these companies will send 2 text files: first with data content as well as details of each other. Let's say this example: Content file: TheArtofDeceptionKevin11.53 Description file: Offset [0..16] - & gt; Book name offset [17..21] - & gt; Author Offset [22..27] - & gt; Price To deal with this problem, I used a Jason based configuration file for each company and I will parse Jason to remove the data, offset notifications and imports I will remove ... but recently I was thinking about using a database for it, let's go primarily as a company (company, doctor type, filename) as table and In defining the as Olm (Start, End) What do you think about the final design? I believe that someone has already run through this medium and help me come up with a good solution. Thank you, Ok, I actually use a databas

Choosing a Java IDE for homework assignments -

Can a light recommend Java IDE, which does not require you to create new projects every time, when you compile Want to program? I just want to be able to open java files and compile and run them. I have already tried Eclipse and Netbens, but every time you want to compile and run a program, you need to create a new project. It is okay to create a new project for large scale projects, but for small school work it only makes the process more tedious. "post-text" itemprop = "text"> I am working in Java school while using eclipses. I had a project called "homework," and created a new package for each assignment. It works fine for me. Update: In addition to the above exercises, it seems that a sub-project (still in incubation) in eclipse, though, is said to be particularly educational Is for the purpose. The Eclipse IDE for Education is a version of Eclipse streamlined for use by university and college students in particular

osx - How do you create a Keynote-like interface in Cocoa and IB? -

The app I want to create is the main type of interface, in which the list of pages on the left and one page These types of interfaces on the right are quite common, but I do not know how to do them in the interface builder. Is there a prepared component? Does Apple do not offer any afaik, or does every developer rebuild it from scratch? I just need a general idea or tutorial, no ending code Thank you in advance! If you are talking about a scroll list of similar-sized thumbnails, NSCollectionView / NSCollectionViewItem's Use the. It should be very simple: the item will only display a thumbnail image based on the current state of your document editor view. In 10.6, it got some drag and drop support, if I miss the exact from WWDC09, then you can drag your pages in such a way that way. For editor side, collection view only works if all your pages are of the same size, because it does not allow for variable-size items. If all your "pages" are the same size, ho

windows - Why is WMDC/ActiveSync so flaky? -

I am developing a Windows Mobile application using .NET Compact Framework 3.5 and VS2008, and using Device Emulator V3 There are frequent problems with debugging, connecting to Win7, and Windows Mobile Device Center (6.1). Using the Emulator Manager (9.0.21022.8) I abide by the device using DMA in WMDC. The problem is that it is actually a pain, so there is very little to add to it. I think that when I start my computer, before I can connect it, I have to open WMDC, disable connect to DMA, turn off WMDC, repeat it again Open it, and then it may be a crib. Once it's cradled it is usually okay, but there is not constant connectivity in getting it to connect. It is often better to connect with physical devices, though not always if I plug a PDA into a USB socket that was originally plugged in, it will not be connected at all. Often the best / most reliable connection method appears on Bluetooth, but it is quite slow. Anyone got any suggestions or suggestions? Try r

Asp.net MVC 2 ValidationInput -

I am using validation input (false) on my action, but asp.net MVC 2 P2 still my request Is validating. Why? Is this a bug of Preview 2? Are you using Visual Studio 2010? If so, then see.

How to cache an xml file and read its attributes in Rails? -

I have a file that represents all the components of the game I want to load the file into boot in the cache, After that, the properties of the files have the ability to call the controllers. I like the simplest XML handling: cobraavesmongos XML_to_hash (File. Open ('path / in / xml'). For your special case, I will add an analyzer, which requires a CVM and the value is set above a constant, which you can access by then Where you want ... # config / initializers / load_xml.rb requires' cobravsmongoose 'MY_XML = CobraVsMongoose.xml_to_hash (File.open (' path / to / Xml '). Gets)

sql - Define Column Aliases? -

I have such a query: SELECT * * 'FROM (` Threads` t, `members`m) where` m``````````` and `t` Type Type = '0' and `t``` Category = '1' And what happens basically that both tables (members and threads) have an ID field, It is happening that the result is getting messed up ie IE: there is only one ID field which is getting populated from the members table. What I need to do is create results with the prefix of their nickname so that I can differentiate between two: IE: Add 'T'. All thread fields and 'm' in all members' areas Then the result should be the same: m.id = x, t.id = y Instead, the results of this time are the same: id = x (thread field is the ID field from the table of members completely (Overwritten from) Usage: Select MID AS X TIi = M from TID 'Y' members on MT Author and t Column names are defined on a column on a column - you can not use wildcards / etc. Type = '0' and TC Category = '1'

iphone - Unable to load a UIView in a separate ViewController with an NSObject -

ऐप एक दृश्य-आधारित प्रोजेक्ट प्रकार है। मैं एक दृश्य XIB (UIView Nib) में एक NSObject का उपयोग कर रहा हूं, इस ऑब्जेक्ट को एप के टॉपबार के रूप में मानता हूं। मुख्य नियंत्रक UIViewController प्रारंभिक स्क्रीन लोड करता है यह इस तरह दिखता है, मैं ऊपरी छवि में टॉप बारव्यूव (लाल रंग) में अलग-अलग डिज़ाइन किए गए एक टॉप व्यू लोड करना चाहता था (नया वाला, इसे एक्स कहते हैं)। अब, मेरे पास NSObject है जो "एक्स" में रहता है और सभी घटनाओं को बांधता है और एक्स पर पूर्ण नियंत्रण रखता है, इसकी एक एकल ऑब्जेक्ट। NSObject क्लास में मेरे पास एक तरीका है स्वयं ऑब्जेक्ट इन्सेंस और यूविज़ ("एक्स") का एक उदाहरण यह नियंत्रित करता है। विधियां हैं, - (UIView *) ReturnTopBarView {NSLog (@ "called 2 "); वापसी topBarObject.topBarView; } // सभी दृश्य नियंत्रकों के लिए शीर्ष बार उदाहरण प्रदान करता है // सिंगलटन कार्यान्वयन + (आईडी) GetTopBarObject {if (topBarObject == नीला) {NSLog (@ "1 बुलाया गया"); वापसी [[TopBarObject alloc] init]; } शीर्ष पर वापस लौटें; }

Implementing exception handling in ASP.NET 3.5 -

I want to apply exception handling to an asp.net application. How do you suggest it? Should receive an email with exception details I understand that there are several ways to implement exceptions (examples: Log message in Event Viewer) What is the recommended approach? Recommended Approach What exactly do you need to do with error information? For the simple app, just the web. It may be enough to set the config file to redirect to a friendly error page. It is generally a good idea to send the database, files, windows application logs or information Records the web service for dealing with Global. ASXX Application_Error event. You can also use web.config to get your friendly page along with it. Generally I do not advise to use Windows Error Logs because they work a bit hard, but nothing is wrong with it. For very detailed operational information, including alerts and information messages, devices are widely used. Normally you go this route for products or ente

Replace white space with AND in ruby -

I'm entering a form with a string input What do I need to do with "AND" Also in place of white space (no quotes). What is the best way to do this? In addition, how do I do this if I want to remove all white spaces in the string? Thanks and to change: s = 'This is some white space' s.gsub! / \ S + /, 'AND' = & gt; "This and it has some more white space" To completely remove: s = 'This is some white space' s. Gsub! / \ S + /, '' = & gt; "IshmoOitesitePass"

import - (SQL) How to set column names of MySQL table as the delimited first line of my infile? -

The first line of my profile is actually the name of the delimited column in the file. What is the use of those column names in the file for any mysql import, and with the names, do the columns in the mysql table, which I do not want? I do not think you can import structure by using LOAD DATA INFILE You can do it, but what you mean, it should not be very difficult to write a parser to read that line and create a table for a general purpose, and then to ignore the structure definition line on the import You can use IGNORE 1 LINES in the LOAD statement.

Conditional Logistic Regression - detailed examples -

Is there any online resource / book reference in which detailed tutorials / examples are determining conditional fasting? (Preferably in R, Matlab or Python) See the Closet function (For R) The function is described Examples can be found in this PDF:

text editor - Does anyone know of a syntax checker for classic ASP? -

As part of my web development system, I wrote a text editor dick (between other formats like CSS and HTML) Highlighting ASP's syntax Does any ASP syntax checker program (preferably) detect DLLs that I can call from within this editor so that I can present my users with a list of errors (such as I already do it with an HTML validation). I want to check the ASP syntax before using the code on the web page. Now, depending on the location and type of error, some errors may take days or weeks to pop up. I do not know of any syntax checker libraries for ASP though Loading and "compilation" VBScript Or it is possible to use JScript, although not for unconscious heart. To enable ASP syntax detection you will need to replace & gt;% ... Response. Write ("") and and with response. with typing Now you have a clear text in the clerical language; Add a group of dummy objects for the Response, Requests, etc. (Actually no member is required) In the

c# - input string is not in a correct format -

I want to calculate percentages. But the compiler is giving an error that the input string is not in the correct format. Is there something elusive that I am missing here? Private Double Copy () {Double A = Convert. ToDouble (tbEnglish.Text + tBUrdu.Text + tbPhysics.Text + tbChemistry.Text + tbMaths.Text); Double D = 500; Double LLL Result = (A / D) * 100; Return LBL Result; } You are adding strings and then attempting to change that one result Are double. You can try to parse "75.692.156.378.272.3" for the results of 75.6, 92.1, 56.3, 78.2 and 72.3. Parsing each value and then yoga them. However, I strongly recommend that you use double instead of decimal instead of you Trysepse Instead of using pars should be considered so that you can handle user input errors in a beautiful way. Here parse : the public decimal mean percentage () {decimal sum = decimal Purse (TBENGTETIC) + is sticking solution with decimal. Mercury (TBURW Text) + Decimal Purse (

views - Django No redirections -

I have a flash file that calls like a URL: I just "123456" Nothing else returned. What do I do after saving the values? If I redirect it, this page changes and it's bad. I could have presented a page, but I did not want to just finish it and do not want to throw any errors. Make sure your URLConf writes something you want, and something like this: Ex << >> django.http import from import from my_models HttpResponse MyModel def myview Import (request, number): my_model = MyModel (my_field = number) my_model.save () Returns HttpResponse () Finally returns a status code of empty HttpResponse 200 so that the browser or other server that connects to your endpoint knows that the request was completed.

wpf - ListView not updating after RaiseCanExecuteChanged is called -

I have a list view that is bound to store visual models. The item template has a button that is bound to an order on the visual model. When I set up the property, I call RaiseCanExecuteChanged for each view of the items in the list view. Public Binding List & lt; IVehicleViewModel & gt; Vehicles {Back {return_vehicles; } Set {if (_vehicles == value) returns; _vehicles = value; OnPropertyChanged ("vehicle"); RaiseCanExecuteChangedEvents (); }} Despite the fact that I have verified that true view is returned to CanExecute on all visual models, button buttons are shown in depth. The only thing I have noticed is that if I change the Risen Excecutus, when the list view already does everything required, and if I give it a list description before calling it and then through the item When scrolling, they sort themselves. A static method commandmanager. Unauthorized code is a command executable Re-evaluate (this is a word?) Try calling it whenever you want to

c# - Should I redundantly test arguments (e.g collection emptiness)? -

अनावश्यक संग्रह की जांच के साथ कोई समस्या है?: SomeMethod () { आकार = GetShapes (); / / शायद आकृति (आकार। किसी भी ())? अगर (आकृतियों। किसी भी ()) {टॉगल दृश्यता (आकार); }} ToggleVisibility (IEnumerable & lt; आकार & gt; आकृतियों) {// हो सकता है आचरण (आकार। Any ())? अगर (आकृतियों। किसी भी ()) {// do stuff}} मैं डॉन नहीं लगता है कि यहां एक बड़ी समस्या है क्योंकि किसी भी कॉल को महँगाई नहीं है। इसमें एक छोटी सी समस्या है कि टॉगल विज़िबिलिटी की जिम्मेदारी और व्यवहार घोषित नहीं किया गया है। टॉगल विज़िबिलिटी को कॉल करने वालों को पता होना चाहिए कि आकृतियों के खाली या शून्य होने पर यह कैसे व्यवहार करेगा। ऐसा करने का सबसे अच्छा तरीका XML टिप्पणियों के माध्यम से है ताकि यह इंटेलिसेंस में दिखाया जा सके। इससे टॉगल विज़िबिलिटी कॉल करने वाले को यह तय होगा कि क्या उन्हें चेक करना आवश्यक है कि क्या संग्रह रिक्त या शून्य है।

How to cast array elements to strings in PHP? -

अगर मेरे पास वस्तुओं के साथ एक सरणी है: $ a = सरणी ($ objA, $ objB); (प्रत्येक ऑब्जेक्ट में एक __ toString () -method है) मैं स्ट्रिंग में सभी सरणी तत्व कैसे डाल सकता हूं ताकि सरणी $ एक में कोई और ऑब्जेक्ट नहीं है लेकिन उनकी स्ट्रिंग का प्रतिनिधित्व है? क्या कोई एक लाइनर है या मुझे मैन्युअल रूप से सरणी के माध्यम से पाश करना है? एक-लाइनर : $ a = सरणी_मैप ('strval', $ a); आनंद लें! ;)

stdout - fork() and printf() -

As I've understood a forek () the copy of the image of the original process has created a hair process. My question is how does the child and parent process share the stdout stream? Could the printf () function of a process be interrupted by another? For example: The first case: or the printf () function is atomic? Example: The first case: ex> guardian: printf ("hello"); Kids: printf ("world \ n"); In the console: HeWollorld The second case: Guardian: printf ("hello"); Kids: printf ("world \ n"); In the console: "Hello World" printf () Not guaranteed to be nuclear If you need atom, use () preformatted using a string, using s * printf () etc., if Be necessary. Regardless of this, you should make the size of the written data using write : Writing on a single pipe will not be handwritten with the data from other processes. With written by other processes in written by more than {PIPE_BU

regex - How can I replace text that is not part of an anchor tag in Perl? -

What is a Pearl regex that can replace a selected text which is not part of an anchor tag? For example, I would like to replace only the last "text" in the following code. blah & lt; A href = "http://www.text.com" & gt; Blah text blah & lt; / A & gt; Blah Blah Bless Thank you. Try parsing HTML with a regex instead you do not want to try. Use HTML :: TreeBuilder; My $ html = HTML :: TreeBuilder-> new_from_file ('file.html'); # Or some other method, depending on what your HTML is ($ html); Sub-doReplace {my $ elt = shift; Do this before my $ node ($ elt-> content_refs_list) (if (refred $$ node)) $$ node- until $ doreplace ($$ node); Tag eq 'a'; } And {$$ node = ~ s / text / replace / g; } This is a text node ending in #. # End foreach $ node} #and done replay

linux - Variable Context Switching Time -

I made some changes to the context switch routine of Linux. I am now facing the following dilemma: Reference switching time now Not a determinant, i.e. the implementation time varies on different applications. I am thinking that such negative effects behave A potential mistake I have identified is the real-time application when I have a non-fixed time to switch the context, I think that is not really ideal. Are there any other issues that need to be considered? There can be a lot of panic with music and video players, such a scheduler.

sql - SUM() Problem in Paradox Database -

I am currently working with a contradiction database before starting work on an existing insurance company Was applied. / P> The long story is short that when I am trying to compile a query of all the active debit / credit balance of the client, then gives me a separate balance for each customer. Doing a query is not feasible with doing a 100K customer base and with more than 2 million transactions. So here's what I do for a single unmarried customer: Code: NumberOfDebits, COUNT (Credit) as NumberOfCredit, SUM (debit) form In SELECT COUNT (debit) debit as a credit, total member transactions from credits in the form of credits where Member ID = '#### 000094'; As I mentioned above, it gives the right balance for the member, but if I do the following: Select Member ID, COUNT (Credit) as NumberOfDebits, NumberOfCredit (Credit), SUM (Debit) as DebitTotal, Member Credit by MemberID (Credit) as Total Member Credit; This gives me a different count and yoga res