Posts

Showing posts from June, 2013

c# - Compare two strings and get the difference -

How can I compare two strings in C # and how to find the difference? For example: String 1: I have a car string 2: I have a new car BMW The result: New, BMW You must make sure that except the big set Is in the left hand (not sure that the pure Linq path is to get it): Fixed zero main (string [] ARG) {string s1 = "I have a car A Car"; String s2 = "I have a new car BMW"; & Lt; String & gt; Diff; IEnumerable & LT; String & gt; Set 1 = s1.Split (''). Undoubtedly (); IEnumerable & LT; String & gt; Set2 = s2.Split (''). Undoubtedly (); If (set2count ()> set1count ()) {diff = set2.Except (set1) .toList (); } Else {diff = set1.Except (set2) .toList (); }}

java - Need to verify the older way of defining handler mappings using mvc:annotation-driven? -

In an app I see that I find it in Dispatcher xml: & Lt; Mvc: annotation-operated / & gt; Do I correct that this is the Spring 3 method of defining handler mapping (URL routes). One of the controllers in the app looks like this: @controller @ request mailing ("/ command") @ session entry (command controller command) public class command controller {// ... I think the line definition @RequestMapping ("/ order") is the actual definition of handler mapping For URL route Do I correct that the old way of defining this handler mapping would be one of them: BeanNameUrlHandlerMapping SimpleUrlHandlerMapping Controller ClassnameHandler Mapping CommonsPathMapHandlerMapping Yes & lt; Mvc: annotation-driven / & gt; is a feature option for configuring annotation-powered controllers that configures special handler mapping s and handler adapter s. Look for a complete list of exactly to specify it. As an option, ...

java - Deploying Struts2 Application without ContextPath -

I have a Straits 2 app running under "/ path" in reference to my local tomcat without problems when I Runs on the webserver (struts to "myserver: 8080 / path /" using proxy) Struts does all kinds of weird things First of all, the context includes - tags included. This can be stopped by an attribute but unfortunately, it includes the path in the verb features of my forms, so a login form indicates "" instead of "" ... Chances are that any default reference can be changed here or add it to the form? (I would like to keep tags, the only way to think of using round default HTML forms.) Thanks in advance! I found that others have problems too, but the makers of the structure do not think this is an issue is. My solution: Include all in contact = "false": url-tags Instead of ss: form tags, use a normal form, use this Set action on "Actionname.action" and for each field include a simple table with tabs () you can st...

c# - Conventions in assignment code? -

I have two classes, knows about A and BBA, and I do not know about A There are properties that can be well set to A, although there is no legacy shared between A and B. Many times when I will need to allocate the assets of A to A, but I am looking for points where I should keep that code. public class A {} public square b {// constructor? Public B (AA) // // from properties of set B // factory method? Public from stable B (AA) {BB = new B (); // Return B to property of Set B; } // Setter method? Public Static Zero SetBFromA (Bb, AA) {// A to Set B Assets} // Assignment Method? Public Zero AssignFrom (AA) {// property from a set to B}} // Fixed helper class? Public stable class BHelper {Public stable B GetBFromA (AA) {BB = new B (); // Return B to property of Set B; } Public static Zero SetBFromA (BB, AA) {// property from a set B}} Which one, if any, is one of these common behaviors? Does any of them take the implications on the basis of their signature? For example, using th...

java - Link up UI elements to data in complicated link item? -

How do I link checkboxes and external textViews in external data? Should I use SimpleCar Adapter? Or make your own adapter? Should it be an Adapter or Bidadaptor extension? My list item UI: If you are binding SQLite To see the data in the database, I will extend the cursor adapter. This is very easy because you only have to override the bindview () and the new view (). In Newview (), you need to use the LayoutInfiler to increase the view, and in Bindview (), you define the views as objects and bundle their data with them! Ask if you want some example code and I will dig some of the old project!

java - When does it make sense to use Spring WebFlow on top of Spring MVC? -

Spring MVC has become a very popular framework for building enterprise web applications. Any complicated web application has certain flows that have some conditional flows (eg, if the credit card information is correct, or if something is not correctly entered, then the verification errors are shown, to process the order For) need to be coded. When does it make sense to use Spring Web Flow at the top of Spring MVC? What should be the process of deciding about the use of Spring Web Flow? If you have a web application that has some application process. For example, if you have some kind of sign up process, one button can go to one page, while the other can go to a different page. Spring webflows can infect different sets of processes very well. Basically, if any part of your application is connected and the page is dependent on each other during the execution of each other, then SWF is good to use.

flex - Having the content of a s:Scroller viewport at 100% height -

Is there any way to get the contents of a component within 100% height inside the scroller? Here's a simple example: & lt; S: Scroller width = "100%" height = "100%" & gt; & Lt; S: viewport & gt; & Lt; S: Group height = "100%" & gt; & Lt; S: reset width = "10" height = "500" & gt; & Lt; S: filling & gt; & Lt; S: solid color color = "0xFF0000" /> & Lt; / S: Fill & gt; & Lt; / S: Rect & gt; & Lt; S: reset width = "10" x = "10" height = "100%" & gt; & Lt; S: filling & gt; & Lt; S: solid color color = "0x00FF00" /> & Lt; / S: Fill & gt; & Lt; / S: Rect & gt; & Lt; S: reset width = "10" x = "20" height = "100" & gt; & Lt; S: filling & gt; & Lt; S: solid color color = "0x0000FF" /> & Lt; / S: Fill & gt; & L...

Search/sort algorithms - is there a GoF-like listing for them? -

I'm a self-taught developer and, very clearly, it is not great to find out which search or To use sort algorithms in a particular situation, I was just thinking that there is a design pattern - a list of the algorithms available in Eisker for me to bookmark. Something like this: The name of the algorithm (with the alias, if any) The problem is this address Big O Cost The algorithm itself example It can be used with other algorithms I was just looking for a simple, short list of algorithms I should probably know in one place. Is there anything like this available? The Web site shows many popular sorting algorithms, and describes their complexity and implementation. It takes additional steps to show through animation, how these algorithms work on different types of data (such as pre-sort, sparse, reverse-sort, etc.).

Efficient way of adding one character at a time from one string to another in Python -

I am currently creating a function using pygame that draws a message on the screen, one letter is each frame ( I.e. red hunting for October ). I know that I can slowly copy (or pass) large slices from the original string, but I know that this will be very resource-intensive. Is there a better way to do this? Code, gradually using large slices: def full_screen_dialog_tt (thesurface, thefont, theclock, message, thebeep): i = 0 while (i & lt; Len (message): # theclock.tick (60) thesurface.fill ((0, 0, 0)) Start the string display thesurface.blit (thefont.render (message [i] + "_")) Pygame. Display.flip () thebeep.play () while (1): # the entire string is hereclock.tick (60) for event in pygame.events.get (): if event.type == MOUSEBUTTONDOWN: For return In a place where you are deliberately slowing the game (for text fade -i ) - Does it really matter? You can cross the entire string, and change the display routine to display another letter in each frame.

string - Wrap long lines in Python -

इस सवाल का पहले से ही एक उत्तर है: 6 उत्तर मैं लंबी लाइन कैसे लपेट करूँ पायथन में खरोज का त्याग किए बिना? उदाहरण के लिए: def मजेदार (): प्रिंट '{0} यहां {1}' के साथ एक बहुत ही लंबी सजा है। प्रारूप (3, 5) मान लीजिए कि यह 79 वर्णों की सिफारिश की सीमा से अधिक है। जिस तरह से मैं इसे पढ़ता हूं, वह यहां इंडेंट कैसे किया जाता है: def मजेदार (): प्रिंट '{0} यहां {1}' के साथ एक बहुत लंबे वाक्य है। प्रारूप (3, 5) हालांकि, इस दृष्टिकोण के साथ, निरंतर लाइन के इंडेंटेशन मजेदार () के इंडेंटेशन से मेल खाता है। यह थोड़े बदसूरत लग रहा है अगर किसी को मेरे कोड के माध्यम से जाना था, तो यह print कथन के कारण असमान इंडेंटेशन के लिए बुरा लगेगा। मैं कोड पठनीयता के बगैर इस तरह से इंडेंट लाइन कैसे करता हूं? def मजेदार (): प्रिंट (('{0} यहां एक बहुत लंबा' '1 के साथ वाक्य')। प्रारूप (3, 5)) Adjecent स्ट्रिंग literals समय संकलन में जोड़ रहे हैं, बस के रूप में सी में अधिक जानकारी के लिए शुरू करने के लिए एक अच्छी जगह है ।

php - getting json_encode to not escape html entities -

मैं अपने PHP सर्वर से iPhone app में json_encoded डेटा भेजता हूं। '& amp;' जैसे html संस्थाओं वाले स्ट्रिंग्स json_encode से बच गए हैं और & amp; amp; amp; के रूप में भेजा जाता है। मैं दो चीजों में से एक काम कर रहा हूं: बनाओ json_encode नहीं HTML संस्थाओं से बचें डॉक्टर कहते हैं 'सामान्य' मोड से बच नहीं पायेगा लेकिन यह मेरे लिए काम नहीं करता है। किसी भी विचार? आईफोन ऐप को असुरक्षित एचटीएमएल संस्थाएं सस्ते में बनाएं एकमात्र तरीका मैं इसे करने के बारे में सोच सकता हूं, इसमें एक एक्सएमएल / एचटीएमएल पार्सर कताई शामिल है जो बहुत महंगा है कोई सस्ता सुझाव? धन्यवाद! PHP 5.3 या PHP 5.2 को HTML संस्थाओं को स्पर्श नहीं किया जाता है। आप निम्न कोड से यह कर सकते हैं: & lt;? Php header ("सामग्री-प्रकार: पाठ / सादे "); // सुनिश्चित करता है कि संस्थाओं को $ s = व्याख्या नहीं किया जाता है = 'एक स्ट्रिंग जो & amp; amp; & Amp; # x6F8 संस्थाएं '; गूंज json_encode ($ s); आपको स्ट्रिंग के चारों ओर दोहरे उद्धरण चिह...

apache - Rewrite rule does not pass $1 when using !? -

मैं इस नियम का उपयोग कर रहा हूं: RewriteRule! ^ (। *? /.* P> यह headers.php को फिर से लिखता है जब मैं localhost / foo टाइप करता हूं, लेकिन a चर foo (मैंने var_dump ($ _ अनुरोध) ) से जांच की किसी भी विचार क्यों? धन्यवाद! रीवाइट कंडोम% {REQUEST_URI}! हेडर्स का उपयोग करने की कोशिश की धन्यवाद! नियम अस्वीकृत है, इसलिए इसे निष्पादित किया जाता है यदि और केवल अगर नियमित अभिव्यक्ति नहीं यूआरआई को संसाधित किया जा रहा है चूंकि कैप्चरिंग समूह localhost / foo से मेल नहीं खाता, चूंकि $ 1 में डाल करने के लिए regex इंजन के लिए कुछ भी नहीं है इसका समाधान अपने RewriteRule निर्देश में अस्वीकृति के उपयोग से बचने के लिए है, और न बदले regex की जांच के लिए RewriteCond निर्देशों का उपयोग करें। निम्न नियम को काम करना चाहिए (मैंने इसका परीक्षण नहीं किया है, यद्यपि यह संभव है कि कहीं एक गलती हो।) पुनर्लेखनकोण% {REQUEST_URI}! /.*/ पुनर्लेखनकोण% {REQUEST_URI}! \। (Html ​​| Php) $ RewriteRule (। *) Headers.php? A = $ 1 [एल]

image resize in runtime with codeigniter(php) -

I uploaded a picture with resolution of 1600x1200, I made 60x60 and 200x200 users to create thumbnails and upload again How Can I Show Without In codeIngniter (such as phpthumb library) Codenator comes with your image library Resize this example from the document, just edit the $ config variable: $ config ['image_library'] = 'gd2'; $ Config ['source_image'] = '/path/to/image/mypic.jpg'; $ Config ['new_image'] = '/path/to/new/image.jpg'; $ Config ['maintain_ratio'] = true; $ Config ['width'] = 75; $ Config ['height'] = 50; $ This- & gt; Load-> Library ('image_lib', $ config); $ This- & gt; Image_lib- & gt; Resize (); You can also create thumbnails dynamically (without saving them to the hard drive) so much memory is required, so I will discourage it. Image class can also crop the image if you need it I'm currently working in it to make thumbnails in the application ... ...

javascript - This pretty little jQuery code seems to not work.. anyone know why? -

If I run it, it does not make any errors and in the firebug it actually selects the right elements in the DOM. If I separate it and do something like this: $ ('img [hspace]'). CSS ('margin left', ($ ('img [ASTR (' HSPAS '/ 2) +' PX ') This works. It is completely monster. $ ('img [hspace]'). Each (function (L) {var pixels = pars in ($ (L) .attr ('hspace' ); If (isNaN (pixel)) pixels of & lt; 1) pixels = 0; rest pixels = pixels / 2; $ (L) .css ('marginLeft', pixels + 'pixels') .css (' Update / P> `div class = 'grid_7' & gt; & lt; p & gt; & lt; p & gt; this is mine & lt; / p & gt; & lt; P & gt; img align = "left" alt = "dude its me" border = "10" height = "168" hspace = "30" src = "http://s3.amazonaws.com/hq- Photo / root / system /photos/6187/resized_orig/photo.jpg "vspace =" 10...

repository - Mercurial unreliable sub-repos. Any alternative? -

I'm trying to be masculine, but I'm crazy about it. I am converting it from SVN to thinking that, in addition to the promise of better workflow, I use GIT in contract work, so I get full distributed ideas. I choose the finesse for the promise of more simplicity and support of better windows. I am a single developer, I am working in a project that is 5 different repos Generally, I commit every single repo, then it is rooted I am pushing with Root / Root. But I found that: 2 There is a way to disable it for 2 consecutive things? There is no GUI that actually works for my workflow (I use McHG, Tortoise HG and try other half endeavors). For practical push / pull behavior, I have to come back to the order line. No GUI understands subreparo, it does not seem that there is a problem of 2-head, so I need to merge / merge into the command line. But the worst thing is that subrepos are very unreliable. In about 2-3 days I get "aborted: unknown amendment ****...

iphone - Getting device info in iOS? -

I want to search and store information about a user device. I am looking for date, iPhone / iPod / iPad, locale and location. It should be easy to get in the form of device type What code is used to detect the current locale / language of the device interface? check out you + currentLocale or + autoupdatingCurrentLocale you can get an example of existing locale; The class defines several constants that you can use to obtain language and country information from the language used by its -objectForKey: method, e.g. NSLocaleCountryCode and NSLocaleLanguageCode .

SOLR indexing and searching? -

Currently, I am trying to add a new area for my AOLR engine. I've added the following to the schema.xml file. & lt; Field name = 'FIELDNAME' type = 'string' indexed = 'true' stored = 'false' /> XML given to SLL for indexing is: & lt; FIELDNAMES & gt; & Lt; FIELDNAME & gt; 1 & lt; / FIELDNAME & gt; ::: & lt; FIELDNAME & gt; N & lt; / FIELDNAME & gt; & Lt; / FIELDNAMES & gt; For a reason when I do not return anything by administrator or elsewhere FIELDNAME: 1 does a solr query. What would be the suggestion to proceed with solving this problem? XML format is more than solar, in fact, you have one or more The "add" tag with the "doctor" tag is Each "doctor" is made up of several "field" tags. If you manage at least one of the documents from the index, look for it to do a solver query with q = *: *.

c++ - array of arrays of different size -

I have some code that sets one of different sizes of tr1 :: array, but the same type, like Array & lt; Int, 2 & gt; Array & lt; Int, 4 & gt; Array & lt; Int, 6 & gt; The numbers of these arrays, and their size, time are given in the compilation, so I know how many of them will be and how big they are (but they May be different). The problem: I want to put them in a collection (using the array & gt; would be great), but for all the members the type should be identical and this is not the case. I thought about using the Promotion: version, but how can I specify a type with compiled time determined list (I'm thinking of heavy use of preprocessor. ..)? About using promotion: Anyone? Other methods? (Wild pointer?) TIA ~ AKI Correction: Preprocessor is not usable in this case. I will use Boost's MPL and Fusion Library to have two ways to end with the I type list. : Generate them, or explicitly define them. The former is slightly mo...

Single page Rails app -

I'm writing an image board like 4chan in the railing. This is my first rail app after going through Michael Hartl's train tutorial, and I'm not sure how to organize my controllers. I have a controller for the post, and there is a controller for the pages, will you organize it? Do I need a page controller if I just have to do everything on one page? The user does not have to present how this code affects your structure if it is a page ... you still need something to make that page In your case, though, there will be a list of posts, so you do not need a separate controller. Considering the structure of the rest, you will have: Posts Index - Post list of posts. Shows - posted a post. Create - create a post etc. Your index method becomes "single page" and it can accept filtering parameters and display the list of posts accordingly.

javascript - How to remove a div if it contains a certain string in it? -

There is a list of items on one page, some are blank, with an example: & lt; Div class = "item item" & gt; & Lt; Div class = "tophead" & gt; & Lt; Div class = "itemnumber" & gt; 30 & lt; / Div & gt; & Lt; One class = "article" href = "" & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; Div square = "foothills" & gt; & Lt; One class = "userlink" rel = "" & gt; & Lt; / A & gt; First & amp; Nbsp; & Nbsp; & Nbsp; & Lt; A href = "/ item? Id =" & gt; Discuss & lt; / A & gt; & Lt; / Div & gt; Therefore, an example of jQuery or Javascript can be used to find: & lt; A class = "article" href = "" & gt; Remove any class = item of div in any example of div class = item on the page, and then Hide> which is the piece of code? Updated reply: In...

c# - DrawableGameComponent XNA, Implementation Right way? -

So I've been googling / binging to find answers on this, but drawing spaces. If I want to play a level game with different properties for each level, then I will do something like public class level: DrawableGameComponent {} // Somewhere inside functions or we have the level of var = New level (this, "Level1"); Components.Add (level)); // Player level wins components Remove (level)); Level = New Level (this, "Level 2"); Components.Add (level); How it is done, I looked at the platform kit which is provided for XNA 3.1 and level class, but did not implement DrawableGameComponent and to copy the same functionality decision made. This is a a path and is a good way to use DrawableGameCompenents is. But this is not the only way or the best way that there is nothing wrong with that approach for your levels and if you are going to use DrawableGameComponents, then definitely to use them at a higher level For example, ask each character and tile on your s...

regex - Check currency field only contains 1 fullstop -

Anyone can help me write a regular expression to check a string in a specific format - 300.00 In this '.' Before and after only numbers can be 'me.' Should only have one presence so 300.00 or 300.0.0 is invalid. ^ [0 -9] + \. [0-9] * $ This means that the beginning of the string ( ^ ), one or more digits ( [0- 9] + ), the optional period ( \.? ), then 0 or more digits, then the end of the string. You can modify it as necessary, e.g. To allow the string to start from the duration (first change * ) or mandate duration (remove ? ).

Real time graphing with flot, mysql, php -

I am trying to attract a real time graph because my mysql table is being constantly inserted with values, As the moving graph is referenced, the value actually comes from a carbon dioxide sensor, which updates the value of the table with to 2 posts with id posts. I have changed his monastery. Random in the code below: & lt; Php $ result = mysql_query ("SELECT * FROM node1 ORDER by id DESC LIMIT 1") or die (mysql_error ());; & Gt; & Lt ;? Php $ row = mysql_fetch_array ($ result) ;? & Gt; Var j = "& lt ;? php echo $ row ['co2'];? & Gt;"; Var next = "& lt ;? php echo $ row ['id'];? & Gt;"; (Var i = 0; i & lt; this.xscale - 1; i ++) {this.array [i] = [i, this.array [i + 1] [1]]; // (x, y)} this.array [this.xscale - 1] = [this.xscale - 1, j]; However, when I run this code, the first value changes, after which it remains constant, even if the last line in the table is updating. I have heard becaus...

uibutton - Change image of UIImageView on button click in iPhone program -

I want to change the image in the image viewer when I click a button I know the basic question, but for this I need an answer. Please answer First of all, implement the following method in a MyViewController.m (also, MyViewController Add method signature to .h file): MyViewController.m: - HandBlow link: (ID) sender {imageView.image = [UIImage imageNamed: @ "Blah.png"]; } MyViewController.h: {IBOutlet UIImageView * imageView; } - (IBAction) handleButtonClick: (ID) sender; > / html>

Email Client in java -

प्रयास करें {properties props = new properties (); Props.put ("mail.smtp.starttls.enable", "true"); Props.setProperty ("mail.transport.protocol", "smtp"); Props.setProperty ("mail.smtp.host", "smtp.gmail.com"); Props.put ("mail.smtp.auth", "true"); Props.put ("mail.smtp.port", "465"); प्रोप्सपुट ("mail.smtp.socketFactory.port", "587"); Props.put ("mail.smtp.socketFactory.fallback", "गलत"); Props.setProperty ("mail.user", "उपयोगकर्ता नाम"); Props.setProperty ("mail.password", "password"); सत्र सत्र = सत्र .get डीफॉल्ट इंस्टेंस (सहारा, नया javax.mail.Authenticator () {सुरक्षित पासवर्डअधिकरण getPasswordAuthentication () {वापसी नया पासवर्डअटिकेशन ("उपयोगकर्ता नाम", "पासवर्ड");}}); session.setDebug (सही); MimeMessage msg = नया MimeMessage (सत्र); इंटरनेट एड्रेस एड्रेस = नया इंटरनेट एड्रे...

cocoa - Receive Cached Data after http status code 204 recevied -

I use NSURLConnection this - ( void) connection: (NSURLConnection *) connection didReceiveResponse: (NSURLResponse *) response {if ([response isKindOfClass: [NSHTTPURLResponse class]]) {int code = [(NSHTTPURLResponse *) reaction statusCode]; }} I send a response that meets statusCode is 204, then I have another request, but 204 will come back after all the responses I received, tcpdump show howerver server Return 200 but after one minute, this 200 will return. I thought it might be wrong about some cash, Howerver I do and I set cachePolicy the NSURLRequestReloadIgnoringLocalCacheData [[NSURLCahce sharedCache] removeAllCachedResponses] new requests before. But it does not work. Still I will post 204 before 204, if I send the request after a minute, there will be 200. Is this a mistake of cash? What can I do next? PS: After the arrival of a 204, if I send a request immediate reply came, it seems that it has not been sent. Verwer sends TCPDs. Take a look at the ...

php paging problem -

I have a php page with paging option I want to generate the total number of pages I use SQL statement $ rowspages = 25; $ Page name = 1; If (isset ($ _GET ['page'])) {$ pageNum = $ _GET ['page']; } $ Offset = ($ pgnium - 1) * $ rowspages; $ Query = "SELECT COUNT (id) as table number" $ result = mysql_query ($ query) or die ('error, query failed'); $ Line = mysql_fetch_array ($ result, MYSQL_ASSOC); $ Numrows = $ row ['numrows']; $ Max page = roof ($ points / $ rowspages); I now have a code copy for writing next / previous page link $ page = $ pageNum - 1; $ Prev = "& lt; a href = \" $ self? Page = $ page \ "class = \" rednorm \ "& gt; [previous] My problem is: When I pass a query sting with a page like abc.php? M = 1 and page = 2 The query string will not be available after clicking on that [Previous] / [Next] page link. I can vouch for this problem $ prev = "& lt; A href = \...

c# - ASP.NET a problem with jQuery's ajax function -

I have the button and it's jQuery script (to start the progress bar): & lt; Script src = "..//// files / jscript / junkie-1.3.2.js", "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "..// files / jscript / jquery-ui-1.7.2.custom.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; Var IntervalID; Click on $ ("# by & lt;% = this.Button1.ClientID%>") (function {intervalID = setInterval (UpdateProgress, 500); $ .ajax ({type: "Post", URL: "CustomerImport .aspx / ExecuteImport", data: "{}", contentType: "application / json; charset = utf-8", datatype: "json", async: true, success: function () {$ ( "# Progress bar") progress bar ("value", 100); clear interval (interval id); $ ("# result"). Text ('OK');}}); return;}); Function UpdateProgress () {$ .ajax ({Type: "Post", URL...

wpf - How do I reset a DependencyProperty back to it's default value in XAML -

I am using a user-adjustable effect sliders and I have a reset button Slider's The idea is to allow users to reset the effect property as specified in the metadata to the default value of the property. I think it might be trivial to do this in XML. Dependency attributes are not actually the default values, if there is no local value in a dependency property It will receive the value of the property based on the success of the property either through the successor or fortune. You actually have the local value of the property XAML - for which you will need to call ClearValue on the property, and there is no way to find the object and any method on this Call declaratively, but as long as the value of the property's property (instead of forcibly price) is being received, you can force the property by complying with the original property to the property, For example, here's a style that you use to create a ListBox , which sets the foreground color of all th...

Does WPF RichTextBox support squiggly underline and inline images? -

I need to support these 2 features and editable components: Inline images Squagglly underlines which can be custom chords (different for their text above). What does WPF RichTextBox support? If not, what does it do? Displays rich textbox flow documents that support inline images through the use of one. They do not support squawgli underline by default, but you can create a custom style.

operations on files in c++ -

For example, we have created a file in C ++ how to write content in this file and then output to the screen? Write: #include & lt; Iostream & gt; # Include & lt; Fstream & gt; using namespace std; Int main () {ofstream myfile; Myfile.open ("example.txt"); MyFile & lt; & Lt; "It is typing in the file. \ N"; Myfile.close (); Return 0; } Reading: #include & lt; Iostream & gt; # Include & lt; Fstream & gt; #include & lt; String & gt; using namespace std; Int main () {string line; Ifstream myfile ("example.txt"); While (gateline (mime, line)) {cout & lt; & Lt; Line & lt; & Lt; Endl; } Myfile.close (); Return 0; } You really should use Google.

css - image in div wont show -

यह पूरी मूल तस्वीर क्यों नहीं दिखाता? & lt; div class = "test "& gt; & lt; / div & gt; .test {background: url ("http://i27.tinypic.com/28ktoh.jpg") नो-दोहराना; } समस्या यह है कि कुछ भी नहीं दिखाती है, यदि आप div में कुछ टाइप करते हैं तो यह छवि का थोड़ा सा दिखाता है मैं पूरी तस्वीर को शामिल करना चाहता हूं। (पूर्ण चित्र देखने के लिए सीएसएस में कॉपी पेस्ट लिंक) आपको ऊंचाई .test {background: url (निर्दिष्ट) को निर्दिष्ट करना होगा "Http://i27.tinypic.com/28ktoh.jpg") नो-दोहराना; अतिप्रवाह: ऑटो; ऊँचाई: 500px; }

iphone - i want to find bookshelf like demo -

I downloaded a bookshelf demo from the apple site's official site. But now I lost it and could not get it back. Can someone come to this please let me know, just give me a link Thank you. This GitHub project may help you: [This example is for an iPad app.]

symfony1 - Symfony routing problem, route being ignored -

मेरे पास मेरे app / frontend / config / routing.yml में निम्न है: मुखपृष्ठ: यूआरएल: / परम: {मॉड्यूल: मुख्य, कार्रवाई: इंडेक्स} default_index: यूआरएल: /: मॉड्यूल परम: {कार्रवाई: सूचकांक} डिफ़ॉल्ट: यूआरएल: /: मॉड्यूल /: कार्रवाई / * sf_guard_register: यूआरएल: / रजिस्टर परम: {मॉड्यूल: उपयोगकर्ता, कार्रवाई: रजिस्टर} sf_guard_signin: यूआरएल: / लॉगिन परम: {मॉड्यूल: sfGuardAuth, कार्रवाई: प्रवेश द्वारा} sf_guard_signout: यूआरएल: / लॉगआउट परम: {मॉड्यूल: sfGuardAuth, कार्रवाई: प्रस्थान करें} sf_guard_password: यूआरएल : / request_password परम: {मॉड्यूल: sfGuardAuth, कार्रवाई: पासवर्ड} जब मैं कोशिश / रजिस्टर मार्ग, मैं इस मिल: एक्शन "रजिस्टर / इंडेक्स" अस्तित्व में नहीं है। मुझे निर्दिष्ट करना चाहिए, मेरे पास "रजिस्टर" मॉड्यूल नहीं है, और मैन्युअल रूप से बुलाए जाने पर मेरा उपयोगकर्ता मॉड्यूल अच्छी तरह से काम कर रहा है इसके अलावा अन्य मार्ग ठीक काम कर रहे हैं। किसी भी विचार का स्वागत किया है, धन्यवाद! क्योंकि आपका default_index मार्ग ऊपर रखा गया है, ...

plugins - Plug-in handled load UIWebview -

I am developing an iPad app that plays video from the Internet Video Archive (IVA). I can play IVA url in iPad-Safari but, I am able to stream it in my app. I am doing the following things to play the video: To webview in Nib Add an outlet I have written the following code in my game system: NSString * myURl = // Internet Video Collection URL; Video is in MPV format CGRTEFfr = [[USScreen main screen] applicationframe]; Webview.frame = webFrame; [Webview Set Deliget: Self]; [Webview loadRequest: [NSURLRequest requestWithURL: [NSURL URLWithString: myURl]]]; This returns the following error: Error domain = WebKitErrorDomain code = 204 UserInfo = 0x1b2e30 "Plug-in handled load" Can I play video from other sites? Can someone help me solve this problem? Thanks in advance Regards, Deepa MPMoviePlayerController Try or use / div>

can we use jpg images in iphone application -

hiii frends, Actually I'm working on an application for which background, cars Images like, etc. are needed PNG images are very heavy so we can use JPG images? Thanks for any answers. Yes.

java - Why jsp: tags are not parsed? -

मेरे पास यह login.xhtml JSF पृष्ठ है: & Lt;? Xml संस्करण = "1.0"? & Gt; & Lt; jsp: रूट संस्करण = "2.0" xmlns: jsp = "http://java.sun.com/JSP/Page" xmlns: f = "http://java.sun.com/jsf/core" xmlns: ज = "http://java.sun.com/jsf/html" & gt; & Lt; jsp: directive.page contentType = "text / html" / & gt; & LT; च: दृश्य & gt; & Lt; h: इनपुट टेक्स्ट = "# {userBean.id}" /> gt; & Lt; / च: दृश्य & gt; & Lt; / jsp: जड़ & gt; आउटपुट HTML में ठीक से गाया गया & lt; इनपुट & gt; टैग है, लेकिन & lt; jsp: * & gt; अनछुए गए हैं लगता है कि जेएसएफ अभी उन्हें समझ नहीं पाया। क्यों? आप JSF 2.0 का उपयोग कर रहे हैं और फ़ाइल में एक *। Xhtml एक्सटेंशन आप वास्तव में Facelets का उपयोग प्रौद्योगिकी के रूप में देख रहे हैं, जेएसपी नहीं। फेसलेट जेएसपी के उत्तराधिकारी हैं। आप जेएसपी टैग्स के साथ फेसलेट को नहीं मिला सकते। सभी & lt; jsp: & gt; टैग से छुट...

visual studio 2010 - WriteBuildMessage not displayed -

इस सरल एमएसबिल्ड स्क्रिप्ट (xaml) पर विचार करें: & lt; गतिविधि xmlns = [ ...] & gt; & LT; अनुक्रम & gt; & Lt; mtbwa: WriteBuildMessage संदेश = "परीक्षण संदेश" / & gt; & Lt; mtbwa: WriteBuild चेतावनी संदेश = "टेस्ट चेतावनी" / & gt; & Lt; / अनुक्रम & gt; & Lt; / गतिविधि & gt; मेरे पास इस स्क्रिप्ट पर आधारित एक tfs बिल्ड परिभाषा है। जब मैं टीएफएस में एक नया निर्माण करता हूं, तो चेतावनी "दृश्य लॉग" के तहत प्रदर्शित होती है, संदेश प्रदर्शित नहीं है । आप इसके बारे में क्या सोचते हैं? यह लगभग है एक न्यूनतम वर्कफ़्लो xaml फ़ाइल जो काम करती है: & lt; गतिविधि xmlns = "http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns : mtbwa = "clr-नाम स्थान: Microsoft.TeamFoundation.Build.Workflow.Activities; विधानसभा = Microsoft.TeamFoundation.Build.Workflow" & gt; & LT; अनुक्रम & gt; & Lt; mtbwa: WriteBuildMessage महत्व = "[Microsoft.TeamFoundation.Buil...

linq to sql - Left Join on Table with One-to-Many relationship -

I apologize for the eyes here, but I find it difficult to understand this problem (though I'm sure it There is a fairly common problem / solution) I want to execute a query that selects rows from a table, where the second table is "too many" in one-to-many relationships. But in my one where there is a special situation to check several parts, here is the code with part I do not understand full of pseduocode. var query = Programs from db.Accademic programs where programs. Program Program (keyword.text) with DeptIDName.DeptName.Starts || Program Academic programKAIDS (& Lt; a value that starts with the keyword. Text & gt;) Select new {program.ProgramTitle, program.ProgramHomePage, program.ProgramCode, program.ProgramType}; This should work for you: Program Academic ProgramsKids.Any (APK => APK.Fild. Start (CARIRECTED TEXT)) Effectively, it says: Selection of Academic Programs Where do any of its academic programs

c++ - io operation using same stream object -

I want to take I / O action in C ++. I want to store an indicator in the fstream object and the same fast I want to read and write that file. Is it possible to read the Eastream without using two different objects and for the offstream? Yes, Fistruff can be used to read and write. Do you want to accomplish this? // your fstream object std :: fstream a ("coco.txt"); // Buffer Cherry Foo [100]; // a & lt; & Lt; "Hello" & lt; & Lt; Write endl; // rewards a.seekg (0, iOS :: bakh); // One & gt; & Gt; Foo; // display std :: cout & lt; & Lt; Foo; // clear a.close ();

java - Which protocol to choose for a turn-based game server -

I am writing a game server for Java based game. These are the facts: The speed of the game is slow, so customers need to send data, we say every 8 seconds, and this data is just a small incremental update (A The server must support a large number of players, which say that 1000, which play one of the few hundred games When the player makes a turn, the other of the same game Players should be informed about this step. First of all, I excluded UDP from my options list because I need a reliable protocol because in rare cases I really need to send some data that can not fit in a packet and I want to merge packets and similar things I do not want to be disturbed, watches over the orders of outdated packages and other low-level items. There is a dilemma that TCP or HTTP TCP attempt # 1 The connection server (and vice-president) is opened to the customer all the time. When the action takes place, the server can easily inform other players in the game which was to run. The m...

php - Regular Expression, match characters between { } -

I am trying to find the text that contains a & lt; Or> between {} it is within HTML and I'm having trouble getting "ungreedy". So I want to match the text that matches this string: {test> 3} {test & gt; = 3: comment} {example & lt; 4} I have tried several regular expressions, but all continue before closing) and include HTML & lt; Or> for example, I tried this rijks {. *? ( But it ends the matching text like this: {if true} & lt; B & gt; Trial & lt; / B & gt; {/ If} It is very easy, in which & lt; Or This should do the trick: {[^ }] * (& Lt; | & gt;) *}

tsql - MS-Access - how to trigger data insert before LostFocus event? -

I have a process that runs on to a control AfterUpdate Event: Private sub cmdDelCountry_AfterUpdate () dim strID string strID = cmdCommand as Me.ID with new ADODB.Command as strCase string strCase = 1 dim cmdCommand .acticConnection = CurrentProject.Connection .CommandType = adCmdStoredProc. CommandText = "uspSalesOrderHead_UPDATE" '@RowID .Parameters ("@RowID") Value = strID '@case .Parameters ("@ episode"). Value End Sub with = strCase .Execute end to process some data on a stored SQL Server process server executes the process: ALTER process as uspSalesOrderHead_UPDATE (@RowID integer, @Case integer) that @Case = 1 / * Select country of delivery * / start / * order order Head table * / UPDATE dbo.tblSalesOrderHead SET dbo.tblSalesOrderHead.txtRegionCode = dbo. Tblsetingko Untrikdektshtrgiankde, Dboktblslesrderhedktshtkurrensikde = Dboktblsetingkauntrikdektshtkurrensikde, Dboktblslesrderhedktstlanguagekde = Dboktblsetingkauntrikdekt...

pass string to emailbody (iphone) -

Hopefully a simple question for those who know what they are doing ... I have a string variable with user input text I then bring an email view based on apple example MailComposerViewController and I want to text the text of the email body. How can I get string variables in email as simple as possible? - (zero) displayComposer sheet { MFMailComposeViewController * picker = [[MFMailComposeViewController alloc] init]; Picker.mailComposeDelegate = self; [picker set topic: @ "subject line"]; // Set up recipients NSArray * toRecipients = [NSArray arrayWithObject: @ "marko@test.com"]; [Picker settingspxients: toRecipients]; // Fill in the e-mail body text NSString * emailBody = @ "Replace with string plz"; [Invoice settingsMessageboard: EmailBody is HTML: No]; [Self current model visual controller: animated picker: yes]; [Picker release]; update : Project is openFrameworks based & amp; Trouble seems to me that C ++ & amp; Ob...

objective c - Use a UIPanGestureRecognizer to rotate view -

Is it possible to rotate a view using UIPanGestureRecognizer? I have similar functionality on rotation gesture but only with one finger. Thank you. Sure. But you have to calculate your rotation, of course. If you have a "focal point of rotation to the scene", which is particularly useful, because you can track the angle of the touch input in relation to the center, and the scene transform property (Or whatever) when it is updated.

iphone - UIBarButtonItem has a too large click area -

I know that some have already asked questions but so far, the answers are not really specific. Apparently Apple has made the clickable area of ​​the navigationbar really big, but I do not think it should be bigger. In my app, there is a TableView just below NavBar and you can click below the first half of the cell to trigger the incident on the right. Buttons such instanced: UIBarButtonItem * editButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemEdit goal: self action: @selector (editTable)]; [[Self Navigation Itam] Setteartbootnitime: Edit Button]; "Self" is the root view controller of a navigation controller. You can imagine, it is a problem by making the cells' height is bigger but I was since the cells are selected to push another ViewController. I managed to solve the problem instead of being in regular shape. I am sure that in this case of scenario I am not the only one thanks in advance. You can not do much...

windows - Upgrading from SQL Server 2008 R2 Express to SQL Server 2008 R2 Enterprise -

When I tried to upgrade from SQL Server 2008 R2 Express to SQL Server 2008 R2 Enterprise, then passed all tests And then it fails and a window error message: There are validation errors on this page Right click to close this dialog box Please review the errors on the button on the setup page, then provide valid parameters or for more information Click on the sign. Is it possible to proceed or do I need to backup, uninstall Express and then install the latest Enterprise Edition? Supported versions and version upgrade paths are listed. Your renewal path is one supported: SQL Server 2008 R2 Express SQL Server 2008 R2 Express Advanced Services with SQL Server 2008 R2 Express SQL Server 2008 R2 Workgroup SQL Server 2008 R2 Standard SQL Server 2008 R2 Developer with SQL Server 2008 R2 Enterprise SQL Server 2008 R2 Data Center with the following note: This SQL Server version will be upgraded to SQL Server 2008 R2 Failover Clusters on 64-bit Server's 32-bit Subs...

django - TypeError when saving a formset -

I have declared a format like this: class BaseFeatureFormSet (BaseFormSet): Def save (self, committed = true): feature = feature (name = self.cleaned_data ['name'], type = self.cleaned_data ['type'], premium = self.cleaned_data ['premium'],) feature. Save () Return Feature FeaturesFormats = Formats_Fattery (EditFeatureForm, formset = BaseFeatureFormSet, Extra = 0) So when I am saving the format, I'm getting a TypeError: List Index Must be integer, no Save () is referring to the first row of the function. How do I fix this error? Update 1 I'm not getting another type of error that was managed to solve this biscuit: 'EditFeatureFormFormSet' from the next line in the Object Code section, / Code> is not repetitive: for convenience in convenience: feature.save () feature = vehicle. Features.Ed (Feature) Error to facilitate features: Thoughts? cleaned_data In this example, there is a list of form values You will hav...

.net - What are the theoretical implications of unbounded lookbehind? -

Most languages ​​allow fixed-long or cimet-long lookbounds. One notable exception is .NET, which allows operator to use. However, NET Reggae can already identify balanced brackets using named captures, which is not a regular language. Regexs still look * regularly with? Extended replies for other subexpressions except for * (for example, additional settings!) Will also be appreciated. tl; Dr: What looks to be regular with * regexs * lookbehind? Hope that helps!

jquery - how do I submit jqgrid values as formfields? -

I am trying to use jqGrid in a form where the user fills conventional forms such as phones, etc. is. A line item is a jackgread where the user can add / edit / insert rows, and when completed, submit the entire form. I have a grid job because I want to show it, I can not get the contents of the grid presented as part of an integrated form. Here is an example of a proxy code: & lt; Form id = "foo" & gt; & Lt; Input id = "user name" type = "text" & gt; Your name & lt; Br> Enter your choice in the bottom grid: & lt ;! - Imagine jqGrid here - & gt; & Lt; Input type = "submit" value = "submit form" & gt; & Lt; / Form & gt; I have searched, have scored, read docs, read wiki etc. but just do not see how to pass Jeff grid rows and columns as Farmfield . Any guidance would be appreciated. Perhaps the best way to do this would be to use the hidden form field: Pre> & lt; Input ...

c# - Is it good practice to return an IEnumerable<T> for a collection that implements INotifyCollectionChanged -

Writing another question for SO, I came across a pattern that I often use and in fact I have never been reflected in it ever. But now, I am not sure that this is the right way: If I have a collection that is tied to my WPF-controls, then I almost always IEnumerable & lt; SomeType & gt; . Although internally, in most cases a ReadOnlyObservableCollection & lt; SomeType & gt; . I had no problem with this and all consumer controls are always updated correctly, which is not surprising because they check for INotifyCollectionChanged -interface but my question Now, if this signature is only in the IEnumerable & lt; SomeType & gt; is bad behavior to declare, but to return to something more powerful (even more dependent), INotifyCollectionChanged ). Update: I try to clarify: My main purpose is a IEnumerable & lt; SomeType & gt; Return . But most of the time, returned IEnumerable & lt; SomeType & gt; implies INotifyCollectionChanged ...

flash - Converting FLV to SWF to play on Web -

itemprop = "text"> Let me have a small Greek boy on my website. I have received a .mov from adobe premiere with a transparent background In this Adobe opened the effect, went to compose-> to render the range, I set the output format for RVB + alpha and audio with FLV. After that I uploaded the FLV to my webserver, opened the FLV in my Flash Professional from my server, chose an FLVPlayback skin and chose the "Already posted" option for the source of my file. I then file->. Export to SWF and upload SSF back to your server. When I embed it in my home page, man does not load in every way, I get around 5 seconds. The SWF is around 50 KB and the FLV is around 18000 KB. The video is 1 minute 15 seconds long. What am I doing? If you change the video in SDF format then you can not reduce more .. Told that the video duration is 75 seconds, you have to use Adobe Media Encoder to make the video as FLV or MP4, depending on your dimensions of the video, you ...

shell - persistent local tty session with java -

I am developing a web shell client, and there is a question with tab functionality "code completion". Anyone knows a way to open a local TTI connection, where I can execute several orders with one session, I do not like to work like all time sequences. RunRuntime (). Exec ("command"); Any remedy? Runtime.getRuntime (). Instead of Exec ("command") code> Do runtime.greatantum (). Exec ("/ bin / sh"); After holding down the and process objects, you can type commands to the OutputStream provided by your getOutputStream () method-- I think that you can input your input stream Read and get the output.

sql - Merging result from 2 columns with same name and not over-writing one -

मेरे पास एक साधारण MySQL क्वेरी की तरह है: SELECT * content_Category` सीसी से, `Content_item` सीआई जहां CI.content_id = '"। (Int) $ contentId।' 'और CI.category_id = CC.category_id और CI.active = 1 दोनों तालिकाओं में एक कॉलम है कॉन्फ़िगरेशन नामक एक क्वेरी में ओवरराइट हो जाता है अर्थात केवल content_item.configuration परिणाम में लौटा दी गई है। > SELECT CC.configuration को `category_configuration` के रूप में, CC.category_id के रूप में` ..... के रूप में सभी डेटा को चुनने का एक तरीका है * दोनों से और उन डुप्लिकेट को हल करें किसी गैर-विनाशकारी तरीके से स्तंभ नाम। आपको सभी स्तंभों को अलविदा करने की ज़रूरत नहीं है, केवल एक परस्पर विरोधी: SELECT *, CC.configuration cc_conf, ci.configuration के रूप में ci_conf के रूप में `content_category` सीसी,` content_item` सीआई जहां CI.content_id = '"। (Int) $ contentId।' 'और CI.category_id = सीसी.category_id और CI.active = 1

c - How to get byte size of multibyte string -

मैं दृश्य सी में एक multibyte-character स्ट्रिंग के बाइट आकार कैसे प्राप्त करूं? या अधिक सामान्य, मैं टीसीएचआर स्ट्रिंग के सही बाइट आकार कैसे प्राप्त करूं? समाधान: _tcslen (_T ("TCHAR string")) * sizeof (TCHAR) संपादित करें: मैं केवल रिक्त समाप्त स्ट्रिंग्स के बारे में बात कर रहा था। / P> , _tcslen से संगत है strlen जब _ एमबीसीएस परिभाषित है strlen स्ट्रिंग में बाइट्स की संख्या वापस कर देगा। यदि आप _tcsclen का उपयोग करते हैं, तो _mbslen से मेल खाती है, जो कि multibyte वर्ण की संख्या देता है। इसके अलावा, multibyte तार नहीं करते हैं (एपीएआईके) में एम्बेडेड नल, नं। मैं पहली जगह में एक multibyte एन्कोडिंग के उपयोग पर सवाल करता हूं, हालांकि ... जब तक कि आप कोई लीगेसी ऐप का समर्थन नहीं कर रहे हों, तब तक multibyte चुनने का कोई कारण नहीं है यूनिकोड।

php - Making User Information Available on Every Page -

I am an amateur, valid, but I am trying to learn a bit more about programming, and php general In, using CodeIgniter. I have a test site and it's going on and I think I have a decent understanding of MVC. Even though without any formal background, I know that my architecture is bad and dirty, so I From time to time, I choose the best methods from all those information (which is you). There is some data about users who want to access each page like I want to say that the data is stored in 3 different DB tables. The only way I can consider getting information in every controller is to create a model that pulls this data and then calls the model in each controller, passing the data on the scene. Another idea is to create a library that loads the model, automatically loads it, and then I take the specific data of the function in the library when I want it. . Am I thinking about this correclty? Thank you. You can use When a user is logged in, he stores his basic inf...

java - SQLite query throwing exception in Android -

I am trying to create an SQLite database in my Android application. I know that contact in the database because when I add it to go and do, try to find the ID he object when I first tried to find the last name, however, it throws an exception and Im Left with a redundant reference. Query: cursor = mDb.query (DB_CONTACTS_NAME, new String [] {KEY_ID, KEY_LAST_NAME, KEY_FIRST_NAME, KEY_EMAIL_ADDRESS, KEY_ORGANIZATION_NAME, KEY_LABEL, KEY_LABEL_POSITION}, KEY_FIRST_NAME + "=" + first + " And "+ KEY_LAST_NAME +" = "+ Last, Free, Empty, Null, Zero); Ive also tried to find by name first and just by the last name. Edit as a single result. Aurelius: while compiling: Select _ id, last_name, first_name, EMAIL_ADDRESS, organization_name exception SQLite exception is a column such labels, where label_position contacts first_name = Marcus and Last_name = Andelius Anything else is trying to make the first selection when the last name such a column: M...

What page to open when running Maven-based EAR from Netbeans -

What is an easy way to tell NetWens (6.9) when I "run" my MyOne Enterprise Project? This opens an absolutely incorrect reference path , I think there are some options that I can specify on project properties. Action page -> "Run project" action, I can not find it anywhere because the documentation is not anywhere for netbeans ... I have not found any fix for this.

javascript - Getting Invalid at the top level of the document. Error processing resource 'http://localhost:8080/AjaxDecoder/response'. Line 1, -

The following error is taking place while loading URLs in the browser: XML page can not be displayed Invalid processing at the top level of the document '' Line 1, ... '' process in processing TOMAC Integrated My Web with Eclipse The XML file is: Any stupidity what am I doing? It seems that there is something wrong with my web.xml configuration This code is working but if you If you are changing any criteria related servicelet, then you have to restart your server, if it is a package then also check your AjaxResponseServlet path, then you enter the code

How to create required fields for custom post types in Wordpress 3? -

I am creating a custom post type called article and I want to create an area that is called style is. Is this possible? if echo ($ req) "aria-required = 'true'";

sql - Select DISTINCT items rows and associated columns based on a condition -

Suppose i have a table like this in my db date items etc. 7 / 29/2010 3 1 7/30/2010 3 2 7/31/2010 2 3 7/2 9/2010 3 4 7/30/2010 1 5 7/31/2010 1 6 7/29/2010 2 7 7 / 30/2010 3 8 7/31/2010 1 2 For each item type, I want to select the count only on the latest date found in the table. Is there an easy way to do this? I'm thinking of something different to get a specific item IDID, but I'm stuck there. to calculate from item id, (select date, item id, calculation, R Rank () (Table by R Rank) (Order IDID, Item IDID, Date Disclosure), where R = 1

Dynamically adding a script/function block in jquery -

Edit: Just wondering whether it is possible to add a function (or static script) block Or a variable in the html's body Something like that, $ ('body'). Add (function () {/../}) or $ ('body'). Attachments ('& lt; scripts & gt; & lt; / script & gt;') or $ ('body'). Fn.myfunc = function {} Is it right to use? Expand instead? An example is that if I use the external interface, my callback should be defined statically in body / html / js, but not in $ (). Ready Function As long as I do not have a different definition around the world and see it in the $ () ready work. I ignored this requirement, and the place where I wanted to add dynamic callback functions. To create a script tag in your markup $ ('& lt; script / & gt;', {type: 'text / javascript', src: 'http: // ...'}). To add (Document.body); Use jQuery to expand $. Fn.yourmethodname = function () {}); ...

jquery - Is there any way to run first base function that defined in ajaxSetup? -

$। Ajax सेटअप ({सफलता: फ़ंक्शन ऑन सफलता (msg) {// कुछ फ़ंक्शन को `msg` / / फिर सफलता पद्धति पर लौटें जो कि $। एएजीएक्स msg.display = function () में परिभाषित है (चेतावनी (msg.M_Prop);} वापसी msg;}}); $ .एजैक्स ({सफलता: फ़ंक्शन (न्यूमॉस) {// कॉल को नए संदेश ऑब्जेक्ट के नए मैसेज ();}}); इसके बारे में कैसे? $। Ajax सेटअप ({Url: "http://jsfiddle.net", वैश्विक: गलत, टाइप करें: "GET", डिस्प्ले: फंक्शन (msg) {// कस्टम डिस्प्ले फ़ंक्शन जो एजेक्स सेटअप अलर्ट में परिभाषित है (msg);}}); $ .एजेक्स ({सफलता: फ़ंक्शन (न्यूमॉस) {this.display ("हैलो:" + नया संदेश); ​​// इसे अपने सफलता के हैंडल में कॉल करें}}); मैंने इसे यहां पर परीक्षण किया है यहां एक और तरीका है (जिस तरह से आप चाहते हैं) $ .ajaxSetup ({ Url: "http://jsfiddle.net", वैश्विक: गलत, प्रकार: "GET", सफलता: फ़ंक्शन (msg) {msg = msg} {}; msg.display = फ़ंक्शन () {चेतावनी ("प्रदर्शन" );} यदि (टाइपफ (this.customSuccess) === "फ़ंक्शन") {this.customSuccess ...

image - TinyMCE removes double slashes -

How can you remove automatic double-slash? When I put the base 64 embedded image (& lt; img src = "data: image / png; base64, xyz ... ... /// ... html = html, then automatically pulls a double slash and hence The image is corrupted ... I solved the problem by writing a custom urlconverter_callback ...

Cocoa NSVIew notification when the view gets the key focus? -

How can I get a notification if an NSView gets the main focus? I hope like a method "windowDidBecomeKey" from NSDWindow but I'm either blind or nothing like NSView. Important view, when there is one, is the first response, therefore, apply in your approach, and either Handle there or post a notification to listen for your controller.

r - newton.method issues -

Has this method broken up in R? I am using the following functions to find: f (x) = 2.5 * exp (-0.5 * (2 * 0.045x)) + 2.5 * exp (-0.045) + 2.5 * exp (-1.5 * X) - 100 This is responding to -38.4762403 which is not close (F (x) = 2.90380 9A + 25x = -38.4762403). The answer should be around 0.01-0.1. This function should be coordinated. For normal tasks such as F (x) = x * *, it responds as 8.89210984 for which f (x) = 0.001222392 and I set tolerance to 10 ^ -12. Besides, is Newton a non-graphical version of the method? I saw nleqslv but do not know how to use it .. Thanks for your help There are several root finders in R, like uniroot and polyroot . You can use customizable tasks like optim , optimize or nlminb for more complex issues. An example of solving this problem with uniroot is. ## Define the function f & lt; - function (x) {2.5 * exp (-0.5 * (2 * 0.045 - x)) + 2.5 * APP (-0.045) + 2.5 * AP (-1.5 * x) - 100} ## Pane Y and LT; - Seak (-20,20,0.1) ...

c - How to do a cleanup after SIGKILL? -

I am working on a program that uses shared memory, many instances of the program are connected to an existing one You can go back or make it back on the OS, when there is no other process or just separate it and finish it. I thought how many processes used it, to keep track of it Using Simple Counter I am using the atexit () function to perform the cleanup, however, the seagle signal upon receiving afaik, the process will not be able to perform any cleanup, so if they If none of the procedures end up normally, then maybe I would never be able to clean the memory. Is there a way to specify what to do after a Sigil signal? I'm probably going to write some mechanisms like a timer so that it can check whether the process is still alive, but I really want to avoid it if there is any other way. No, Sigil can not be caught in any way by your application - if it does, then the application It can ignore it, which will harm its purpose.

java - JPanel component draw order -

कृपया निम्न कोड देखें: आयात करें java.awt.Color; आयात करें java.awt.Dimension; आयात java.awt.Graphics; आयात करें java.awt.event.MouseAdapter; आयात करें java.awt.event.MouseEvent; आयात javax.swing.JFrame; आयात javax.swing.JPanel; सार्वजनिक वर्ग मुख्य {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {अंतिम जेफ्राम एफ = नया जेफ्राम ("एफू"); अंतिम जेपीनल सी = नया जेपीनल (नल); f.setContentPane (ग); C.setPreferredSize (नया आयाम (500,500)); अंतिम जेपैनेल ए = नया जेपीनल (नल) {@ ओवरराइड संरक्षित शून्य पेंट कॉमपोनेट (ग्राफ़िक्स जी) {जी। सैट रंग (रंग.रेड); G.fillRect (0, 0, getWidth (), getHeight ()); }}; a.setBounds (0,0,300,300); c.add (क); अंतिम जेपीनल बी = नया जेपीनल (नल) {@ ओवरराइड संरक्षित शून्य पेंट कॉमपोनेट (ग्राफ़िक्स जी) {जी। सीट रंग (रंगीन जीआरआई); G.fillRect (0, 0, getWidth (), getHeight ()); }}; b.setBounds (200,200,500,500); c.add (ख); C.setComponentZOrder (ए, 0); f.pack (); f.setVisible (सही); F.addMouseListener (नया माउस एडाप्टर () {@ ओवरराइड पब्लिक व्हॉयड माउसक्...