Posts

Showing posts from January, 2015

Perl RegEx: Limiting the pattern to only the first occurrence of a character -

I am trying to extract the contents of a date element with many sick SGML documents. For example, the document might have a simple date element such as or & lt; DATE blaAttrib = "89787adjd98d9" & gt; 4 July 1936 & lt; / DATE & gt; But it can also be in the form of hair: & lt; DATE blaAttrib = "89787adjd98d9" & gt; 4 July 1936 & lt; EM & gt; EM element within the date & lt; / EM & gt; & Lt; / DATE & gt; The purpose is to get "July 4, 1936" since the files are not large, so I read the entire contents in a variable and chose to regex. The following is a snippet of my Perl code: {local $ / = undef; Open the file, "$ file" or die "File can not be opened: $!"; $ FileContent = & lt; FILE & gt; Close the file; If ($ fileContent = ~ m / & lt; DATE (. *) & Gt; (. *) & Lt; / DATE & gt; /) {# $ 2 should be "4 July 1936", but It did not happen. }}...

sql server - Test Function in MVC Project -

So I want to test my work in my web project, but it is actually nothing connected to the project (Someone else is working on that part). Moves the function to the "id" field, goes to some queries and receives some data, computes some, and then writes a file stream a bunch of lines and returns the stream. I just want to test it by writing a file locally on my computer and after the completion of the function I want to work with that file directory. So my question is mainly: 1) How do I call test purposes only for this purpose, so that I have not yet asked all questions without connecting to any other part of the application / Computation / write file, etc. 2) How to Thanks guys! To make your function testable, you need to separate all your dependencies and Replace your test with Stubbs Mock. You can get it through the wrappers around the file system classes and make sure that your data layer classes have interfaces, and your code can look like this: {IDataP...

javascript - Take bounciness out of horizontal accordion -

Here is an example I am working on a horizontal accordion associated with Google Maps. Let me have the problem when you click on a piece on the right side, and then click on another piece, while the last one is open, the first piece bounces in place. Any way to remove the rant? Thanks!

Eclipse and GWT -

I have installed the GWT plugin in Eclipse, how does the following code run? I'm new, can someone show me graphs? Have you tried the following steps? Full page is also dedicated in the user manual. With screen shots.

logging - What NoSQL solution is best to store Apache error_log and access_log? Cassandra or MongoDB? -

We have developed a PASS solution for PHP. Under this, we offer developers the ability to view Apache errors and log-in files through our APIs. Currently we write logs in files on disk per disk (vhost). Even with higher nodes and deployment, it does not scale well, even if the files are on distributed file system (Glastrephase), we want to switch to something better. Especially for billing and statistical reasons, we do not always want to parse the log files. Since collection of collection of mongodibi looks great for logging, we wanted to go with it. But it is revealed that they do not seem to work with auto-shading, what kind of things do we deteriorate for us because we expect that they read too much then they read. The second option was the case, which I want because it is every node equal approach, but they have no such thing as a capsized collection. One of the two solutions provides a specific feature that helps me make a decision, or I do not see it. > So do...

iphone - Can I play an FLV on the iPad Simulator? -

I am trying to create a simple app for the iPad, when you play an FLV when you click on a button . I am using code in the form of a reference code for my click event is here - (IBAction) btnPlayVideoClick: (ID) sender {NSString * videoPath = [[NSBundle mainBundle ] PathForResource: @ "myvideo" type: @ "flv"]; MPMoviePlayerController * myMovie = [[MPMoviePlayerController alloc] initWithContentURL: [ns URL] URLWithString: VideoPath]]; MyMovie.scalingMode = MPVcCalingModEscapeFilm; // Register to end playback notification. [[NSNotificationCenter defaultCenter] addObserver: Self Selector: @selector (myMovieFinishedCallback :) Name: MPMoviePlayerPlaybackDidFinishNotification Object: myMovie]; [MyMovie Play]; } - (zero) myMovieFinished callback: (NSNotification *) A notification {MPMoviePlayerController * theMovie = [an information object]; [[NSNotificationCenter defaultCenter] Deletion Observer: Own Name: MP3 MPVplayerplaybackDefinitionTipification Object: Movie];...

Salesforce/PHP - Make field read-only after user has entered value -

In the Salesforce I have an account that I have two fields in that account, after some processes running in the background, with PHP SDK Population happens. PHP SDK updates fields in some situations, when this happens I would like to lock that field to read-only. Can I do this with PHP SDK? You want your "lock" database (or in this case - at the Salesforce level), but not PHP SDK level because otherwise it will catch the malicious user data loader or Excel connector and bypassing your lock will proceed with your updates;) Try the salesforce legalization rules or (if your argument is complex) Trigger a "first update". Example: AND (ISPKWAL ​​(PRIORVALUE (type), "technical partner"), Error message to display: type type type, $ profile .name After the "Technology partner" is set, only administrators can modify this field. This is just a starting point, easy to use and fine. You can still disable this rule after migration. ...

ASP.Net load balancing -

I am working on asp.net (newbie) and I am trying to understand that "load" What does it mean to "balance" the website? The website will be used by many users and resources (databases, web services, ..). If someone can help me understand the concept of load balancing for the asp.net web site, I would appreciate it. Thanks. A load-balance-related problem that you want to be aware of when developing: where you Session positions store a good overview of your options. If you apply your asp.net system by using "single-process" or "SQL-server-mode" session state management, then you have some additional flexibility later, if you deploy your Decision to present a load-balancer in the system: Your load balancer does not have to deal with session affinity as a poster above, all the modern load-balancers Sort of handle it This is a minor consideration in any case. Web-Garden (a type of IIS / server-implemented load-balancer) Requirements ...

apache, php config -

I am running a php application that gives feedback to the customer in about 1 minute (this time the load continues) . Although the feedback is displayed all at once, I would like to know whether any configuration is being processed in Apache server / php for displaying timely feedback. For example, I have the echo "test"; $ Rez = file_get_contents ($ url); Do something ... But after the result of the counterpart, all the tasks (file_gate_content and everything else) have been completed so I want to configure server / PHP to display it at execution time is required. 1) 2) output_buffring = off PHP 3) Disable gzip for PHP 4) Disable gzip in Apache

iphone - nsstring shows a different result when logged and when assigned -

मेरे पास निम्न कोड है: - (शून्य) loadVersionDataToTable: (int) versionIndex { ऑप्टिमाइज़ेशन रिपोर्ट रिपोर्ट दिनांकित संस्करण = [स्वयं। ऑप्टिमाइज़ेशन रिपोर्ट रिपोर्ट किए गए परिणाम वस्तुऑटएंडएक्स: 0]; ReportDateVersion * संस्करण = [दिनांकित संस्करण। संस्करण objectAtIndex: versionIndex]; ReportDateVersionSegment * seg = [version.versionSegments objectAtIndex: 0]; एनएसएसटींग * कमांड = (@ "लोडरवेट्यूबल (% @,% @,% @,% @,% @,% @,% @,% @)", (@ "% @", [seg.values ​​objectForKey: @ " (@ "% @", {@ "% @", [Seg.values ​​objectForKey: @ "PageDisplay"]), (@ "% @", [seg.values ​​objectForKey: @ "समापन"]), (@ "% @ ", [@ Seg.values ​​objectForKey: @" CR "]), (@"% @ ", [seg.values ​​objectForKey: @" VistisGeneratingRevenue "]), (@"% @ ", [seg.values ​​objectForKey: @" आरपीवी "], (@"% @ ", [सेग.वल्यूज़ ऑब्जेक्टफोरकी: @" एओवी "]), (@"% @ ...

In C++, in the definition of functions, the argument identifiers are optional. In which scenario this feature could be useful? -

int foo (int) {...} कोई भी विचार ? एक मामले में जहां आप एक फ़ंक्शन परिभाषित करते हैं लेकिन पैरामीटर का नाम नहीं देते स्कॉट मेयेर्स "प्रभावी सी ++, तीसरा संस्करण ", आइटम 47: टेम्पलेट & lt; typename IterT, typename डीटीटी & gt; शून्य doAdvance (IterT और iter, जिला डी, std :: random_access_iterator_tag) {iter + = डी; } इन्हें प्रयोग किया जाता है: टेम्पलेट & lt; typename IterT, typename DistT & gt; शून्य अग्रिम (आईटरटी एंड इटर, डीसीटी डी) {डैववेनेंस (आईटर, डी, टाइपनाम स्टडी :: इटरेटर_ट्रेट & lt; IterT & gt; :: इटरेटर_कैचर ()); } अनिवार्य रूप से, doAdvance में तीसरा पैरामीटर एक चर नाम से एक समान नहीं है, यानी यह एक अनाम पैरामीटर है एक अज्ञात पैरामीटर होने की कोई समस्या नहीं है, क्योंकि यह तर्क केवल उस संकल्प के दौरान उपयोग किया जाता है जो उपयोग करने के लिए अतिभारित फ़ंक्शन है। मैं संबंधित विषयों में इन विषयों पर चर्चा करता हूं।

vb.net - How can it get VB not to auto generate code for my component -

I create a component class, it increases a combo box and generates some random numbers. But when I drag and drop my component from a toolbox to a form, it automatically creates I.Randtest1.Items.AddRange (...) in the designer which uses static numbers. Thoughts were different numbers each time and were not the same. Importing System. Windows Forms Folk Class Randestest Inheritance Combo Box Public Sub New () Set Default Text () Farkomobox () End Sub Private All SetDefaultText () Text = Rnd (10) End Sub Private Sub-fillComboBox () for count = 0 to 5 items. Add (Rnd (10)) Next End Sub End Class Thanks Add to the top of this creator: If the DesignMode exit then sub In this way, this design does not generate anything at the time Will only run at run time Just out of curiosity, is it because the user is a random number, or just programmatic?

xml - Amazon Product API: ItemLookup with Multiple ASINs -

I'm having a problem getting a special error [note: I masked my AccessKey and signature parameters The URL below provides valid xml for a product http://ecs.amazonaws.com/onca/ Xml? AWSAccessKeyId = [myAccessKey] & amp; IdType = ASIN & amp; Itemid = B002UD52WQ & amp; Operation = ItemLookup & amp; ResponseGroup = Medium & amp; Service = AWSECommerceService & amp; Timestamp = 2010-07-27T23: 17: 57.000Z & amp; Signature = [mySignature] However, when I use the URL given below to see more than one ASIN, a different ASIN ID than a comma, I get an error http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId= [myAccessKey] & amp; IdType = ASIN & amp; Itemid = B002UD52WQ, B002C0CZEU & amp; Operation = ItemLookup & amp; ResponseGroup = Medium & amp; Service = AWSECommerceService & amp; Timestamp = 2010-07-27T23: 17: 57.000Z & amp; Signature = [mySignature] Error message: The request signature we have received does not m...

nlp - Splitting a Domain name into constituent words (if possible)? -

I want to break a domain name into component terms and numbers like iamadomain11.com = [ 'I', 'am', 'A', 'domain', '11'] How do I do this? I know that many sets may be possible, however, I am still fine, getting a set of just 1 possibilities. This is actually resolved in the O'Reilly Media Book, in Chapter 14, "Natural Language Corpus data ", it creates a splitter, as you would like to do in a dragon using a huge freely available token frequency data set.

How to embed android contact to MY application -

I want to use contacts in my app or do not want to start native app, processing filters are very difficult. Is it possible to embed a contact list in my application? No, you must type your own ListView with contact data. Load some contact data in the Spinner widget.

c# - Reading XML template, make a change and display on page -

Hello, I have a preformatted XML template that lists all country codes. I have to load it in C # SipText and Loop and the MCNN attribute should match the country code and add value attribute to the node. Then I need to render the editable XML on the page so that it can be used as a data source for the flash chart. Example is xml: & lt; Areas & gt; & Lt; Area title = "AFGHANISTAN" mc_name = "AF" & gt; & Lt; / Area & gt; & Lt; Field title = "old islands" mc_name = "AX" & gt; & Lt; / Area & gt; & Lt; Regional Title = "Albania" mc_name = "AL" & gt; & Lt; / Region & gt; & Lt; Field title = "algeria" mc_name = "dz" & gt; & Lt; / Region & gt; & Lt; Regional Title = "ANDORRA" mc_name = "AD" & gt; & Lt; / Region & gt; & Lt; Field title = "angol" mc_name = "Ao" & gt; & L...

c++ - Linking Problems -

I have tried it, Linux and Windows ... I have used C and C ++ ... I try With WxWidgets, gtkmm, glfw and GTK + I have tried various IDEs and so on. (I managed to get GLFW working fine at one point) My problem is that I am not adding libraries in some way properly. Although I do not know which library is not linked because errors are confidential ... I just know that I am forgetting something ... I can not give an error because as I have done with all those things I try to link but this is it I always include "included", I am doing something wrong: In an IDE My steps are to add a library, Please correct me if I am doing something wrong: The directory for my IDE's specific library (ies) Then in my IDE, I have a specific library (Lib) (But not every single library) Create a dummy code to test Compile and 'Errors can not be found' and so on ... How to fix? will be really useful to see one of those secret error messages along with platform d...

properties - commiting only the property change of a folder not the modified files inside it using svn commit -

Hi I only want to own the property of that folder which is not a local file modified. When I'm using svn committed then it is also reducing the modified files. Please tell me how to get it this Thanks If you select svn propset (list) Folder / help by adding): Svn propset svn: ignore help when svn commit is running - Deep flag can be used: svn ci --depth = immediates This will skip the amendments made to the file. You can also play with other values ​​for - Depth . According to UPDATE - Depth = immediately the scope of the campaign target and any immediate child . Therefore, it is better to use svn ci --depth = empty modified_target_folder which limits the scope of operation to the specified goal only.

language agnostic - Does a deep copy operation recursively copies subvariables which it doesn't own? -

Looking at the object that has no variable which it does not own itself; That is, the variable is created by instead of what would be a deep copy operation variable or just link to it? I like that you are making the role of structure and aggregation here in the middle. Deep copy I will say to go against the second answer: No, no item should not be deep-copying of any other thing which is not its own. A deep copy of an object (at least initially) is similar to the original. If a deep copy is made of a reference that was not owned by the origin, then it reveals the question that what is the owner of a new copy, if the owner of the clone, then it will not be the same as the original object. It will be an object like the original, except that it is the owner of the context of one of its consolidated members. This will definitely cause chaos. If the clone is not owned, who does it? This problem of ownership in non-garbled collective languages ​​is particularly important, but ...

android - How to show an Activity as pop-up on other Activity? -

I have an activity, and there is a button B in the view. If someone presses B. Then I want a pop-up that can make some parts of the screen invisible in that area, but the rest of the A is visible but not active. How can I get it? If you want to use the activity instead of a dialog, then you can choose the theme of this activity to be

java - Why use inheritance at all? -

I know that the question has been made, but under this assumption it always seems that heritage is at least occasionally My question is this: Since you can complete anything with the object structure that you can do with classical heritage and its Since then, classical heritage is often misbehaved [1] and because the object structure gives you a representative obs Gives you the flexibility to change the crop runtime, Why use never classical heritage? I understand why you would recommend inheritance in some languages ​​like Java and C ++, which do not provide convenient syntax for the delegation. In these languages, whenever you are clearly not wrong to do so, you can save a lot of typing using heritage. But other languages ​​like Objective-C and Ruby have presented both classical heritage and very sensational syntax for the delegation. Go programming language is the only anchor that is determined by my knowledge that classical heritage is more difficult than it and ...

Changing entity name/poco class name from table name while creating model from the database -

I want to create an entity model from the existing database but in all the table names there is "_" / underscore in the database while Poko To create a class, I want to remove underscores in the name of institutions / Poko classes. Thank you, Amit You have two options, There is a bit of a learning curve, but using code T-4 templates in it generates code generation. Actually you will only be able to exclude _ in the conceptual model. Easy, and a little more painful just to import your models and then use the Model Explorer and rename each unit. You only have to do this once, it will ideologically save the mapping from the physical. A walk can be found through (search for "Change an entity name")

javascript - XHR Upload Progress is 100% from the start -

I am trying to upload some files to a php script, to the new XMLHTTPRequestUpload feature, it works mostly well The upload starts, I get full feedback etc. - But progress does not work. Given that event.loaded value- In Firefox I am getting a random value between 0 and file size; In Chrome (where I'm mostly working) I get the size of the total file, although the '4' made is not reachable and the developer tool window still shows the file to load? Any thoughts? This is my code: var xhr = New XMLHttpRequest () xhr.upload.addEventListener ('progress', function (event) {if (event.lengthComputable) {$ ('AjaxfeedbackDiv'). InnerHTML = event.loaded + '/' + event.total;}}, false); Xhr.onreadystatechange = function (event) {if (event.target.readyState == 4) {updateFileList (); }}; Xhr.open ("Post", "_code / upload.php"); Xhr.setRequestHeader ("cache-control", "no-cache"); Xhr.setRequestHeader ("X-reque...

php - Pagination script - getting data from two tables -

I have an endorsement script which can be seen here: This is the source code: (PmcPagination.php) (page with code in demo.php) and index.php to use just PHP () The function uses Show demo.php What I'm trying to do, has been removed from two tables for paging. This is my current database structure: Programs varchar (255) channel varchar (255) episode varchar (255) series varchar (255) setreminder varchar ( 255) However, the episodes are stored separately from the table and the episode 167 and the episode table (only in the episode table as episodes, series, episode, and description fields). Want to remove a query? An error I show my pageigan script here: Show a TV show on the channel 1 August 3 - 12:30 "" Reminder TV Show Show Show Channel 1G Set the "Episode 1" reminder on August 3 - 8:30 And it still remains after the incident. How it should be Work: Show a TV Show on Channel 1 August 3 - 12:30 am Channel 1 TV Show Show Channel ...

regarding search hard key behaviour with progress bar (android) -

When a progress dialog is displayed and we press the search hard key, it closes and the phone's search Even if it takes you to the bar, Is dialog = new progress_dialog (this) {@Override Public Boolean onSearchRequested () {return false; }};

iphone - UIScrollView/UITableView crashes when resizing frame -

"itemprop =" text "> My app is a paged scrollview with a tableView in each page. At the bottom of the screen I placed an ad banner, which should be hidden because the ads are unavailable and then load when they load. This banner is placed below the scroll view and the user is not affected by scrolling left or right above the top or bottom of the table. So when I resize the scrollView with something like this: NSInteger offset = -50; If (self.bannerIsVisible) offset = 50; CGRect frame = scrollView.frame; Frame.ize.height + = offset; ScrollView.contentSize = CGSizeMake (frame.ize.width * pages, frame.size.height); ScrollView.frame = frame; This last line is causing me problems Sometimes everything works just fine and it completely changes the scrollview and all its contents, on the other hand, this console Accidents with this: 2010-07-27 10: 25: 31.779 MyApp [8026: 207] - [__ NSArrayM tableView: cellForRowAtIndexPath:]: Non-recognized selector sent for e...

javascript - Friendly url rewriting with php & .htaccess. Difficulties with relative links to css images & js -

मेरे पास वर्तमान में एक यूआरएल है: play.php? Place = idthe & event = idevent मैंने मैत्रीपूर्ण यूआरएल को इस तरह से सक्षम किया है: रीवरइटइन्गइन ऑन रीव्रेट नियम ^ ([a-zA-Z0-9 _-] +) $ play.php? Place = $ 1 फिर से लिखना नियम ([a -ZA-Z0-9 _-] +) / $ /play.php?place=$1 रीवरइट नियम ^ ([a-zA-Z0-9 _-] +) / ([a-zA-Z0-9 _-] +) $ /play.php?place=$1&event=$2 पुनःलेखन नियम ^ ([a-zA-Z0-9 _-] +) / ([a-zA-Z0-9 _-] +) / $ /play.php?place = $ 1 और amp; ईवेंट = $ 2 सिर्फ एक पैरामीटर के लिए (वहां जगह आईडी है), सभी ठीक हैं। लेकिन जब ये दो पैरामॉम्स (स्थान और घटना) आती है, तो मेरे सारे रिश्तेदार लिंक (सीएसएस, जेएस और आईएमजीएस) काम कर रहे नहीं हैं, मेरे पृष्ठ लगता है कि यह वास्तव में जगह / फ़ोल्डर में है, और गैर इस समस्या के लिए विचार? थानक्स बहुत गुइल्लाम /images/myimage.png Pre> आप इस एक समस्या को किसी अन्य तरीके से ठीक करने में सक्षम हो सकते हैं, लेकिन यह केवल अधिक परेशान हो जाएगा क्योंकि आपका यूआरएल पुनरीक्षण अधिक उन्नत हो जाता है।

gdb - How do I debug C++0x programs in MacPorts gcc 4.5? -

I have a simple C ++ program that I'm trying to debug, but the object file for GDB libraries Can not search (or no debug info available), and it does not seem to be able to find debug symbols for my executable. I'm on OSX 10.5.8 with the MacPorts, and I have to code my code blockquote> G ++ - mp-4.5 -Wall -pedantic -std = c ++ 0x G -ggdb i / opt / local / included L / opt / local / lib -lgsl static- libstdc ++ MCMC-Simplex CPP-O MCMC (only one file, and live ++ - executable for mp-4.5 macports is GCC / G ++ 4.5) When I try to run the object file can not be found "/ opt / local / var / macports / build / _opt_local_var_macports_sources_rsync .macports: gdb resulting execution I get a warning message (startup) form .org_release_ports_lang_gcc45 / work / build / i386- apple of darwin9 / libgcc / trunctfdf2_s.o "- for any debug info Available "../../../gcc-4.5.0/libgcc/../GCC/Config / Soft-FP / Tactfade F. 2.c". I point out that there is a ...

c++ - How do I specify include directories using NMake? -

I am trying to use nmake to create libfcg (), however I am getting the following error: .. \ include \ fcgios.h (23): fatal error C1083: The file can not be included: 'windows.h': Any such file or directory I have a widow SDK installed and the Windows.h file exists in this directory: C: \ Program Files \ Microsoft SDK \ Windows \ v7.0A \ Include How do I make a directive I might as specified? pass-I "Include dir" as a command-line option for CL.

sql - how to get input into an Jet OLE DB Query -

Background: I am using Excel 2003 I have 2 Excel The files are (source, list), one essentially my source data. Second is where I am using excel "import external data" to get data in the second sheet. I am then using modified query so that I can use SQL for the query of my data and limit the data I am displaying. My SQL query: SELECT * ['master list $'] where [name] is like "brent%"; My question is, I have to have cell A1 an input in my query. So in A1, I have to "brent" to change the first WHERE condition. I hope to find something that I change to a cell and Anyone have an idea? Thank you. My connection string is: Provider = Microsoft.Jet.OLEDB.4.0; User ID = Admin; Data source = C: \ My data \ Master list \ Master list. Xls; Mode = share prohibition; Extended property = "hdr = yes;"; Jet Olendi: System database = ""; Jet Olendi: Registry Path = ""; Jet Olendi: Engine Type = 35; Jet Olend...

syntax highlighting - Delphi: Free TSynEdit replacement -

What is the best free replacement for TSynEdit? As I can see, it is very slow to find some replacement for it or, maybe another version of the guardian. Delphi 2010 compatibility is required. Cinedit works fine under D2010 is an important bug that does not work under certain key conditions. . For this, a patch can be found about halfway through the page. Search for // GB: Bug Fixed Also, it should work Do you have some specific problems with it?

ihttphandler - ASP.Net: Create handler within project -

Sorry if this is a stupid question, I make inside an HTTP handler inside my project I want to do this, I created a new class and tried to implement IHttpHandler. Every time I do this, I get an 'Expectation of hope expectation' error. I know that you can usually create a new class library and create a class to apply a handler. But why is it not possible to do this in the existing web project? Create a new object named ashx or generic handler from

c# - Should I use a ListView, DetailsView, or GridView? -

I need to display a table with different notifications (name, date, serial number, notes). Also, there is a field, I should be one of the three specified values ​​(rise, lower, release). Will the opinion be the best / easy for me to implement, which will provide drop down options to add / edit / delete entries as well as lift, down, release options? Thanks in advance! All this can do. I use a reviewview and gridview if I just want to display the data that shows the details page 1 per page in columns columns and rows, and all of you want to do this. I use it to edit and insert individually. GridView I use to show and delete. When you want to show fancy data, it uses the review view and the form weave, which does not fit itself into beautified rows and columns, but more complex scenes. They also edit / merge / delete you. When you change a DataBoundField in a TemplateBield to show a DropDownList in DetailsView and GridView.

json - $.getJson() Problem and returning an undefined value -

मेरे पास एक PHP स्क्रिप्ट है जो JSON ऑब्जेक्ट का उत्पादन करता है। मेरी jquery में मैं इस कोड का उपयोग कर रहा हूं Php स्क्रिप्ट कॉल करने के लिए। $ .getJSON ("/ st / std.php", फ़ंक्शन (डेटा) {चेतावनी (डेटा); $ ("myspan")। पाठ (डेटा) ;}); मैं पीएसपी फ़ाइल में जेएसओएन एन्कोडेड से डेटा कैसे प्राप्त करूं? IAM के रूप में IAM कुछ कोड डाल रहा है जो एक php फ़ाइल में एजेक्स लुकअप करेगा I पीएचपी में मान लीजिए कि यदि हम पाठ बॉक्स में "एएए" इनपुट करते हैं तो उसे "एएए-एएनएए" प्राप्त करना चाहिए। इसे JSOn एन्कोडेड ऑब्जेक्ट खोजना चाहिए और लेबल प्राप्त करना चाहिए। सुनिश्चित करें कि प्रतिक्रिया हैडर में शामिल हैं: सामग्री प्रकार: आवेदन / जेसन और नहीं सामग्री-प्रकार: आवेदन / जेसन; आईआर 9 में मुझे अनुभव था जहां डेटा $ .getJSON से अपरिभाषित था, भले ही नेटवर्क फलक आप अनुरोध किया जा रहा है और वांछित JSON युक्त प्रतिक्रिया शरीर देख सकता है।

indexing - Why most SQL databases allow defining the same index twice? -

Why do most SQL databases allow to define a single index (or constraint) twice? For example in MySQL I can: Make Table Tester (id VARCHAR (10) Faucet, Primary Key (ID)); Optional table testkey plus key (id); Optional table testkey plus key (id); Create Table Tester; Create tab 'Tad kaki' (`id` varchar (10) tap, primary key (` id`), key `id` (` id`), key 'id_2` (`id`)) I do not see any use to get the same index or hurdle twice. And I would like the SQL database not allow me to do this. I do not even see the names or names of the barriers, because I can refer to them for reference to remove them. Many reasons come to mind in the case of a database product that supports several index types, It is possible that you want a combination of indexed fields of the same field or multiple times, depending on the different ones used with each index. For example, some (probably the most) database products have a tree-structured index for both straightforward lookups (for...

algorithm - php, long and deep matrix -

I have a deep and long array (matrix). I only know the product ID, how did the product get the way? Array ([apple] = & gt; array ([new] = array ([0] = & gt; array ([ID] = & Gt; 1) [1] = & gt; array ([ID] => 2)) [old] => array ([0] => Array ([id] = & gt; 3) [1] => Array ([ID] => 4))) I have an ID: 3, and I want to get it: apple You can use this child { $ ($ ID, $ array, and $ keys) {foreach ($ key = $ value = & gt; $ value) {if (is_array ($ value)) {$ result = getById ($ id, $ value, $ key ); If ($ result == true) {$ key = =] = $ key; Back true; }} And if ($ key == 'id' & $ value == $ id) {$ keys [] = $ key; // Optional, the result array returns the ID to correct the returns; } } return false; } // USAGE: $ result_array = array (); GetById (3, $ products, $ result_array); // RESULT (= $ result_array) Array ([0] => ID [1] => [[2] => Old [3] => Apple) The function will return the error to true and incor...

asp.net - NHibernate - how to handle user sessions -

I think what I'm doing here is a quick example of how to do it. It's okay to work properly with me, I can create new records with no problems, and do not read any problems in existing records. The problem I am facing is with the asp.net user session and how do I handle this fact in the middle of the load of that page, and I want to write it sometimes in the database. In the user's logs NHibernate brings user records The user is stuffed in the record asp.net session. The NHibernate session (I think) ends The app displays a link to the "Add Address" page The user visits the "Add Address" page The user enters the address address The user clicks on "Deposit" Add the address to the user object User object to database When I try to write back to user object (complete with new address), I get an error That the user object is already connected to an existing session. I am using the code below to exclude the user from asp.net ...

java - Don't understand the constructor of my View -

My code is working and it is, but I do not understand one thing. I have started game programming and now works on my entire Surfaces and so on. I have to draw a background, so all this works. When I made it, I followed a tutorial, so know that I am commenting on my language. :) When I started commenting some things now; I can not get rid of it, someone can tell me what is my constructor's reference parameter and attribute parameter for my idea? Is it necessary and why do I need to set local context valves for my game reference? OnCreate (savedInstanceState); SetContentView (new GameView (this, blank)); } GameView public game view (reference local content, AttributeSet etat) {super (local contact, etat); Context = localContext; InitView (); } InitView (); Just initialize each object and variable I made; If this material is needed to explain the constructor-cheeses; I'll post it Thank you! There is a bunch of state in context to work with that view...

javascript - Yahoo Web Analytics Upgrade -

Yahoo Yahoo is forcing an upgrade to its current version (version 4 to version 5) of the web analytics tracking code. The end date for the upgrade is the end of this month. Here's the message in the interface: In 2009, we have transferred all our client accounts to a new data center to improve our service's overall security and reliability by Yahoo Demanded safety and high standards of service! At that time, we introduced a new version of Yahoo! Web Analytics Tracking Code (Version 5). Please note that version 4 of the YWA tracking code will end on July 30, 2010. Please visit our Help Center, if you have any questions about using the version 5 of the tracking code. Our installation guide for version 5 can be downloaded from here I sent version 4 vs. version 5 image requests and parameters to my server and it is still the same server and parameter So I do not really see why it is required to implement it Besides, I talked to those who said that their Yahoo account ...

c# - Translation Service that can be used from ASP.NET application -

संभव डुप्लिकेट: मैं एक वेब सेवा या एपीआई की तलाश कर रहा हूं जिसका इस्तेमाल मैं एक भाषा से दूसरी भाषा में अनुवाद करने के लिए कर सकता हूं। टेक्स्ट का आकार 10,000 वर्णों तक सीमित होगा। मैं समझता हूं कि Google और Babelfish वेबसाइटों ऐसा करने के लिए है। लेकिन मुझे इसे अपने वेब अनुप्रयोग के एक भाग के रूप में एकीकृत करने की आवश्यकता है। कोई भी विचार कैसे आगे बढ़ना है? पुनश्च: मैं किसी भी भुगतान की सेवा की तलाश नहीं कर रहा हूं।

javascript - strategy to split up php output into smaller outputs (ajax, php) (nested ajax calls, ajax within ajax?) -

I do not know the correct terminology for the solution, please try to break PP output in smaller parts and read them the feedback of AJAX Suggest a strategy to remove the step by step. This project is an AJAX webpage that takes the text string (last name) and sends it to a PHP program, PHP code takes the last name and randomly receives people with 3 different names. , And puts it in an array Once this is done, the php code will contact the external server to obtain information related to each name, and the information will output on a single page of the webpage. Process to obtain data from external servers is very slow. This code is basically done, but the whole process takes a very long time to produce output on the screen. My phonetic php code is like this: Code> & lt;? Get 3 names; // Get instant alias name (get phone number)? & Gt; Alternatively, I could get a name and phone #, and it was quick to output it before going to the next name. What are the ...

Does anyone expect the JVM to ever have reified types? -

I think the challenge presented by the refined type for JVM is fine, maybe I can not understand this much "It has been repeatedly heard that there is no way to support such a concept without breaking backward compatibility. But it just thinks more about me, whether there are plans for the revised type in the future or will JVM never ever have them, as ever? All the reasons given for the type-mirror are ridiculous. In the future, run compiled code against JDK For the old JVM does not expect any. But you are right, which is a general explanation. If you want good generics, then I suggest a different language which is actually developing.

How do email analytics work? -

Although I have not really used it, be able to track an email analytics web app, called Litmus: Whether it has been removed or not. Whether it is printed. Which email client was used to read it? I am curious about where to get this information from most email clients I have seen, without explicitly loading them without loading external images, javascript Leave alone. Even if you support a lot of images, the item is not far from 1-3. Here's my best guess as it is written in RockTesticsString Post, it is dependent on images, But not javascript How long does it take to read an email Keep multiple images in the email Take a few minutes to load, if the email is read for a long time, then more load is done. Whether it has been forwarded or not. What image load is more than one IP / user agent? Whether it has been removed or not. Screenshots show it in glance. is printed or not. Add a background image bug to a print stylesheet. Which email clien...

c# - Running Topshelf service using ConfigureServiceInIsolation - Generic Host -

I am developing a very simple generic host solution that allows us to host assemblies in the form of windows services (ELA NSCsBIS) Will allow. I am coming in the following exceptions (similar to the comments given about the droo). I have to work this need I can hosting services in different AppDomains "Type 'MyProject.WindowsServices.GenericHost.Program + & LT;> c__DisplayClass5'. Assembly 'MyProject.WindowsServices in .GenericHost, version = 1.0. 0.0, Culture = neutral, PublicKeyToken = null 'is not marked as serializable. " I am using available from the download link on Topshelf 1.0 RC binary topshelf Home Am (topshelf-project.com). I have tried the latest build (29/07/2010), and Google makes avialable to download from code and gitub! I can not get any of these to work for me! This is working in the NServiceBus library with an earlier version of TopShelf (DLL version 0.8.0.96). Some minor changes to what I used instead of down (HowToBuildSe...

ASP.NET MVC 2.0 Go previous page submit button. Possible solutions. Opinions -

I have a wizard application and I need a back button so that users are back to the last time after clicking this button If they want to change something in the previous steps. 1) I can use JavaSript onClick = "history.go (-1). 2) I can submit it to the previous button to redirect Use the button: 2.1) I may have a hidden field on the page that is calling the current page (current step) and according to this value I can redirect to the previous action. 2.2) I can use values ​​from ViewContext.RouteData.Values ​​["action"], to decide which form The last action was taken and it was redirected. Is there any opinion on this? What is more efficient in doing this in MVC 2.0. Is there anything related to MVCC contracts?

uiwebview - PDF parsing for an eBook app -

For the purpose of creating an eBook reader app, UIWebView is looking for some help on the pros and cons of using CGPDF . The content will be in the form of PDF, in this way I am trying to figure out whether the two APIs - UIWebView or CGPDF will work best. I'm targeting features such as zoom, content table, notes, and annotation, and search. If you are searching for search, annotation, table of contents etc. ... you get CGPDF * Have to use. UIWebView does not include implementation of them, however, CGPDF may be limited to some extent and is generally quite frustrating :) On the other hand, using UIWebView is clearly very simple to use is.

ORM vs traditional database query, which are their fields? -

ORM seems to be a fast growing model, with Richard Keesig's ultra-fast ASP.NET From: (): "I love them because they allow me to develop small, proof of concept sites very quickly. The related complexity is that I would otherwise focus on things, business logic and presentation Need to give, but the same I also do not care for them because, unfortunately, their performance and scalability are usually very bad, even though they are 'integrated with a comprehensive caching system (the reason is clear when you think that when properly configured , Then SQL Server itself is actually a big data cache. " My questions are: Richard What is your comment about the idea? Do you agree with it If not, please tell. For the ORM and the traditional database query - in other words, where you should use ORM and where you can query the traditional database You should use :), what kind of / size ... applications should be one of you I can not agree with the gener...

c# - Getting current activity when a workflow instance loads from persistent store in WF 4.0 -

I'm still trying to wrap my head about some workflow problems, I'm using Workflow Foundation 4.0 And I need to get the current activity of that frequency when I try to load it firmly, I tried to use tracking, but when this frequency is full, then it is not called. I would not want to keep this information from continuing by possibly all to everyone. Do you have any idea about doing this? , angi As far as I know the use of tracking The only way to monitor activity is to stop and stop. By using the workflow extension, the recipients can save you data as part of the workflow firmly. Keep in mind that the workflow persists when there may be more than one active asynchronous activity. To do this, see it.

winforms - Why might I be unable to create an instance of System.Windows.Forms.Form in C#? -

मेरे पास एक आंतरायिक समस्या है, जहां मैं System.Windows.Forms.Form वर्ग का एक उदाहरण मेरे C # पुस्तकालय में नहीं बना सकता। मैं अपने कार्यक्रम में अपवादों को लॉग करता हूं, लेकिन दुर्भाग्य से इस समस्या के लिए कुछ भी नहीं दर्ज किया गया था यह प्रासंगिक नहीं हो सकता है, लेकिन मेरी लाइब्रेरी, जिसे COM के माध्यम से बुलाया जाता है (यानी कोई मुख्य विधि नहीं है)। इसलिए मैंने एक परीक्षण अपवाद फेंक दिया, और इसे पकड़ा गया और सफलतापूर्वक लॉग किया गया - इसलिए मैं सोच रहा हूं हो सकता है कि संदेश लूप में कुछ गड़बड़ हो रहा है? अपडेट 1 निम्न कोड का उपयोग करके थ्रेड में बनाया गया है, जिसके पास अपार्टमेंटस्टेट .STA सेट। someForm = नया फ़ॉर्म (); SomeForm.Visible = false; SomeForm.Text = "हैलो वर्ल्ड!"; यह सिर्फ एक अनुमान है, क्योंकि आपने कोई कोड और थोड़ा संदर्भ प्रदान नहीं किया है, लेकिन क्या आप अपनी प्रविष्टि बिंदु पद्धति ( मुख्य ) पर STAThread विशेषता को याद नहीं कर सकते हैं? यह WinForms ऐप के लिए आवश्यक है जो कॉम का उपयोग करते हैं।

What C++ string classes/systems exist that have good unicode support and a decent interface? -

The use of string in C ++ development is always a bit more complicated than languages ​​like Java or Scripting languages. I I know about the following major string systems and find out if they are different and what specific deficiencies they have. MSc CTT: std :: basic_string: : Qt Caststrung: I will accept that there can be no definitive answer, but I think the SOS voting system should show the preferences Is particularly suited for people (and thus the validity of people's debate A) is actually using a fixed string system. Added to the answer: UFT8-CPP: Using strings in C ++ development is always used in Java or scripting languages It is a bit more complex than languages. I think that some complexity is with a display focus in C ++ and some are historical. I can say that this all is historically in particular, two pieces of history: When all () were using 7-bit or 8-bit character encoding. Because of this, the concept of char and "byte" ar...

visual c++ - How to change string of ^ type to char* type in vc++ CLR window application? -

I am working on a vc ++ CLR window application. In this application when I browse the local file system for file selection, the input file path is coming in string ^ Type ... now I have to change the char * type to type this ^ I help me. Thank you You probably want Marshall :: StringToHGlobalAnsi IntPtr P = Marshall :: Stringshotoglobellense (Managed String); Four * C = (four *) p.ToPointer (); ... Marshall :: FreeHejlobal (P); See more.

javascript - Need help on simple calculator -

& lt; html & gt; & Lt; शीर्ष & gt; & Lt; स्क्रिप्ट भाषा = "जावास्क्रिप्ट" & gt; फ़ंक्शन एफैड () {var पहले, सेकंड, रिज़; पहली = parsefloat (document.forms [0] .txt1st.value); सेकंड = parsefloat (document.forms [0] .txt2nd.value); रेस = पहले + सेकंड; document.forms [0] .txtres.value = रेस; } & Lt; / script & gt; & Lt; / head & gt; & LT; बॉडी & gt; & LT; प्रपत्र & gt; 1 नंबर दर्ज करें & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & Lt; इनपुट नाम = "txt1st" id = "txt1st" प्रकार = "टेक्स्ट" & gt; & Lt; / br & gt; दूसरा नंबर & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & lt; इनपुट नाम = "txt2nd" id = "txt2nd" प्रकार = "पाठ" & gt; & Lt; / br & gt; परिणाम & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; ...

C/C++ optimization: negate doubles fast -

I have to reject a large number of doubles quickly if I generate bit_generator 0 The sign should be changed. If generates bit_generator 1, nothing happens, the loop is run multiple times and bit_generator is very fast, faster than the case 1 on my platform case 2 Is from It seems that my CPU does not like branching. Is there a fast and portable way to do this? What do you think about 3? generates 0 and 1 int bit_generator; // large vector (C ++) vector & lt; Double & gt; V; 1 for size 1 (size_t i = 0; i Edit: Added 4th and C-tag, because the vector can be a plain array. Since I can control how doubles are made, I redesigned the code as shown in 4. This avoids the extra multiplication and equality in the branches. I think it's pretty fast on all platforms. Unless you want to convert the vector into a loop, lift V.size () for expression, i.e. const unsigned SZ = v.size (); For (size_t i = 0; i If the compiler is in bit_generator (), then this compil...

.net - Storing XML Audit data to File System or to MS Access table? -

My program requires auditing saved XML data for users. Whenever the user clicks on 'Save'; I'll need to include my current data (serialized for XML) and save it somewhere between what is a better option: Creating a text file and leaving all XML there . Using a table in MS Access I am using Net 2.0 / MS Access 2003 Ability to query With XML files on file system The ability to backup data of transactions With XML files on file system, you need to come up with 'unique file' strategies The naming can remove and restrictions of many files that can be stored per folder etc. In some RDBMS, XML is a first class data type (unfortunately, not for MS Access), so: It is possible to ask your XML using XPath Is, like using XQuery. In many RDBMS (for example SQL Server), it is also possible to create indexes in XM for better performance of the above questions. However, access, you will need to store in A with A. TL; DR : If you are already us...

jquery - e.preventdefault(); not working -

e.preventDefault (); is having a real problem. This is my code $ ('# listSnapshot a'). Live ('click', function (e) {var url = $ (this) .attr ('href') + '# WebPartPQ2 .ms-listviewtable'; $ ('#SlistsSnapshot') .load (url); e .prerent Default ();}); Can anyone tell me what I'm doing wrong, I can see the work of the load function, but then redirect the clicked link on the page that I need to stop. is. I e.preventDefault (); Above the function, try not to take any advantage. I had a similar problem, with e.preventDefault () something Will work on cases, but no errors were not shown on others, and gesture alert was not displayed by using try-catch . Adding e.stopImmediatePropagation () , if it helps anyone (big thanks for wcpro)

wcf - How to get rid of XmlIgnoreAttribute() when creating proxy dynamically from wsdl? -

I am using WebClient to read wsdl from the URI. WebClient Customer = New WebClient (); Stream wsdlStream = client.OpenRead (wsdlURI); Description of Service wsdl = Service Details. Read (wsdlStream); Then I use the namespace and CompileUnit and GenerateCodeFromCompileUnit method of ServiceDescriptionImporter to generate the .cs class file. Then I call it assembly and assembly methods from reflection and use. The problem is that the CC file I created has additional XML properties and like extra parameters : public zero calc (an int, [System.Xml. Serialization.XmlIgnoreAttribute ()] bool aSpecified . When I create the assembly from this source file, I get methods with more parameters, compared to the basic method they should be Looks like: public integer Calc (int one, int b) and generated sources Looks like the method in the code: public int calc (int a, bool specify a, int b, bool specify bS, out of calc result, calcResultSpecified bool outside) Can I dyna...

vb.net - Remove "@" from String -

Obtain an email, before you want to remove the "@" symbol, make sure it does not have much One of the second checks is currently how I am doing it. String as a slow tempEmail = contact email retard calculation = 0 if tempEmail.IndexOf ("@") & lt; & Gt; -1 Then check for a countdown = 1 tempEmail Remove (tempEmail.IndexOf ("@"), 1) End if the tempEmail.IndexOf ("@") & lt; & Gt; -1 'then check for two count + = 1 end if calculation = 1 then Juststring (contact email, 66, "LEFT_JUSTIFY"), other contact emails = BLANK_EMAIL end if but debug After doing this, I've found that it does not really remove the "@" sign from the Strum, why? The string is unchanged All string methods do not change the string, but instead they create a new one And do it back. Try it instead: tempEmail = tempEmail.Remove (tempEmail.IndexOf ("@"), 1)

c# - .NET Outlook Add-in and WCF/Inter-process communication -

I need a tip / advice / recommendation. I developed an Outlook add-in in C # I would like this add-in to communicate with any other application (let's call it client.axa). The clients.Acca and add-ins will always be running on the same computer. Client.exe is an example example. What would be the easiest / most convenient way to allow the add-in to communicate with the customer? Will she be WCF? Any good resource that you can recommend? Thanks in advance! Yes, WCF is probably the way to go. That old NET remoting is deprecated in favor of WCF, obviously the core docks are running. The IPC can help in WCF .net 4.0. (IPC = Inter-Process Communication)

How to get AVAudioPlayer output to Speaker and verify if i am right on iphone simulator? -

I get some questions on playback music through the speaker. I got an example in the following link but the question is how to ensure Do I successfully implement the music through "speaker"? I've written the code as a link, but I do not mind before and after the "speaker" activation on the iPhone Simulator (MacBook)! !! Update: The way I activate the speaker below. UInt32 sessionCategory = kAudioSessionCategory_PlayAndRecord; // 1 Audio SessionProperty (kAudioSessionProperty_AudioCategory, // 2 sizeof (sessionCategory), // 3 and Session Category / 4); UIant32 audio routerride = audio session of thyroid audio spark; // 1 AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute, // 2 sizeof (audioRouteOverride), // 3 and audioRouteOverride // 4); I disable the speaker below UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_None; // 1 AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute, // 2 sizeof (audioRouteOverrid...

perl - How do I collect the lines between two key words? -

स्टार्ट लम्बाई: 1432 आरआईएडेंटिफायर: 4 विदेंटिफायर: 4 प्रारूप: 5 टीएस संख्या: 9 डीएचआईएडर संस्करण = 1 लंबाई = 1432 कमांड कोड = आरटीटी (0xd0) कमांड कोड = लेखा-अनुरोध (271) आवेदन आईडी = आरएफ-आवेदन (3) हॉप होप आईडी = 51 एंड टू एंड एंड एंड एंड = 8847360 स्टार्ट की लंबाई: 12 रिडेंटिफायर : 2 विदेंटिफायर: 4 प्रारूप: 5 टीएस नंबर: 6 डीएचआईईडर संस्करण = 1 लंबाई = 1432 कमांड फ्लैक्स = आरपीटी (0xd0) कमांड कोड = लेखा-अनुरोध (271) आवेदन आईडी = आरएफ-एप्लिकेशन (3) हॉप होप आईडी = 51 एंड टू एंड एंड आईडी = 8847360 स्टार्ट मुझे START के बीच मिलती हुई सभी पंक्तियों को इकट्ठा करने की आवश्यकता है और इसे 2 फाइल्स में लिखें। मैंने पर्ल में फ्लिप फ़्लॉप की तरह कोशिश की: खुले (फ़ाइल, $ एआरजीवी [0]); जबकि (& lt; FILE & gt;) {if (/ START / .. / START /) {प्रिंट "$। $ _ \ N"; }} लेकिन मुझे केवल उन पंक्तियां मिल रही हैं जिनके पास START है क्या आप कृपया मेरी मदद कर सकते हैं? ... #! / Usr / bin / perl सख्त का उपयोग करें; चेतावनियों का उपयोग करें; मेरा $ आउटपुट; जबकि (&...