Thursday, 15 May 2014

implode basket products - PHP -


I'm trying to list all the products related to all my sessions ['cart'] and implant them, not me Find out how in the Implode list, please help!

  $ list = ''; Forex Currency ($ _ session ['carriage'] AS $ key => $ qyt) {$ item [] = array ('size_id' => $ qyt ['size']); } $ Res = $ db- & gt; Execute ("SELECT s.name, p.item_num, p.name AS product_name, p.discount, s.price AS product_price, s.units product_size products from INNER P on P Product_id = s.product_id where s.id IN ("Implode (", ", / * list SIZES_ID HERE * /).") "Order by SDID DESC"); While ($ line = $ res-> GetNext ()) {   

given For example, two simple changes will be sufficient:

  foreach ($ _ session ['cart'] AS $ key => $ qyt) {$ items [] = $ qyt ['size' ]; } $ Res = $ db- & gt; Execute ("SELECT s.name, p.item_num, p.name AS product_name, p.discount, s.price AS product_price, s.units Product_Signs INNER products from P on P product_id = s.product_id where SI D. In (". Feroda (", ", $ item.") "Order by SID DESC"); While ($ line = $ res-> GetNext ()) { 

delphi - Is there a Static Constrctors/Destructors Help topic -


I know that in D 2010 they added support for stationary constructors and districts. Where can I find more information about them: syntax and samples?

They are described in the wiki: and.

Here's one.


How do you sum values inside a for loop in Matlab? -


I want to add acid to run the loop and then want to print the total value of all previous acidic values. My problem is just fine, it is currently printing only individual values, which is not acidic.

p> ans =

  2.1676  

This is my code

  pki = [7.7,3.9]; T = 2; N = 55; For i = 1: t; Acidic = Log 10 (1 / ((n-1) * (10 ^ -piki (I)))); Yoga (acidic) and  

edit - as Indicates, you do not need the t variable.

You do not have any semicolons on your line sum (acidic) , so MATLAB prints the result. But it seems that you have some other problems - acidic is a scaler, so the value is overwriting every time, maybe you want to do something like this:

  pki = [7.7,3.9] ; N = 55; Acidic = Log 10 (1 / ((n-1). * (10. ^ - pki)));  , . * , and .     operators. They tell MATLAB the element based on element conducting on the vectors. MATLAB tells print out the last  disp  line output value. 


java - J2EE war file redeployment changes not reflected -


मैंने निम्न के रूप में फ़ाइल index.jsp बनाया है

  & lt; form action = " "विधि =" पोस्ट "& gt; & lt; br & gt; प्रथम नाम: & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "प्रथमनाम" आकार = "20" & gt; & lt; br & gt; उपनाम: & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "आद्यानाम" आकार = "20" & gt; & lt; br & gt; & Lt; इनपुट प्रकार = "सबमिट करें" मान = "सबमिट करें" & gt; & lt; br & gt; & Lt; / प्रपत्र & gt;  

मैं इसे निर्यात करने के लिए और सब कुछ ठीक काम करता है। फिर बाद में मैं index.jsp को संशोधित करता हूं,

  & lt; फ़ॉर्म क्रिया = "ग्रीटिंग सव्रल" विधि = "पोस्ट" & gt; & lt; br & gt; प्रथम नाम: & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "प्रथमनाम" आकार = "20" & gt; & lt; br & gt; उपनाम: & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "आद्यानाम" आकार = "20" & gt; & lt; br & gt; & Lt; इनपुट प्रकार = "सबमिट करें" मान = "सबमिट करें" & gt; & lt; br & gt; & Lt; / प्रपत्र & gt;  

मैंने इसे फिर से निर्यात किया है, लेकिन परिवर्तनों को प्रतिबिंबित नहीं किया गया था। जब मैं स्रोत को देखता हूं, तो फॉर्म क्रिया अभी भी रिक्त के बराबर है मैंने अपाचे को फिर से शुरू किया है मैं लॉग को देखता हूं, यह मुझे दिखाता है कि इसे दोबारा नियोजित किया गया है .. लेकिन बदलाव नहीं दिखाई दिए।

मैंने विभिन्न ब्राउज़रों के साथ कोशिश की है, यह देखने के लिए ग्रहण को पुनरारंभ करें कि क्या परिवर्तन सहेजे गए हैं, अपाचे पुनः आरंभ करें कोई सुझाव? धन्यवाद

आप क्या कर रहे हैं, उपकरण का उपयोग कर रहे हैं, आप उनका उपयोग कैसे कर रहे हैं आदि पूरी तरह से अस्पष्ट यह वास्तव में मददगार होगा यदि आप अपने संदर्भ पर और अधिक जानकारी दे सकते हैं और स्पष्ट कर सकते हैं कि आप क्या कार्य कर रहे हैं वर्तमान में, अनुमान लगाने में आपकी मदद करना बहुत कठिन है ...

बस के मामले में, मेरा अनुमान है कि आपने वास्तव में युद्ध की तैनाती नहीं की थी यानी आपने इसे अपाचे बिमटेट की वेबएप निर्देशिका में कॉपी नहीं किया था (यह तथ्य कि आप अपाचे टोमक का प्रयोग कर रहे हैं मेरा दूसरा अनुमान है अपाचे आमतौर पर अपाचे HTTPD , वेब सर्वर को संदर्भित करता है)।


django - 'RelatedManager' object has no attribute -


मेरे पास इस तरह परिभाषित मॉडल है:

  वर्ग UserDetail (models.Model): प्रयोक्ता = मॉडल। फ़ॉरइन्ज (उपयोगकर्ता, डीबी_ इंडैक्स = ट्रू, अनन्य = ट्रू, संबंधित_नाम = 'विवरण') पसंदीदा = मॉडल। कई सारे माईफिल्ड (अनुच्छेद, संबंधित_नाम = 'अनुग्रहित', रिक्त = सत्य)  

और मैं ऐसा कुछ करने की कोशिश कर रहा हूं:

  आलेख = get_object_or_404 (अनुच्छेद, pk = id) request.user.details.favourites.add (लेख)   

यह काम क्यों नहीं कर रहा है?

मुझे यह त्रुटि मिल रही है:

'संबंधित प्रबंधक' ऑब्जेक्ट में कोई विशेषता नहीं है 'पसंदीदा'

मुझे लगता है कि विवरण सही प्रकार नहीं है, लेकिन ऐसा क्यों नहीं है? और मैं इस तरह से एक क्वेरी कैसे कर सकता हूं?

जब आप user.details तक पहुँचते हैं , यह UserDetail.user विदेशी कुंजी के backreference तक पहुँच जाता है। विदेशी कुंजी स्वयं यह निर्दिष्ट नहीं करती है कि एक उपयोगकर्ता में केवल एक ही UserDetail हो सकता है, इसलिए डीजेँगो आपको एक संबंधित प्रबंधक / देता है, जिसे आप फ़िल्टर कर सकते हैं और एक नियमित प्रबंधक की तरह क्वेरी तो आप ऐसा ही करते हैं कि आप अपने .objects मैनेजर्स में करते हैं। आप user.details.all () , user.details.filter () , user.details.get () के लिए पूछ सकते हैं, और इसलिए, जो आपको विधि और परिणामों के आधार पर एक खोजता, एक ऑब्जेक्ट या अपवाद देगी।


signal processing - DSP Algorithms Book -


I am searching for a book similar to "Comic Introduction to Algorithm" by Thomas Common in the direction of the DSP algorithm. Is DSP completely anything in the form of a coerman on the market?

Edit I should say that I am searching for a book that is in line with the light of Pakistan.

I'm a big fan, without introducing the Sampling DSP concepts, as well as implement simple filtering Confirmed mathematics for clarification. Cookbook equivalent: You know how to boil the water on a stove, but you are upset about rest.

A more advanced book is more of a businessman's book than text, it's overlap for the cleavation - explaining how to save FFT technology, in particular, I have never been completely I have come across. Cookbook equivalent: maybe it could be the pleasure of cooking, maybe the Corden Blue Tome

And implementing a radio in the software is great for taking some DSP concepts and bringing them into life. Cookbook equivalent: A journey through a specific dishes, and explains how "braiding" is in the way.

Hope this is being used for you!


.net - asp.net regular expression validator client side script error -


I have to find out that the input string has HTML / script tags and if there is such a valid error, then the following regular expression The verifier is:

  & lt; Asp: text box id = "txt" runat = "server" /> & Lt; Asp: RegularExpressionValidator ControlToValidate = "txt" runat = "server" id = "regexVal" EnableClientScript = "true" display = "dynamic" error message = "invalid content" text = "!" Validation expression = "& gt; (?: (? & Lt; t & gt; [^   

When I run this markup hosting page, I get a secret error with the message "Syntax error in regular expression". However, when I take the same regex and it uses the Reggae class from the system. Lesson Regular expression works just fine: like:

  Regex r = new Regex ("> (? :(? & Lt; t & gt; [^ & lt;] * )) "); R.IsMatch (@ "& lt; b & gt; This should be a validation error & lt; / b & gt;"); R.IsMatch ("It's OK");  

What am I missing

Update: WebResource.axd is having an error in the following JS function:

  function Regular Expression ViaductAdvanced ISValid (Val) {var value = Value Eatergate Value (Val Contralolidate); If (ValidateTrem (value) length == 0) true return; Var rx = new regExp (val.validationexpression); // This error occurs with error var matches = rx.exec (value); Return (matches! = Null & value == matches [0]); } I think the problem is that Javascript understands the regular syntax of the syntax. Does not come in. Grouping  

When you set EnableClientScript to true to RegularExpressionValidator makes ASP.NET your regular expression in JavaScript Control in order to enable client-side validation on you. In this case, javascript has named named groups (? ? ... <... <... code) and non-capturing group (? : ...) is not supported for syntax. Although these features are working in NAT JavaScript, it is struggling with them.

From:

On the client, the JScript Regular Expression syntax is used. On the server, the Regex syntax is used. Because JScript is a subset of regular expression syntax syntax syntax, it is recommended that you use the JScript regular expression syntax to generate the same result on both the client and the server.

There are two ways that you can improve it:

  1. Disable the client-side script generation and perform regular explorations on the server-side. You can do this by setting EnableClientScript to false .
  2. Modify the regular expression and remove the non-capturing group and named groups. If you need to capture in your regular expression, then (...) syntax should work correctly in both Javascript and .NET. You will then use the reference number in the sequence number used for the captured values ​​( $ 1 , $ 2 , etc.). [^ & Lt;] * See how the purpose should work.

I want to point out some other issues:

  • You do not have to capture the original regular expression if you want to , Then examine the existence of all the opening brackets. It has & gt; [^ & Lt;] * can be rewritten which will be simple and will work in the same way. It will not capture any value in the original string, but since you are using it in ASP.NET Verification control, it will not make any difference.
  • The way you are implementing , RegularExpressionValidator will only work if the match is successful in your case, you will be verified if your code is in the Gt; Blah Something I think is that you want to work it in another way.
  • If you select & gt; Regular expression in [^ & lt;] * , then regular expressions will still not work. I think you want to intend that the verification control attempts to match all the text in the text box . So if I type the & gt; Blah , then this match will be, but and lt; B & gt; Blah & lt; / B & gt; Because the regular expression says that string is a & gt; should begin with & gt; to allow text before . * & Gt ;. * [^ & Lt;] * would like to suggest something.

LaTeX tabbing overlap -


I'm having some frustration with the latex tabbing environment.

For example, gene friends in this code - PL overlapping ends:

  \ start {tabbing} Arvood = \ suhrthukalanu \ ayirunnathu? \\ Joe - {\ sc gen} \ & gt; Friends - {\ sc pl} \ & gt; Happy - {\ sc past}? \\ 'Whose friends were happy?' \ End {tabbing}  

So whatever I'm doing is manually adding space, such as Arvate \ Hspes {8pt} \ = ... but it does not look like this good solution.

Is there any way to avoid these overlaps anyway for the tabbing environment?

Thanks very much for any help!

The tabbing environment works by setting the tab stop according to the first line (\ = marker) and then the rest of the environment For those tabs are blinding. If the latter line is too long to fit in some parts, then it will overlap.

If you want to avoid it, then use a tabular environment instead of tabular, for example, your code displays as you intend to:

  \ Start {Tables} {lll} Arod & amp; Nursing & amp; Ayirunnathu? \\ Who - {\ SC General} & amp; Buddy - {\ sc pl} & amp; Happy - {\ sc past}? \\ \ multicolumn {3} {l} {`Whose friends were happy? '} \ End {tabular}  

Where package is provided by \ multicolumn multicol. You can include it in the preface of our document by simply entering a line with \ usepackage {multicol} The first argument {lll} of \ begin {tabular} {Lll} defines the number of columns and their alignment (left left, in this example). Other options are (r) ight, and (c) enter you can also add delimiter to look like this table, e.g.

  \ begin {tabular} {| L L L |} \ hline Aarude & amp; Nursing & amp; Ayirunnathu? \\ \ hline - {\ sc gen} & amp; Buddy - {\ sc pl} & amp; Happy - {\ sc past}? \\ \ hline \ multicolumn {3} {| L |} {`whose friends were happy? '} \\ \ hline \ end {tabular}  

iphone - Formatting a date in my titleForHeaderInSection -


I am working on a simple list application, and I want to set the date in a normal format in the title ForFeadHeaderInSection Part of uiTableView but I have some problems, it works to an extent, but giving me a lot of information, it shows:

2009-12-01 00:04:10 -0700

In the area where I 'd like the item was made, and especially a specific time bin In normal times, whether to show the date you please help me understand that I need to change what? Thanks !!

You can use:

  NSDateFormatter * outputFormatter = [ [NSDateFormatter alloc] init]; [OutputFormatter setDateFormat: @ "HE: mm 'on' EEE MMMM ']]; NSString * newDateString = [OutputFormer stringFormat: [NSDT's date]]; NSLog (@" newDet string% @ ", newDet string); // For US English, the output is: // newDateString 10:30 on Sunday July 11,  

You should also read


iPhone:Problem when submitting the app which has same bundle identifier -


I have created a provisional profile using 'non wild card app id'. Which is like "com.compnayname.appname" as I want to use it with my free application as well as a new set of features in the form of payment for the same application, so I used the wild card app Did not use id. Now I have submitted my free application, it is being shown well. I am trying to deposit the same app that has more features, such as the payment app throws the iTunes connect error. "The binary you uploaded was invalid. The bundle identifier is already used in the use of a separate software package. is." When I created a distribution build I used the same bundle identifier for the paid app because the provisional profile has been created for both apps only. I also tried to build a build using "com.compnayname.appname.moreinfo", but the App Buildings are not successful because the prom profile is being created with "com.compnayname.appname". what can I do now? How can I use the same provisional profile and bundle identifier for my free app and paid app? Then what is the use of creating 'non wild card app id' ??

Note: I know how to create a Wildcard ID and use it. But I want to use both app (but the same app), free app and non-wildcard ID for the paid app I am

Can anyone help me solve it?

Thank you. Appreciate your quick help.

If this is the same app, then use the same ID, but "upgrade" Use the "Upgrade this app" button in iTunes Connect. This would mean that those downloaded before downloading it for free will receive the new version for free, but if you want you can charge new users.

If you do not want previous owners to get a new version for free, then this is actually a new app, and a new bundle ID is required.

Another option is to upgrade it, leave it free, and use in-app purchase to unlock new features.


geolocation - How can I divide the globe in to small grids such that it allows me to assign each lat/long location to a grid? -


To calculate the approximate locations represented by latitude / longitude, I think about dividing the map into smaller grids It was almost 100x100 meters grid, basically every point would be assigned in the grid.

I understand that instead of using MySQL, I can use the spatial indexes, but I am planning to use non-relational database such as CASANDA, where it is difficult to do the local goods Sequencing on, and therefore some types of grid approximation techniques may be clearer.

What would be the best way to create such a grid system and mapping the 2-D spatial locations?

EDIT 1: It can be perfectly fine if the grid is not exactly the same, so much more around the blocks.

The rectangular grid can be a proper assessment, but only in a relatively small area that can be The poles are not very close. A complete world solution requires a different approach.


C#/WPF: Catch Routed Event (UIElement.PreviewKeyUp) from UserControl -


I have a UserControl that has a text box named MyTextBox. This UserControl is placed in MainWindow.xaml, where I have the "UIElement .PreviewKeyUp "is trying to catch up.

Now while debugging, I can see the "UserControl" as the sender, not the text box.

Cheers

Cheers

How can I check whether KeyEventArgs E (especially EK) was sent from the text box whose Is myTextBox the name?

You can find it as e.Source property. Try putting it on the 'text box', and if it succeeds, you can check the name property for 'myTextBox'.

[edit after comment]

If the text box is inside UserControl, you can use the OriginalSource property of the event.


java - first level hibernate cache , modify record directly at DB -


For the first level of the cache

, what do I understand when we work from savings, to refresh the cash Need to call flush () Call for DB to select the selection later, for application to use Hibernate, we use to modify records / records using Hibernate without using DB-GUI Should not be deleted because the selection is incorrect due to the cache Will query the result. right?

wrong. 1-level cache is always consistent with itself, and is consistent with the updates made in that session. When the session closes, all the updates are automatically flush, you have to call at least flush ()

In addition, 1-level The cache remains only for the duration of the hibernate session (which is usually the last for only a few SQL statements, and usually less than one second), so an updated database will be directly in the next hibernate session starting directly able to see.


treeview - Multilevel GridView in WPF -


I want to find nuts for the nesting grid view (level 4). I have used Rowdbrestrasteppetlet for 2 levels for a different scene, but not beyond. Many articles have gridview inside the treeview, which is fine, but I need my inner elements so that the headers are also. Some like this ()

Many articles have gridviews inside the tree view but there is no header, at every level, I want to add the headline in this to appreciate any help.

In WPF there are special tools for this, and they are both and declared as.

Please note, I'm sure this will help you a lot.

In short, it should be declared:

  & lt; CollectionWeeksource x: key = "blogclose" source = "{binding blog}" /> & Lt; CollectionWeeksource x: key = "article collection" source = "{binding article, source = {static resource blogclose}}" />  

I used it with a case like yours but my DG's selection mod was set in one line, and it works fine, it is not how it behaves in multisecting. , But I'm sure this can be done (by setting the static resources located inside the statm).


scripting - printing variable inside awk -


In this script, I have to type the variable $ file , $ f for the file, $ command and sum / nr (all in one line)

  #! / Bin / bash Pmb_mpi Tau XHTML MPI_Tile_O in fftw; 2.54 In the 1.60 800 do for the F, if [$ {F} = 2.54] then order in the order; Do # echo $ {file} _ $ {f} _ $ {order} _v1.xls & gt; & Gt; P-State Summary XLS awk '{sum = = $ 2} END {print $ {file} _ $ {f} _ $ {order} _v1.xls, sum / nr}' $ {file} _ $ {f} _ $ {order} _v1.xls & gt; & Gt; P-State Summary. Excel Seconds done # Alo $ {file} _ $ {F} _v1.xls & gt; & Gt; P-State - Summary. XLS awk '{sum = = 2} END {print $ {file} _ $ {f} _v1.xls, sum / nr}' $ {file} _ $ {F} _v1.xls> and gt; P-State Summary Xls FINED  

Do any of you help me with this?

You can:

  echo -n "$ {File} _ $ {f} _ $ {order} _v1.xls "& gt; & Gt; P-State- Summary .xls # or printf "$ {file} _ $ {F} _ $ {order} _v1.xls" & gt; & Gt; P-State - Summary. XLS advocate '{sum = = $ 2} END {print amount / NR}' "$ {file} _ $ {f} _ $ {order} _v1.xls" | T "$ {file} _ $ {f} _avrg.xls" & gt; & Gt; P-State - Summary: Without using "code \" without using \ "code \ echo -n  or  printf   

Will give new line so that the output of the command awk is on the same line. I have added a position as a separator, but you can use anything.

Using tee , you can write your output in different files and only one Awk per input (command) file.


emacs - How can I set the encoding of shell-command-on-region output? -


I have a small Ellis script that applies to Perl :: Free Zone or full file for reference, here script (Taken from EmacsWiki):

  (defun perltidy- command (initial end) "perltidy command we pass markers." (Shell-command-on-field "Barrel's One area "(interactive" p ") (let ((point) (start) (end)) (if (and mark-activated transient-mark-mode) (setq start (q End-of-the-end (point-to-minute) end (point-max) ()) (global-set-key "\ c-CT" 'Perlatti-Dwm')  

The problem I am facing for the current MX 23.1 Windows (MXSW 32) is that if I use that script on the "U (UNIX)" in the UTF-8 encoded file If I apply the output comes back to the Latin-1 code, that is, every non-

< Strong> edit : The problem is being solved using (set-terminal) -coding-system 'UTF-8-UNIX) my init.el < In / code> In any other solution, go ahead and write them down!

shell-command-on-field ( ch f shell - Command-On-field RET ):

To specify a coding system for converting non-ASCII characters, input and output to shell command, with this command First use CX RECT C By default, the input (from the current buffer) is encoded in the same coding system that will be used to save the file, if 'buffer-file-coding-system' is going to change the output area It is decoded with the same coding system.

Start, ed, commands, output-buffer, replays, error-buffers, and display-error-buffers, non-active arguments. Non-interactive caller coding systems can be specified by 'coding-system-to-read' and 'coding-system-for-write' binding. In other words, you >

  (but read (coding-system-utf-8-unix)) (shell-command-on-field ...))  

This is untested, it is not certain that instead of coding-system-to-read (or maybe -write )? ?) Should be in your value. I think you can also use the output buffer logic and guide the buffer to the output whose coding system requires it for you.

Another option perltidy invocation, but again, without further information about what you are using now, and there is no point in using it on a system like yours, I only point Can i


java - web services/object-oriented question -


I'm starting with object-oriented programming recently using Java.

Now my question: Where can I learn about web server and object-oriented programming through solid examples? ? (Real life example is not hello world type)

I read the articles, which can be found on Wikipedia, Google etc. Is anyone getting first hand from switching in object-oriented programming, is more interested in success stories: D

thanks

vim - ctags problem when generating tags for .h and .c file in two different directory -


Now I have two directories, all header files are included in * .h directory / inc, whereas all c files *. C / src is stored in the directory.

Such a directory, (/ Project is an up-level directory):

  / project-- | --- - / inc | ---- / src  

I want to use ctrl +] to determine the definition of a parameter, in the example source file a function . C. How to generate those tags?

My method is:

  (1) CD / Project directory (2) ctags inc / * .h src / *. C  

Then a tag file is generated, however, when I open an example file and use "Ctrl +]", I can not take it into its definition Why ???

Do I have to / src ??? Need to create a tag file under

? thanks a lot!

, try typing:

  1. PWD
  2. : Set tags

Verify that the path of your tagfile exists in the output of 2, the relative path Which is the output of 1.

NOTE: You can change your local .vimrc . You can set the tag variable as part of

>

Update: It is common to set tags on tags, .. / tags, .. .. .. / tags on one set. With this pattern, Vim will use the first tag file which will find it relative to your folder structure (again your pwd .)


oracle - Java clob retrieval using getString - character encoding issue -


Then I have a database with the table, where one of these entries is' é € áí ', And I know it's right in DB. It is stored as a clob .

In Java, I retrieve the entry in this way:

  string text = result.sat.getstring (dbcstent COL_NOTE_TEXT);  

While debugging, the text is equivalent to ' é \ u0080áí and the Euro icon is displayed as a square block when displayed on the screen.

Has anyone seen this before? Any suggestions?

Thanks in advance.

0080 Euro characters is Windows Western encoding (CP-1252); This is 20AC in Unicode. You may want to check the encoding of the input. The second thing is that the screen is capable of displaying the euro symbol if it displays '\ u20ac' then that part will be answered.


ASP.Net partially ignoring my Custom error section in web.config -


Here's my web.config customErrors section (you'll notice the turn to I switch on mode '' I see Redirect to my local host):

  & lt; customErrors defaultRedirect = "~ /" redirectMode = "ResponseRewrite application / ServerError.aspx" mode = "" & gt; & Lt; Error status code = "403" in Reedayr = "~ / Secure / Aksesdinid. Spaks" / & gt; & Lt; / CustomErrors & gt;  

And here throws the code:

  as Adex hold AccessDeniedException new HttpException (DirectCast (HttpStatusCode.Forbidden, integer), adEx.Message ) throw finally try  

and here's what I end:

is not my beautiful AccessDenied.aspx page, but it is a forbidden error page, so at least I know that my throwing job Used to be.

I have a desperate last attempt to sign in as unsuprisingly that made no difference IIS 403 is removed (7.0).

I think any suggestions will be appreciated now thanks to the end!

In fact, your ASPX page can not be executed at all.
Go to IIS Go to your default website properties Click the Home Directory tab, click the Configure button. Now, check whether an .aspx page is registered there or not.


cxf - Getting access to a spring bean from a webservice? -


I have created a CXF webservice within my cxf.xml file. I have the following tag. Bean id = "VideoStatable" category = "com.company.auth.dataobjects.VideoStatsTable"

I think Spring should make this object for me The problem is that I'm not sure how to get it. It seems like I need servlet contact but as I am not in servlet im in WS, I'm not sure how to do this?

W

<

In your applicationContext.xml

xmlns: jaxws = "http: // cxf

.apache.org / jaxws " add http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org Add / jaxws http://cxf.apache.org/ schema / jaxws.xsd

to your schema location

  & lt ;! - - Loading CXF module - & gt; & Lt; Import Resources = "Classpath: Meta-INF / cxf / cxf.xml" /> & Lt; Import Resources = "Classpath: Meta-INF / cxf / cxf-extension-soap.xml" /> & Lt; Import Resources = "Classpath: Meta-INF / CXF / CXF-Servlet.XML" />  

And finally declare your WebService implementation:

  & lt; Jaxws: endpoint id = "MyWebService" implementor = "# MyWebServiceImpl" address = "/ myWebServiceAddress" />  

Where #MyWebServiceImpl is the ID of your bean, you can inject any other spring dependency independently into that bean.

Then the web service can be accessed via http: // yourhost / cxfuri / myWebServiceAddress (where cxfuri mapping is your CXF service)


Erlang: runtime overhead of function parameter decoration? -


If I use this type of decoration then is there a runtime overhead?

  get_next_state (_spid = undefined, _NextPort = undefined) - & gt; Stop  

No, there is no overhead, you can see if you have to do without dummy module Without decoration and compile using 's' flag.


stored procedures - Dynamic Pivot (in SQL Server 2005) -


For Microsoft SQL 2005, I am writing an archived procedure and I want to create a dynamic SQL Pivot:

pre> Book SELECT Book.ISBN, book.Name BookMurn.StockLocation book at INNER SM Pivot (COUNT (sm.NumberOfBooks)) for Bookid = sm.bookid PIVOT (sm.StockLocation IN (...)

Favorite with me (...):

  Select the location of the stock from the stock location  

and all the locations in the process ([location1], [location 2] etc. There is no hardcod in it, but SQL does not accept it.

How do I solve it?

You can not do it in pure SQL, you can use dynamic SQL You have to use and create a real SQL that you want to execute.

You can do this:

  DECLARE @sql VARCHAR (8000) SET @sql = 'location space for SIP' ('cursor cursor ... loop cursor ... SET @sql = @ Sql +' '+ + column_name +' '', '// and loop EXEC (@sql) )  

wpf - How can I know that a xaml is deprecated? -


मैं निम्नलिखित xaml को wpf में उपयोग कर रहा था:

  & gt; शैली लक्ष्य प्रकार = "{ X: प्रकार सीमा) "& gt; & Lt; सेटर संपदा = "बिटमैप इफेक्ट" & gt; & LT; Setter.Value & gt; & LT; BitmapEffectGroup & gt; & Lt; DropShadowBitmapEffect ShadowDepth = "1" / & gt; & Lt; / BitmapEffectGroup & gt; & LT; /Setter.Value> & Lt; / सेटर & gt; & Lt; / शैली & gt;  

जब मुझे पता चला कि DropShadowBitmapEffect को अब DropShadowEffect के पक्ष में बहिष्कृत किया गया है:

  & gt; शैली TargetType = "{x: प्रकार सीमा}" & gt; & Lt; सेटर संपदा = "प्रभाव" & gt; & LT; Setter.Value & gt; & LT; DropShadowEffect & gt; & lt; / DropShadowEffect & gt; & LT; /Setter.Value> & Lt; / सेटर & gt; & Lt; / शैली & gt;  

लेकिन मुझे यह एक भाग्यशाली तरीके से पता है! मैं कैसे जान सकता हूँ कि xaml में लिखा गया एक निश्चित नियंत्रण अब बहिष्कृत हो गया है? ?

एक अच्छा स्थैतिक विश्लेषण उपकरण आपको बताए जाने में सक्षम होना चाहिए जब आप उस चीज़ का उपयोग करते हैं जो नापसंद हो गया है कुछ मामलों में सी # संकलक आपको बताएगा। वास्तव में, इस मामले में, दोनों R # और C # संकलक इस तथ्य पर उठाएंगे कि आप अप्रचलित , अगर के रूप में चिह्नित संपत्ति का उपयोग कर रहे हैं सी # कोड।

दुर्भाग्यवश, इस समय, ऐसा नहीं लगता है कि या तो आर # स्टैटिक विश्लेषण प्रक्रिया या XAML कंपाइलर ऊपर उठाएंगे यदि आप अप्रचलित गुण या XAML के तत्वों का उपयोग करते हैं हालांकि, ऐसा प्रतीत होता है कि आर # में intellisense सुविधा, जो कि XAML का संपादन करते समय भी पदावनत की जाती है, समाप्त हो जाएगी।

मैं निश्चित रूप से यह देखना चाहता हूं कि क्या यह एक्सएएमएल के साथ काम करेगा और देखें कि क्या अप्रचलित सदस्यों के उपयोग की जांच करने के लिए एक नियम।

संपादित करें :

विज़ुअल स्टूडियो के लिए उपयोगी प्लगइन है, जिसमें कई शानदार सुविधाएं शामिल हैं -विरोधी स्थिर विश्लेषण।


c# - HttpWebRequest Vs webclient class who is better -


संभव डुप्लिकेट:

मुझे नहीं लगता कि कौन बेहतर है

या

क्या आप मुझे बता सकते हैं कि प्रदर्शन के मामले में कौन बेहतर है

मैं प्रदर्शन का परीक्षण करने की सलाह देता हूं / आप दोनों उदाहरणों में क्या करना चाहते हैं मुझे विश्वास है कि वेबक्लाइंट केवल एक सहायक है जो हुड के तहत एचटीटीपी वेबबर्म लागू करता है।


ruby on rails - Gems not found with Passenger in conservative spawn mode on Mac OS X -


We are using traveler locally on Mac OS X for development.

I switched to the conservative spawn mode to debug a problem with the MongoDB Ruby Driver.

However, after doing this, travelers can not get my gems now I have failed to start the page with this message:

These essential gems Vanishing: aws-s3> = 0.6.2 ruby-units> = 1.1.3 mongo> = 0.15.1 You are running: Ruby 1.8.6.111 / opt / local / bin / Rabbi Rabbibigs 1.3.5 A / Use users / worth / GM / Ruby / 1.8, / OPT / LOCAL / Lib / Ruby / GPS / 1.8 Run Rack: Install to install missing gems.

I have certainly installed these gems in the gem path, and the app works in the default spawn mode.

I found the Passenger Mailing List, but there was no resolution.

Any thoughts?

In the Environmental Rbb, you have to specify Lib (I think due to Hyphen in the name of Mani ):

  config.gem "aws-s3" ,: lib = & gt; "AVS / S3"  

c# - xVal and Validating multiple rows of data -


I have a table name discount that has the following schema:

PK DiskIDID Int

< / P>

Name varchar (50)

Then I am displaying all the discount related to the customer

Each customer will have 3 discount records.

When I should be unique to process correctly, I create the corresponding text box for the ID and name for editing.

Example:

When I use xVal Trying to experiment because my field names do not match the schema name, 'zodiac' rather than 'amount_1', this field does not validate.

How can I work it out?

I can add all three discounts in a record for a completely different customer, because in some other fields I left to simplify the example. I need 3 discounts in 3 rows for every customer.

Here are some code:

  & lt; Form method = "post" action = "ProcessUpdate" & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; Discount 1 & lt; / Td> & Lt; TD & gt; & Lt;% = Html.TextBox ("zodiac")% & gt; & Lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; Discount 2 & lt; / Td> & Lt; TD & gt; & Lt;% = Html.TextBox ("zodiac 2")% & gt; & Lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; Discount 3 & lt; / Td> & Lt; TD & gt; & Lt;% = Html.TextBox ("zodiac")% & gt; & Lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Input type = "submit" value = "submit" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Form & gt; & Lt;% = Html.ClientSideValidation & lt; Discount & gt; ()%> Metadata Type (Discount Metadata) Public Partial Discount Discount {Public Class DiscountmataData {[Required (Error Message = " [Required] ")] public string amount {get; Set; }}}  

How to get work done?

I have played something with prefixes and how can this be done:

First you have to give the textbox name for the headline prefix, but the same asset name will be "zodiac" and then attach it to each prix, html. Calling client side validation three times in each field, jquery validators

  & lt; Form method = "post" action = "ProcessUpdate" & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; Discount 1 & lt; / Td> & Lt; TD & gt; & Lt;% = Html.TextBox ("discount1.Amount")% & gt; & Lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; Discount 2 & lt; / Td> & Lt; TD & gt; & Lt;% = Html.TextBox ("discount2.Amount")% & gt; & Lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; Discount 3 & lt; / Td> & Lt; TD & gt; & Lt;% = Html.TextBox ("discount3.Amount")% & gt; & Lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Input type = "submit" value = "submit" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Form & gt; & Lt;% = Html.ClientSideValidation & lt; Discount & gt; ("Discount 1")% & gt; & Lt;% = Html.ClientSideValidation & lt; Discount & gt; ("Discount2")% & gt; & Lt;% = Html.ClientSideValidation & lt; Discount & gt; ("Discount3")%>  

Hope this helps


.Net C# TcpClient / Socket HTTP Client Performance / Efficiency -


I am writing an HTTP client using .Net TcpClient / Sockets.

So far, the customer handles both content-length and clock responses through the network-stream response (after writing the GET request for the TCP client), parsing the header and the relevant message body byte Retrieving / Checked Bytes To do this, it uses the NetworkStream ReadByte method.

All this works well, but performance is an important consideration so I would like to make it as quick and efficient as possible.

Initially read this message body (depending on content-length) or ReadByte for selected body body bytes in a proper size buffer, in all other areas, readbits (like headers, chunk Reading size etc.).

I'm interested in knowing better / different ways to do this to get optimum performance? Obviously, the main problem with HTTP is that unless it is retrieved, the length of the reaction stream is not known.

There is a special reason for this that I am not using more arrays (for example, HttpWebRequest) for this (I need better control at the socket level).

Many thanks,

Chris

I recommend using a process with size buffer, fill buffer until repeated response stream is over. When the buffer completes or ends the stream, attach the buffer content to the string (or whatever you are using to store the message).

If you want to read an important bit information in a hurry, just read enough of the stream to see it (in other words, you do not need to fill the buffer first on the pass if you do not want to ).

You should also consider using an event system to indicate the presence of new data, which is shaped in such a way that the main part of your process is given this address Karan Not that data where it came from need or you are how buffer.

Edit

In response to your comment question, if you have a connection, in which you try to reuse it for many requests , You can create the thread that reads more than it when it finds the data, then it uses the event to push it out to handle the main part of your program. I do not have any specimen, but you should be able to find many with Bing or Google searches.


c# - Site-To-Site Data synchronization Over WCF -


मैं एक वेबसाईट और एक कॉर्पोरेट अनुप्रयोग प्रबंधन के साथ वितरित समाधान विकसित कर रहा हूं।

यहां वास्तुकला:

वेब साइट:

  • डेटाबेस (SQL सर्वर)

वेब साइट: एएसपी.नेट एमवीसी

  • डेटा सिंक्रनाइज़ेशन सर्विसेज (डब्ल्यूसीएफ)

  • कॉर्पोरेट प्रबंधन अनुप्रयोग:

    • डेटाबेस (SQL सर्वर)

    मैं साइट पर काम करना चाहता हूं

    ध्यान दें : कॉर्पोरेट प्रबंधन एप्लिकेशन डाटाबेस वेयरहाउस डेटास्टोर है।

    आम तौर पर मैं चाहता हूं कि कॉर्पोरेट पक्ष डेटा के लिए वेब साइट का अनुरोध करे सिंक्रनाइज़ेशन।

    तो यहां परिदृश्य है:

    • (वेबसाइट साइड) कुछ डेटा परिवर्तित => स्थानीय डाटास्टोर
    • (कॉर्पोरेट साइड) वेबसाईट से परिवर्तनों के लिए पूछें => वेब साइट डाटास्टोर से गोदाम डेटास्टोर से डेटा सिंक करें
    • (कॉर्पोरेट साइड) कुछ डेटा बदल गया है => वेअरहाउस स्टोर => वेबसाईट स्थानीय डैटस्टोर में सिंक करें

    मैं इसे कैसे प्राप्त कर सकता हूं और सबसे अच्छा तरीका क्या है?

    है माइक्रोसॉफ़्ट सिंक फ्रेमवर्क पर एक नजर।

    मैंने इसे 2 डाटाबेस की स्थिति को सिंक्रनाइज़ करने के लिए WCF चैनल पर सफलतापूर्वक उपयोग किया है। सिंक फ़्रेमवर्क साइट आपकी आवश्यकताओं के बावजूद काम करने में बहुत अच्छी है और आपको यह बताती है कि समस्या कैसे पहुंचेगी। यदि आप SQL सर्वर में बनाए गए परिवर्तन ट्रैकिंग का उपयोग करने के साथ भाग ले सकते हैं, तो इसे एक साथ बहुत जल्दी आना चाहिए।


    c# - How do I call GetCustomAttributes from a Base Class? -


    I should be able to get the custom attribute in any of its bases in the class. Right now I am doing this with a static static method in the base class (with multiple examples of the same attribute being applied to the class) with the following implementation:

      // A 'base Define 'Category Protected Static CustomAttribute GetCustomAttribute (int n) {New StackFrame (1, False) Return) // Get the last frame in the stack and thus the previous method. .GetMethod (). Disclaimer type. GetCustomAttributes (typeof (CustomAttribute), false). Choose (o => CustomAttribute) o List () [n]; } [Custom properties] [custom properties] [custom properties] category created: base { Fixed Zero main (string) [] Args) {var attribute = GetCustomAttribute (2); }}  

    Ideally I'm able to call it with the controller and cache the results.

    Thank you.

    PS

    I have realized that GetCustomAttributes are not guaranteed to give them back in regards to the Order of Reshma.

    If you use example methods instead of static methods, you also call it. Gate type (), even from the base class. AttributeUsage (AttributeTargets.Class, AllowMultiple = true, Inherited = true)] Class custom attribute: attribute {} abstract class base {secure base} {this.Attributes = Attribute.GetCustomAttributes (this.GetType ()), typef (Custom-made) .stat & lt; Custom Authorship & gt; () .oerere (); } Protected custom attribute [] attributes {get; Private set; }} [Custom] [custom] [custom] category created: base {static zero major () {var derived = new derived (); Var attribute = derived. Properties [2]; }}

    It's easy, and that caching is completed in that constructor you were hoping for.


    Creating a long running, nightly task in .NET 3.5 for use on Windows Server 2008 -


    I have a long lasting, calculation and disk intensive task, which needs to be run on Window Server 2008; My frame of choice is there. NET 3.5 SP1 An opportunity This work may also fail for any number (i.e. the lack of disk space) and I want to make sure the errors are handled & amp; In addition to this, this work will need permission to make database connections and to do things like read / write file system.

    EDIT: My question is more about whether to use the window schedule or some other mechanism to stop the process.

    Create a console application inside the main () method, insert a try-catch, and remove unwanted exceptions Use SmtpClient to send notifications about. Compile it and add an entry to run it through the scheduled work applet.


    c# - Lambda expression - add to collection if not present -


    I have just started learning the Lambda expression.

    Is it possible to further simplify the following code:

      Customer customer = customer FirstOther Default (C => C ID == 3); If (customer == blank) {customer = new customer () {first name = "ben", last name = "foster", id = 3}; Customers.Add (Customer); } // Clients do something with the customer. Creteprophile ();  

    Basically I want to know whether an object exists in the collection or not. If I do not want to make it, add it to the collection and use it later.

    thanks Ben

    In writing, it is necessary to be clear and legible Does not seem to be more than that. Lambda and operator ? There are definitely methods of grabbing to misuse it, to write it in a line, but ultimately they only serve to obscure the code.


    How do I pass a variable into grails template from a Layout file? -


    तो मेरे पास नेविगेशन टेम्पलेट (/common/_navigation.gsp) है जो Grails परियोजनाओं में मुख्य लेआउट फ़ाइल में प्रदान हो रही है ( /layouts/main.gsp)। मैं किसी प्रकार के वेरिएबल / पैरामीटर / आर्ग को व्यक्तिगत दृश्य फ़ाइलों से लेआउट में और आखिरकार नेविगेशन टेम्पलेट में कैसे पारित कर सकता हूं? जब मैं किसी पृष्ठ पर हूं, तो मैं सही टैब को हाइलाइट करना चाहता हूं।

    (हम पहले से ही Grails Navigation Plugin का उपयोग करने की कोशिश कर चुके हैं। चूंकि हमारे पास एक ही नियंत्रक को इंगित करने वाले विभिन्न टैब हैं (समान दृश्य , अलग फिल्टर) यह टूट जाती है।)

    मैं हर समय यह पैटर्न करता हूँ मेरे विचार में, मैं पृष्ठ पर मैन्युअल रूप से एक संपत्ति संलग्न कर सकता हूं या पैरामीटर टैग का उपयोग करके देख सकता हूँ कि मैं प्रतिपादन कर रहा हूं। यह Grails उपयोगकर्ता गाइड में प्रलेखित नहीं है, लेकिन इसके सुपर काम।

      & lt; पैरामीटर नाम = "foo" value = "bar" / & gt;  

    तब मैं पेज प्रॉपर्टी का उपयोग करके इस पर जा सकता हूं।

      & lt; g: set var = "activeNavItem" मान = "$ {pageProperty (नाम: 'page.foo')}" />  

    लेआउट को इस वैरिएबल को सभी को संभालने की आवश्यकता नहीं है: -)


    sql - Selecting multiple "most recent by timestamp" in mysql -


    I have log entries for different servers, for each idServer .

      mysql> To create a scene with the latest entry log entry. Description of server log; + ---------- + ----------- + ------ + ----- + ------------- ------ + ---------------- + | Field | Type | Faucet Key | Default | Extra | + ---------- + ----------- + ------ + ----- + ------------- ------ + ---------------- + | Idlog | Int (11) | No | PRI | Faucet Auto_interpretation | | IDServer | Int (11) | No | Child | Faucet | | Time | Timestamp | No | | CURRENT_TIMESTAMP | | | Text | Text | No | | Faucet | + ---------- + ----------- + ------ + ----- + ------------- ------ + ---------------- + mysql & gt; * Select * from Serverlog; + ------- + ---------- + --------------------- + -------- ---- + | Idlog | IDServer | Time | Text | + ------- + ---------- + --------------------- + -------- ---- + | 1 | 1 | 2009-12-01 15:50:27 | Log line 2 | | 2 | 1 | 2009-12-01 15:50:32 | Log line 1 | | 3 | 3 | 2009-12-01 15:51:43 | Log line 3 | | 4 | 1 | 2009-12-01 10:20:30 | Log line 0 + ------- + ---------- + --------------------- + -------- ---- +  

    What's hard about this (for me):

    • Entries for the previous date / time can be inserted later, therefore I do not trust idlog only.
    • The timestamps are not unique, so I need to use idLog as the "latest" tiebraker.

    I can get the results I want to use a subquery, but I can not put a subquery in one view. Additionally, I have heard that the subquery display in Myquq is useless .

      mysql> SELECT * FROM (Select * Server DOSC, IDLog Server Service Order by DESC ID Group by ID Group; + ------- + ---------- + --------------------- + -------- ---- + | Idlog | IDServer | Time | Text | + ------- + ---------- + --------------------- + -------- ---- + | 2 | 1 | 2009-12-01 15:50:32 | Log line 1 | | 3 | 3 | 2009-12-01 15:51:43 | Log line 3 | + ------- + ---------- + --------------------- + -------- ---- +  

    What is the right way to write my thoughts?

    I recommend using:

      Or change as VW_your_view. * To connect to the server (Select Slediser, Max (SL.time) from 'max_time', SERVERLOG SL Group by SL.Disverver) x on x.iderver = t.idersver and x.max_time = t.time  

    Never define ORDER BY in a scene because there is no guarantee that whenever you use the view, then the order you specified is required .


    XSLT Variables and Choose/Otherwise not working right -


    मेरे पास कुछ एक्सएसएलटी हैं जो ऐसा दिखता है:

      & lt; xsl: select & gt; & Lt; xsl: जब test = "string (// उपयोगकर्ता [यूज़र आईडी = $ यूज़र आईडी] / रूट / प्रोप [@ एनएम = 'ग्रीसबोर्डर्ड'])" & gt; & Lt; xsl: variable name = "type" select = "कॉकैट ('डॉक्यूमेंटर', // यूज़र [यूज़र आईडी = $ यूज़रआईडी] / रूट / प्रोप [@ एनएम = 'ग्रीसबोर्डर्ड'])" / & gt; & Lt; / XSL: जब & gt; & LT; XSL: अन्यथा & gt; & Lt; xsl: variable name = "type" select = "concat ('दस्तावेक', उपयोगकर्ता: गेटयूएसरटाइप (स्ट्रिंग (// पेलोड / @ साइटआईडी), स्ट्रिंग (@ यूएसआईआईडीआईडी))" / & gt; & Lt; / XSL: अन्यथा & gt; & Lt; / XSL: चुनें & gt;  

    और मैं इसे "टाइप" नामक एक वैरिएबल को निर्दिष्ट करना चाहता हूं, जिसे मैं इसके बजाय अन्य उदाहरणों से देखना चाहता हूं:

      & lt; xsl : चर नाम = "प्रकार" & gt; & LT; XSL: चुनें & gt; & Lt; xsl: जब test = "string (// उपयोगकर्ता [यूज़र आईडी = $ यूज़र आईडी] / रूट / प्रोप [@ एनएम = 'ग्रीसबोर्डर्ड'])" & gt; & Lt; xsl: मान-का चयन करें = "कॉन्सैट ('डॉक्यूमेंटर', // उपयोगकर्ता [यूज़र आईडी = $ यूज़र आईडी] / रूट / प्रोप [@ एनएम = 'ग्रीसबोर्डर्ड'])" / & gt; & Lt; / XSL: जब & gt; & LT; XSL: अन्यथा & gt; & Lt; xsl: मान का चयन करें = "कॉन्सैट ('डॉक्यूमेंटर', उपयोगकर्ता: गेटयूएसरटाइप (स्ट्रिंग (// पेलोड / @ साइटआईडी), स्ट्रिंग (@ यूएसआईआईडीआईडी))" / & gt; & Lt; / XSL: अन्यथा & gt; & Lt; / XSL: चुनें & gt; & Lt; / XSL: चर & gt;  

    लेकिन मेरा चर सेट नहीं हो रहा है। इसे अन्यथा ब्लॉक पर मारा जाना चाहिए लेकिन कभी नहीं होता है कोई विचार? यह किसी भी चीज़ पर सेट नहीं होता है ..

    टाइप करने के लिए एकमात्र तरीका चुनें / जब / अन्यथा विवरणों के साथ समाप्त करना है और सिर्फ दो विकल्पों में से एक को चुनें, जैसे: < / P>

      & lt; xsl: variable name = "type" select = "concat ('documenter', // यूज़र [@UserID = $ UserID] / root / prop [@nm = 'GreaseBoardCategory'] ) "/ & gt; उदाहरण के लिए  

    xsl: अपेक्षित रूप से काम करना चाहिए । मैं सुझाऊंगा कि आप अपने उदाहरण को आसान बनाते हैं। कहें

      & lt; xsl: मान का चयन करें = "ए" / & gt;  

    में जब-शाखा और इसी तरह अन्यथा शाखा में "बी" कहते हैं, आपके अधिक जटिल संयोजनों के बजाय

    अंत में, जैसा कि दूसरों ने कहा है, हमें वह कोड दिखाएं जहां आप चर "प्रकार" और XML इनपुट का मूल्यांकन करते हैं। VBScript का उल्लेख शायद इसका मतलब है कि आप XSLT 1.0 के साथ काम कर रहे हैं। मैं बस सुनिश्चित करने के लिए पूछता हूं।


    c# - How to cast an object programmatically at runtime? -


    मान लें कि मेरे पास एक कस्टम नियंत्रण है:

      MyControl: नियंत्रण    

    अगर मेरे पास ऐसा कोड है:

      सूची & lt; नियंत्रण & gt; सूची = नया ... सूची। जोड़ें (myControl); रोलआउटएनिमेशन एनिमेशन = सूची [0];  

    मुझे पता है कि मैं इसे संकलन समय पर कर सकता हूं, लेकिन मैं इसे रनटाइम में करना चाहता हूं और MyControl विशिष्ट कार्यक्षमता का उपयोग करना चाहता हूं।

    आप इसे रनटाइम में क्यों करना चाहते हैं? यदि आपके पास अपनी सूची में अधिक प्रकार के नियंत्रण हैं, जिनमें कुछ विशिष्ट कार्यक्षमता है, लेकिन विभिन्न प्रकार हैं, शायद उन्हें एक सामान्य इंटरफ़ेस को लागू करना चाहिए:

      इंटरफ़ेस MyControlInterface {myoidOfMicControlMethod (); } वर्ग MyControl: नियंत्रण, MyControlInterface {// स्पष्ट इंटरफ़ेस सदस्य कार्यान्वयन: शून्य MyControlInterface.MyControlMethod () {// विधि कार्यान्वयन }} वर्ग MyOtherControl: नियंत्रण, MyControlInterface {// स्पष्ट इंटरफ़ेस सदस्य कार्यान्वयन: शून्य MyControlInterface.MyControlMethod () {// विधि कार्यान्वयन। }} ..... // दो नियंत्रण कक्षाओं के दो उदाहरण, दोनों MyControlInterface MyControlInterface myControl = new MyControl () लागू करने के लिए; MyControlInterface myOtherControl = नया MyOtherControl (); // सूची के रूप में सूची की घोषणा करें & lt; MyControlInterface & gt; सूची के & lt; MyControlInterface & gt; सूची = नई सूची & lt; MyControlInterface & gt; (); // दोनों नियंत्रण सूची जोड़ें। जोड़ें (myControl); सूची। जोड़ें (मेरीऑपर कंट्रोल); // आप सूची दोनों के बिना उन दोनों पर विधि को कॉल कर सकते हैं [0] .MyControlMethod (); सूची [1] .MyControlMethod ();  

    python - media.set_xx ValueError -


    New man here. I asked about the program to hide a phantom a while ago, in which I was having trouble and got some good reactions. In fact, I tried to write a program that was given in a given folder in another given folder Change pixels to another color.

    I believe I have this down, but now this program is telling me that I have an invalid value for the red component of my color (value: invalid red value is specified), Even if it is being changed from 64 to 56. Any help of this matter will be appreciated!

    Import import import import import (old, new, folder)

    (Here's the code, if I'm messing elsewhere; it's in Python):

      : Old_list = old split ('') new_list = new.split ('') folder_location = os.path.join ('C: \\', 'Users', 'Owner' for file name in Oslistdir (folder) , 'Spriting', folder): current_file = media.load_picture (folder_location + '\\' + Filename) for pix in current_file: if (media.get_red (pix) == int (old_list [0])) and \ ( Media.get_green (pix) == int (old_list [1]) and \ (media Get_blue (pix) == int (old_list [2])): media.set_read (pixels, newlists [0]) media.set_gree Media  name  == ' main ':  

      while 1: old = str (raw_input ('split the original RGB component by a single location, insert:')) if the old == 'left': Sys.exit (0) new = Str (raw_input) 'new' == 'quit': sys.exit (0) folder = str (raw_input ('Please enter the name of the folder, please enter the new RGB component, from one space Separate: ')) (old, new, folder)  

    The speed is moving; But there is no worry, I did not convert the values ​​found in an integer, trying to use the strings as logic ...


    ios - iPhone Core Data "Automatic Lightweight Migration" -


    I'm trying to update an app that implements core data store. Adding the attribute

    I said the following code for my representative class:

      - (NSPersistentStoreCoordinator *) persistentStoreCoordinator {if (! PersistentStoreCoordinator = Void) {return persistentStoreCoordinator; } NSURL * storeUrl = [NSURL fileURLWithPath: [[Self-Application Document Directory] stringBeeAppendingPathComponent: @ "Shoppee.sqlite"]]; NSError * Error = Zero; Continuous store coordinator = [[NSPSlistListCoDditorALOC] initWithManagedObjectModel: [Self-managed object model]]; NSDictionary * Options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool: Yes], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool: Yes], NSInferMappingModelAutomaticallyOption, zero]; If (Continuous Store Cordinator Extender Storey Type: NSSQLiteStoreType Configuration: Zero URL: Store URL Options: Option Error: & amp; Error]) {NSLog (@ "Error:% @", error); NSLog (@ "Unsolver Error% @,% @", Error, [Error User Information]); Abortion (); } Return Constant Store Coordinator; }  

    It was from the following URL:

    I get the following error while executing the code:

    2009-12- 01 Shoppee [25633: 207] Error: error

    domain = NSCocoaErrorDomain code = 134,130

    UserInfo = 0x1624d20 "operation could not be performed: 20: 04: 22.877

    Shoppee [ Complete (Coco error 134130.) "2009-12-01 20: 04: 22.879 Shoppee [25,633: 207] Unsolved error error domain = NSCocoaErrorDomain code = 134,130 UserInfo = 0x1624d20". Operation can not be completed (Coco error 134130 .) ", {URL = File: // localhost / Users / Eric / Library / Application% 20Support / iPhone% 20Simulator / User / Applications / A 8A8FB73-9AB9-4EB7-8F83-82F5B4467AF1 / Documents / MyApp.sqlite; Metadata = {NSPersistenceFrameworkVersion = 241; NSStoreModelVersionHashes = {item = & lt; 869d4b20 088e5c44 5c345006 87d245cd 67ab9bc4 14cadf45 180251e9 f741a98f>; Store = & lt; 47c250f4 895e6fd1 5033ab42 22d2d493 7819ba75 3c0acffc 2dc54515 8deeed7a>; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = (); NSStoreType = SQLite; NSSTUUIDID = "8 DC 65301-3 BC 5-42 BE-80B8-E44577B 8F8E1"; }; Cause = "Model can not be found for source store"; }

    It seems that I need to include the original data model, but I'm not sure how to do this. any suggestion?

    To summarize / complete guide:

    1. Before making any changes, create a new model version.

      In Xcode 4: Choose your .xcdatamodel -> Editor - Add Model Version

      In Xcode 3: Design -> Data Model -> Add Model Version

      You will notice that a new .xcdatamodel has been created in your .xcdatamodeld folder (which is also

    2. Do your new .xcdatamodel and make the change that you .

    3. Save

    4. Set Current / Active Setting of the newly created schema Schema for

      .xcdatamodeld with selected folder:

      In Xcode 4: Utilities Sidebar -> File Inspector -> Convergent Core Data Model -> Choose New Schema

      In Xcode 3: Design> Data Model> Set Current Version

      .xcdatamodel The green tick on the icon will go to the new schema.

    5. Save.

    6. To migrate to runtime Apply the code required for The Options parameter, null Replace with the following code

      where your NSPersistentStoreCoordinator is created (usually app Aglaiatt Class),:

        [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool: Yes], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool: Yes], NSInferMappingModelAutomaticallyOption, zero]  
    7. then run your app if there is no crash, presumably you've already migrated successfully :)

    8. when you migrate successfully, my Reshn code (step 7) can be removed. (This can be understood when the developer migrate user-dependent when published app on set.)

    Important: Delete old model version / schema core version requires an older version to migrate to the new version.


    user interface - cron that needs a display -


    I am trying to run a cronch that involves opening a graphical program and thus a DISPLAY set is required. I have tried the following:

      * * * * * * DISPLAY =: 0.0 / opt / firefox / firefox-print ..  

    this work And even if I try it on my console then the above command does not work. It just does not do anything there. Now, the only way to do this is to do the following:

    $ echo $ DISPLAY Localhost: 10.0 $ crontab -l * * * * * * DISPLAY =: 10.0 / opt / firefox / firefox -print

    And it works if I stay logged in to the machine and wait for the cron to run.

    Is this a viable way of working? The only way I can be thin is always to be logged into the machine (which I want to save).

    I do not think this is just a simple setting for working.

    However, Xvfb (X Virtual Framebuffer) should be able to provide a dummy X display that meets your requirement:

    < / Html>

    algorithm - How can I get a new array from the second item onwards in c#? -


    I originally had this code, which I accidentally thought was what I wanted:

      string firstArg = args [0]; String [] otherArgs = args.Except (new string [] {Args [0]}). ToArray ();  

    However, it seems that. In addition to the method the duplicate is removed so if I had to go through the logic of abcc , then the result of the other ARG result bc not Bcc .

    How do I get a new array from all elements with all the elements?

    Use the method:

      var otherArgs = args.Skip (1) .ToArray ();  

    javascript - jQuery - make global variable available to multiple plugins -


    I have a set of jQuery plugins, I'm making a website for

    All these plugins are common functionality that they call $$ .getJSON ().

    The URL passed in these calls varies depending on the Dev, QA and production environment.

    I url in a central location so that it can be easily changed.

    Where should the URL be placed? I do not want to store the URL in each individual plug-in. Can it be defined as a global variable or is it better to argue the plugin?

    I recommend that you attach an object using a jQuery object. Just make sure to include it before all your plugins:

      jQuery.YourCompany = {url: "http://thedomain.com"};  

    Then anywhere you need it, just use

      jQuery.YourCompany.url // or $ .YourCompany.url  

    If you use objects / classes with the function $ .fn , you can also use this global variable as a namespace:

      jQuery.YourCompany PluginOne = function (el) {....} // But not on the FN object: jQuery.fn.pluginOne = function () {return.Each (function () {var p = New jQuery.YourCompany.PluginOne (this);}); }  

    python - Installing TortoiseHG on Gnome in Ubuntu 9.10? -


    I follow the steps to install TortoiseHG on Ubuntu 9.10, using the following document:

    I get the following error in my ~ / .xsession- errors

      evolution-alarm-notify-message: Tuesday 1 December 23:28: 26 200 9 sys: 1: GTK Alert: Action Group 'DirExtensionsMenuGroup' denies to add non-unique action 'HgNautilus :: 00None' to the command: 1: GtkWarning: gtk_action_get_name: asserting `GTK_IS_ ACTION (action) 'failed sys: 1: GtkWarning: gtk_ui_manager_add_ui: asserting `name = zero! | | Type == GTK_UI_MANAGER_SEPARATOR ': 1: Sis failed GtkWarning:' 01clone 'sys for' HgNautilus :: DirExtensionsMenuGroup 'action group refusing to add non-unique action: 1: GtkWarning: Denial of non-unique operation add 'HgNautilus :: 02init' action group 'DirExtensionsMenuGroup' to sys: 1: GtkWarning: Non-unique operation 'HgNautilus :: 03userconfig' DenExtensionsMenuGroup 'sys refuses to add to action group: 1: GtkWarning: non-unique Refuse to add action 'HgNautilus :: 05about' action c As 'DirExtensionsMenuGroup' Traceback (most recent call last): File "/ usr / bin / hgtk", line 44, & lt; Module & gt; Sys.exit (hggtk.hgtk.dispatch (sys.argv [1:]) "/usr/lib/pymodules/python2.6/hggtk/hgtk.py", line 29, file transmission in U = _ui.ui ( Traceback = 'args' in 'traceback') TypeError: __init __ () found an unexpected keyword argument 'traceback'  

    Does anyone know how to do this work? In the meanwhile I am using the command line. Thank you.

    It appears that you are using 1.2.1 of Mercurial, which did not do in the refactoring has gone. This means that you can not use the latest version of TortoiseHg with an earlier version of Mercurial.

    I recommend updating a new version or using an earlier version of TortoiseHg.


    C# Linq queries -


    दिए गए सरणी के न्यूनतम, अधिकतम, योग कैसे प्राप्त करें?

      int [] संख्या = {1, 2, 3, 78, 100, 1001};  

    (काम नहीं कर रहा है)

      var क्वेरी = नया {अधिकतम = संख्या। अधिकतम, न्यूनतम = संख्या। मीन, योग = संख्या.SUM};  

    आप यह कर सकते हैं:

      var मान = नया {अधिकतम = संख्या.मॅक्स (), न्यूनतम = संख्या.मिन (), योग = number.Sum ()};  

    ध्यान दें कि ये 3 अलग कॉल हैं, जैसे कि यह linq2sql थे, वे 3 अलग-अलग दौरों का कारण होगा एक गोलपथ में इसे खींचने के लिए, आपके पास एक प्रश्न हो सकता है जो y में से x में एक एक तत्व देता है, जहां कोई शर्त चयन ...


    ajax - How do I send a 2D array from jquery to php? -


    I have a 2D array that I want to send to a php page with $ .ajax.

    This is the code that creates an array:

     for  (var i = 0; i  

    array is filled with nested ends and I use JSON.stringify to format it. However, when AJAX calls are made, all the empty objects ([]) are sent. What is wrong?

    I may be wrong, but arr [i, j] There is no way to use multi-dimensional arrays in stylish languages, it would be arr [i] [j] .

    IMHO works as a arr [i, j] , and uses only an index as j.


    C Unsigned int providing a negative value? -


    I have a signed integer but when I print it using% d, sometimes there is a negative value it happens?

    printing % d will read the integer as the decimal number, its Regardless of the type defined.

    To print unsigned numbers, use % u .

    That's because they handle variable logic. The compiler pulls the value from the bus stack (like zero * and pointing to the call stack) and printf is to find that your What is the data from the format string given by it?

    This is the reason why you need to supply the format string - there is no way of C or a 'base class' (for example in object in Java, for example) ) Normal or predefined toString


    c++ - Instantiating classes by name with factory pattern -


    Suppose I have a list of classes A, B, C, ... All the heirs to base .

    I get the name of the class as a string from the user, and I want to instantiate the right square and give an indicator the base . How do you implement it?

    I used a hash table with the name of the class as the key, and a function pointer for the function that gives the correct class immediately and Base * .

    However, I think I might be able to use the factory pattern here and make it very easy, but I can not remember it well, so I would ask however for.

    Here is a general implementation:

      template & lt; Class interface, square bit = std :: string & gt; Structure factory {typical insect key; Typedef std :: auto_ptr & lt; Interface & gt; type; Type Type (* Manufacturer) (); Bool defined (key const & key, creator v) {// define key - & gt; V relation, whether it is a new key to return. Return _registry.insert (typename registry :: value_type (key, v)). second; } (Key set and key) {typename registry: const_iterator i = _registry.find (key); If (i == _registry.end ()) {std :: invalid_argument (std :: string (__ PRETTY_FUNCTION__) + ": key is not registered"); } And come back to I- & gt; second (); } Template & lt; Class base, class real & gt; Fixed std :: auto_ptr & lt; Base & gt; Create_func () {return std :: auto_ptr & lt; Base & gt; (New real ()); } Private: typedef std :: map & lt; Key, Creator & gt; Registry; Registry _ Registry; };  

    This is not to be the best in every circumstance, but it means that for the first time before implementing the type of functional type manually, the estimation should be more useful default. How to register each hierarchy is not mandatory by the factory, but you can mention the GF (it is simple, clear and very useful, and yes, in this case, with the macro, it prevents the underlying problems).

    There is a factory here:

      struct basis {typedef :: factory & lt; Base & gt; Factory; Virtual ~ Base () {} Virtual At Answer () const = 0; Static Factory :: Type (Factory :: Main Treaty and Name) {back _factory.create (name); } Template & lt; Class uplift & gt; Static Zero Defined (Factory :: Main Treaty and Name) {bool new_key = _factory.define (name and factory :: template create_func & lt; base, executed & gt;); If (not new_key) {std :: logic_error (std :: string (__ PRETTY_FUNCTION__) + ": name is already registered"); }} Private: Static Factory _ Factor; }; Base :: Factory Base :: _ Factory; Structure A: Base {virtual et answer () const {returns 42; }}; Int main () {base :: defined & lt; A & gt; ("a"); Emphasis (base :: build ("a") -> answer () == 42); Return 0; }  

    php - Determine Next Day 6PM -


      & lt; php $ start_date = "12/10/2009 11:30"; गूंज "& lt; br & gt; प्रारंभ_डेटा: $ start_date & lt; br & gt;"; $ देय_डेटा 1 = दिनांक ("एम / डी / वाई एच: आई", स्ट्रॉटोमेम ("+ 1 दिन"। $ Start_date)); $ देय_डेटा 2 = दिनांक ("एम / डी / वाई एच: आई", स्ट्रॉटोमेम ("+ 2 दिन 6 अपराह्न"। $ Start_date)); गूंज "& lt; br & gt; नियत_डेटा 1: $ नियत_डेट 1 & lt; br & gt;"; गूंज "& lt; br & gt; नियत_डेटा 2: $ नियत_डेटा 2 & lt; br & gt;"; ? & Gt;  

    मेरा कोड देखें, मैं start_date से दो तिथियां प्राप्त करने की कोशिश कर रहा हूं।

    सबसे पहले एक कारण_डेटा 1 सटीक 24 घंटे है start_date और दूसरा कारण due_date2 Start_date के दूसरे दिन के बाद 6 बजे है

    कारण_डेटा 1 सही ढंग से काम कर रहा है

    क्या कारण_डेटा 2 गणना में क्या गलत है?

    आप भी

      $ due_date2 = date (" m / d / y 18:00 ", strtotime (" + 2 दिन "के लिए भी जा सकते हैं "$ प्रारंभ_तिथि))।  

    How to jump to the next tag in vim help file -


    I want to learn the vim documentation given in the standard support file. But I'm stuck on a navigating issue - I can not manually move the cursor to the next tag without the situation. I think you would agree with this that it is more useful:

    1. Go to the next tag with some important strings
    2. Press Ctrl-] to read this topic < / Li>
    3. Press Ctrl-O to return
    4. Continue reading the opening text

    While I was writing this question, Have tried to think about how to solve it. I came to know that / |

    But the tag is surrounded by two pipe '|' Use the characters, so it's still not really optimized to use.

    : tn to navigate between tags and < Code>: tp sequence

    If you want to find the next tag on the same help page, then try this search:

      / | \ {-} |  

    It means searching:

    • character |
    • Any next letter | , matches as much as possible (this is what \ {-} does).
    • One more character |

    This VIM recognizes the tag in the help file.


    computer science - calculating max and min expressible values for floating point number rep -


    I should know IEEE floating-point numbers have a standard like 10 ^ 38 - -10 ^ 38 (and corresponding + Ve) Most textbooks just make this statement of this fact, why not bother with IM, ie How would you do this limit?

    Thank you

    -prisisn (32-bit) floating point presentation format In, the exponent maximum value is 127. The representation is 2 basis, thus the maximum possible value is approximately 2 ^ 127. Let's: 127 * log (2) / log (10) ≈ 38.23 This is why the maximum value represented by 32-bit float is approximately 10 ^ 38. You can find more details on the IEEE 754 Floats in the linked Wikipedia article.


    postgresql - sql sum or aggregate function on pre-fab column with complex query -


    I have a question that takes the average difference (average) from 7 days a week for Monday, TUES, etc. Average prices It works fine, but I'm sure how can I tell EGs in the same query that this query is found?

    About any ideas ... this is a big number ... not by average.

    Any ideas? BTW is from this postgrad ... Thank you

      SELECT rooms.name, rooms.id, MAX (case when (Dv from avatiles.bookdate) - EXTRACT (DOW to date '2009- 12-13 ')) = 0 then (availables.price ELSE 0 END) day 1, max (in case when (Aquatrat (DOW from availables.bookdate) - Extract (date' Date 2009-12-13 ')) = 1 day (availables.price) ELSE 0 END) Day 2, Max (in case when (Aquatrates (DOWN from Bookmate) - Extract (Date '200-12-12-13')) = 2 THEN (availables.price ELSE 0 END) Day 3, Max (in case when (Aquatates (Divine) S from availables.bookdate) - Extract (DOW FROM DATE '2009-12-13')) = 3 THEN (availables.price ELSE 0 END) Day 4, Max (Case (Extract (DOW from availables.bookdate) - Extract Date '2009-12-13')) = 4 THEN (availables.price ELSE 0 END) day 5, (availables.price) as the average, amount (sm (availables.price)), maximum ( (Signature (spots) -1) + 1) AS beds from availables INNER availables.room_id = include rooms in rooms.id WHERE availables.room_id = '1780' and beneficial price & gt; Room.id. rooms@name  

    Here's something that should work Select average (average + trius + wads + thur + fly) as the average (average + trius + wads + thur + fly) in the form of average (average + trips + wads + thur + fly) in the form of average, avgtues as average (mon) as Avgmon Avgtues, avg (weds) avgweds, Avg (thurs) as avgthurs, agv (fri) avgfri, MAX ((sign (spots) -1) + 1) from AS beds (SELECT rooms.name, room. ID, case when EXTRACT (DOW from availables.bookdate) = 1 THEN (availables.price ELSE 0 END) In case when extract (availables.bookdate from DOW) = 2 THEN (availables.price) ELSE 0 end), case when EXTRACT (DOW from availables.bookdate) = 3 THEN (availables.price) ELSE 0END) AS weds As, when EXTRACT (DOW from availables.bookdate) = 4 THEN (availables.price) ELSE 0 end), when extract (DOW from availables.bookdate) = 5 THEN (availables.price) ELSE 0 END ) In the form of fri, spots, rooms.id, rooms.name availables, take advantage of INNER rooms at Ables.room_id = rooms.id WHERE availables.room_id = '1780' and availables.price & gt; 0) Room.ID, Room.Name by Group)

    Note I did not test, so typos could happen.


    asp.net - How to use aspnet_compiler -


    After looking at [post] [1], I thought I would let it go.

    So, in my post build event, I have kept ...

    C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ aspnet_compiler -v / -p " $ (ProjectDir) \ "

    ... then click Build Solution.

    Unfortunately, I found the following error: "Type 'MyWebProject.UI.Global' could not be loaded. C: \ global.asax 1 MyWebProject.UI"

    Any ideas Why? For my knowledge, I do not even have the C: \ Global .asx file.

    Finally, I want to be able to check my ASPX pages for errors.

    Thank you,

    Thanks,

    Thanks,

    ETFFERX

    C: \ wINDOWS \ Microsoft.NET \ framework \ v4 0.30319 \ aspnet_compiler.exe -v / -p" Website Full Path "D: \ TestPrecompileFolder -f


    c# - asp.net timer to load page content -


    asp.net
    सी #

    हमारे वेबपेज में वर्तमान में एक बड़ा वेब ऐप होता है जो उस पर नेविगेट करने के लिए लंबा देरी करता है। मैं वर्तमान में AJAX का उपयोग करने के लिए WCF वेब सेवा को लागू कर रहा हूं लेकिन देरी मेरे नियोक्ता के लिए एक चिंता का विषय है इसलिए वह मतलब समय में एक त्वरित और गंदे तय करना चाहती है।

    मुझे खाली पृष्ठ लोड और फिर सामग्री लोड करने के लिए टाइमर का उपयोग करें। यह कथित पेज लोड समय पर कट जाएगा लेकिन मुझे यह सुनिश्चित नहीं है कि इसे कैसे पूरा किया जाए।

    किसी भी मदद की बहुत सराहना की जाएगी

    शॉन

    आपको शुरू करने के लिए कुछ कोड:

    asp.net पृष्ठ में:

      & Lt; एएसपी: टाइमर आईडी = "टाइमर 1" ऑनटिक = "टाइमर 1 डाट" रनैट = "सर्वर" अंतराल = "1" & gt; & Lt; / एएसपी: टाइमर & gt; & Lt; asp: UpdatePanel आईडी = "updatePanel1" runat = "सर्वर" अपडेटमोड = "सशर्त" & gt; & LT; ट्रिगर & gt; & Lt; asp: AsyncPostBackTrigger ControlID = "टाइमर 1" EventName = "टिक" / & gt; & Lt; / ट्रिगर & gt; & LT; ContentTemplate & gt; .... आपकी सामग्री यहां & lt; / सामग्री थीम & gt; & Lt; / एएसपी: UpdatePanel & gt; & Lt; asp: UpdateProgress ID = "UpdateProgress1" runat = "server" DisplayAfter = "100" & gt; & LT; ProgressTemplate & gt; कृपया प्रतीक्षा करें ... & lt; / प्रगतिसमूह & gt; & Lt; / एएसपी: UpdateProgress & gt;  

    पीछे के कोड में:

      संरक्षित शून्य टाइमर 1 वोल्ट (ऑब्जेक्ट प्रेषक, इवेंटएआरजीएस ई) {this.Timer1.Enabled = false; StartLongRunningTask (); }  

    "Learning" filter engines -


    Are there any "intelligent" or "learning" engines, which are capable of identifying "bad" phrases in texts (For example, if I want to filter texts with mail address:

      asdasd asd as d dgfdgfdgfdg sadasd (as used in thirdbird)  

    Asfsdf.com

    The first tool will not be identified as an email address ... but if the user is "taught" (click Or "got a mail address in the text" for example) for tooltips, many times, that text contains phrases like "xxxxx (at) xxxxx.xx" is suspicious, it "learns" that in the future This text should be automatically marked ...

    Question is something like that on the market? I am wasting some libbs (like spam assassin, etc.) but these are "special" on email ...

    The general idea you are talking about is one. Maybe he'll help you in your searches.

    Edit: Some other examples:

    • < / Ul>

    qt - Ownnership of QState. Do I need to delete all QStates? -


    I added my status to MI, will this code delete the Mestrate?

      QStateMachine * m = new QStateMachine (); QState * mystate = new QState (); M-> AddState (mystate); Erase;  

    This is similar to layout
    if you add state and state ownership If you issue the state machine will take ownership, when you manually remove the state from the state machine.

    Zero QStateMachine :: removalState (QAbstractState * state)
    This state removes the state given from the machine. State machine releases state ownership.


    install - Is it possible to download a platfrom specific Ruby gem without installing it? -


    I have read the answer gem fetch response to this question but windows always do not get windows gem.

    Using install gem install gosu --remote installs Windows version successfully installed gosu-0.7.15-x86-mswin32-60 . When downloading using

    gem fetch gosu , I get downloaded gosu-0.7.15 which is a Linux version and can not Installed on my windows PC

    Gem fetch gosu-0.7.15-x86-mswin32-60 with a specific gem and try it like error: does any repository Do not get gosu-0.7.15-x86-mswin32-60

    How to get the right version for my PC when using fetch versus install?

      $ gem fetch --help Usage: gem fetch GEMNAME [GEMNAME ...] [ Option] Options: -v, - Version VERSION - Specify the version of the gem to fetch the platform platform Specify the platform of the gem to bring local / remote options: -B, - switch to Bul-Thru Bulk Synchronization (default 1000) Threshold Threatold-P to ---- [No-] http-proxy [URL] Use HTTP Proxy for Remote Works - Source URL for Gems Use the URL as the remote source Common Options: -H, --help Get help on this command- V, - [no-] Verbose verbose level output -q, - set Quiet silence commands - Config-file FILE Use this config file instead of default - Show backcrackers on backtracks Backtraas Stack - Debug Ruby debugging Turn on Logic: Summary for downloading a gem named GEMNAME: Download a gem and call it current directory Keep default in: - version '& gt; = 0 ' 

    You should be able to do this

      $ gem fetch gosu - platform x86-mswin32  

    Or just go to the bus.


    coding style - Is it acceptable to have useless code? -


    I think some programmer add code, which does nothing useful after all (C #) for example:

      [serializable] class foo {// ... string serializeMe () {New XmlSerializer back (typef (this)). Serialize (this). ToString (); // serialize to xml (syntax is incorrect, not important here)}}  

    The class is marked as serialjob, but this is the only way that is serialized, XML Through the serialization, which is not required

    I personally hate such useless codes, but I often see it and I'm curious about what others feel about it. Is not it so serious after all? Is it common in the industry? Or is it just plain bad and does not make any difference what should be removed?

    Does it also take if you yes (and I think it is like this ) Then the minimum effort to read additional code (as code, idle)?

    If yes (and I think this is so) then the code should not be in the code. This type of code has been polluted with an additional snippet which is not useful, they are "in the case of bus".
    "Refactoring later on" can be painful, after 6 o 12 months, who is going to remember if it is actually used?


    visual studio - VS2008 Unit Test Project bugs -


    I am using VS 2008 Developer Edition and I'm looking for some bugs with Test Projects.

    I am getting an error that does not understand - I have a class named 'Fu' which I need to test and automatically create a blank test class.

    FU has 3 paramometers in its manufacturer - IBR, Ibaj, Iibang.

    When I write a test case, I will give Dim Fu as New Fu (Bar, Falcon, Bang), and I sometimes get an error, which says that 'Type IBEng It can not be completely changed to 'IBING', this error does not make any sense.

    Even more awkward - if I switch to the example of Foo_Accessor () instead, the error is removed. I've played with reference and then I can finally fix the error above - but then I get the same error for my Foo_Accessor () class!

    I will clean, rebuild and sometimes the error will be overcome - but then I get an error 'Foo_Accessor' is not defined. Now I go to FU class and again 'make the accelerator' - however , It gives the same error, at this time I am stuck and my solution will not be compiled, and what I did was adding a new test case through the visual studio!

    Has anyone seen these issues and can help please? Apart from this - I have tried everything including instructions given by MS, - changing the name of the name, referencing the project in different ways, loading projects, etc., etc. However I can not either be converted to 'ifoo' ifoo 'bug or bugfix has not been defined bug ... I am just going to break and to give a damned property to me to check a readline accessor is ...!

    For some, it's hard to say, but it seems that in your context incorrectly set up What's going on here is that there is a reference between your projects as a reference DLL reference, a project reference. It can confuse the type system with the idea that bangs from the project and DLL are actually different types of bangs.

    I will remove all references between my projects then add them back to the project tab of reference reference dialog to be able to select again to be careful to browse the project. This should fix your problem

    Is this a multi-language project or just a language project? I have found that this type of problem is likely to be in multi-language project but it certainly has happened in one language.


    scala reflection: getDeclaringTrait? -


    When I search for a new library, I sometimes find it hard to find out the implementation of a method.

    In Java, MathO provides the #getDeclaringClass class which declares a defined method. Then by walking again on class #getMethods, I can meet for each method, the category that declared it.

    In Scala, the properties are converted into the Java interface, and a class which enhances the attribute means to define these methods by defining the methods of properties forwarded to those companions, which will definitely define these methods. That method will return #getDeclaringClass class, not attribute:

      scala> Attribute A {def foo = {println ("hi"}}} defined attribute A scale & gt; Class B is a defined class B scale & gt; ClassOf [B] .getMethods.find (_ getName () == "foo".) Get.getDeclaringClass res3:. Java.lang.Class [_] = class B  

    What is the best way to work around this? Meaning, given a class, how can I get a list [(method, orbit)] where each tuple has been declared in a method and specialty / class?

    itemprop = "text">

    after scalar 2.8, you

    ScalaSigParser to parse specific byte code information .

    It can be used more stable.

      import tools.scalap.scalax.rules.scalasig._ import scala.runtime._ Val scalaSig = ScalaSigParser.parse (classOf Scala symptoms byte of classes and methods address [RichDouble the serialization format ]) received Val richDoubleSymbol = scalaSig.topLevelClasses.head Val methods = richDoubleSymbol.children filter (_ match. {case m: MethodSymbol = & gt; true case _ = & gt; false}) methods foreach println richDoubleSymbol.isTrait ScalaSigParser.parse (ClassOf [ordered [any]] get.topLevelClasses.head.isTrait  

    Prints :.

      Scala & gt; Methods foreach println MethodSymbol (X, owner = 0, flag = 20,080,004, information = 23, No) MethodSymbol (& lt; init & gt;, owner = 0, no flags = 200, information = 33, a) [.. .] MethodSymbol (isPosInfinity, owner = 0, flag = 200, information = 117, no) method Sinbol (isNegInfinity, owner = 0, flag = 200, information = 117, no) Scale & gt; RichDoubleSymbol.isTrait res1: Boolean = false mark & ​​gt; ScalaSigParser.parse (classOf [Ordrd [a]]. Get.topLevelClasses.head.isTrait res2: The Boolean = true  

    I think that following this road you reflection Scala API.


    Which Java based MVC framework is most similar to ASP.NET MVC? -


    I am learning ASP.NET MVC in the last few months and I think this is a great improvement on ASP.NET. Personally, I'm happy to use it (as opposed to ASP.NET webform). I started thinking about how the net version was able to live so long without any such structure (at least the widespread expansion and Microsoft .NET ports like Java MVC framework, such as Spring.NET) that may not be supported by Microsoft. .

    I know that Java people had such frameworks and many Java MVC frameworks are available

    If a web developer is thinking about switching from Java to the net If so, switching from the Java framework can be the easiest, and on the contrary, if an ASP .NET MVC developer is thinking about increasing its skills and learning some Java MVC (web) framework, which is a ASP.NET MVC architecture and Will most by Uvidha?

    Which Java MVC frame is similar to ASP.Net MVC?

    SpringMVC, VRP, Giles (but not relevant to Java world)

    < / Div>

    sql - why is null not equal to null false -


    I was reading this article:

    And the consensus is that when the similarity between the two (

      from where ((a = b) or (a is null and b is null))  

    when A and B are NALs, (A = B) still FALSE, because NULL is not equal to NULL. This is the reason that additional check is required.

    What will happen when testing inequalities? After the above discussion, it seems to me that inequality To test, I will need to do something like this:

      WHERE (() (or not one is zero and b though, I have seen that this Not at all (not least at Ephesians 11.5), and I can do just that: (Score: 5, Funny)  
      where (a  )  

    If A and B are Null, then it goes wrong if zero is not equal to null, then will not it be correct?

    Edit < / Strong>
    These are all good answers, Ekin I think my question was a bit unclear

      (where A & lt; & Gt; B)  

    Given that A or B can be null, code>

    Or let me clear it There is a need to check this type of:

      WHERE ((A ; gt; b) or (A is not and is not zero) or (A is null and b Is not))  

    To view this question, refer to this reference.

    Relational expressions related to the tap actually come in the tap again

    < Em> edit

    here, & lt; & Gt; stands for random binary operator, NULL is a SQL placeholder, and value is a value ( NULL is not one value):

    • NULL & lt; & Gt; Value -> NULL
    • NULL & lt; & Gt; NULL -> NULL

    Argument: NULL means "no value" or "unknown value" , And thus there is no point in any comparison with any real value .

    is X = 42 is correct, false, or unknown, which you do not know what value (if any ) X holds? SQL says that this is unknown. Is X = y correct, inaccurate, or unknown, provided both are unknown? SQL says the result is unknown . And it calls for any binary relational operation, which is only logical (even before the model is in place before the blueprint).

    SQL also has two unary postfix provides operators, IS NULL and IS NOT NULL , these are their TRUE or FALSE according to their operation.

    • NULL IS NULL -> TRUE
    • is not fired -> < Code> FALSE

    Python & Arduino commands continuously -


    I am trying to install a Python script which requires that many orders be sent to my Arduino individually, Read all and the output It makes me have an Ardino script, which responds to simple string commands (like MA3 etc.), either with OK, ERR or a value (if I'm installing Ardino or Board Depends on measuring the component connected).

    For example:

      ser = serial.Serial ("COM6", 115200) ser.write ('SA 50000') ser.write ('SM 0' ) Ser.write ('SI 0') ser.write ('SF500') ser.write ('MA3') while true: print ser.readline ()  

    I want to set this code (first 4 write statements) to start the parameters, start up (last write) and then print until anything else is coming from the component. I know that the statement does not stop at any point, but this is not my problem. My problem is that the script will not send the same way my parameter is written as long as I am at that time I will not put in, so that Arduino can start the parameter every time.

    Can anyone help me? I am quite new to the complete picarial and I am talking to Ardunes. My Arduino script works (I have tested it in Arduino monitor and if I put my statement in the loop, it prints them).


    ios - Why is there a collision error when I load my Swift game on any device other than the iPhone 6? -


    Due to some reason when I load my sailing game on another device other than an iPhone 6 then it would be an error is. As soon as I open it, and not when there is a real conflict, I am using SpriteBilder and Xcode for this app. It says, CCPhysicsCollisionBegin Representative methods should return a BOOL , but when I load it on the iPhone, there is no error, I have examined all my collision methods, and they all have a Booleanians return. any idea? Here is an example of one of my confrontation methods.

      func ccPhysicsCollisionBegin (pair: seismographics, peer !, boat: ccnode !, life: ccnd!) - & gt;  

    Just like the other methods, it actually returns a boolean back.

    After some sharp digging stackoverflow, I got the answer. Obviously, my version of Cocos 2D was written in Objective-C, so instead of returning to bool , I should have returned ObjCBool ​​ It helps anyone who has the same problem!


    Aptana scaling in windows 8.1 incorrect -


    I am trying to get Aptana in Windows 8.1 for the first time, but I have found some scaling issues:

    I have a UX I am using 305 (ASUS) (1920x1080 and 13 inch screen).

    Do anyone know how to fix this or how to use scaling for this app.

    Google did not help me in this.


    Rails: Simple Form Association label_method from Grandparent -


    I am trying to create a form that will create a new record using simple form, but show me the correct label First of all, the relevant model in the dropdown list is:

      class service & lt; ActiveRecord :: Base is_to: Business has_one: Nomination has_many: Clients, through: Nomination end class clients & lt; ActiveRecord :: Base is_to: Business has_one: Nomination has_many: Services, through: Nomination end class nomination & lt; ActiveRecord :: Base is_to: service is_to: customer has_many: jobs end class jobs  

    The basic idea is that the customer will be enrolled in one or more services, representing an appointment to the job service. When creating a new job, I have to choose the enrollment related to the job. From Html.erb:

      & lt;% = f.association: Nomination, label_meter :: service_id, value_method :: id, prompt: 'Named service'% ' Select.  

    This works, but it only shows me service_id from the enrollment table. What I want to see, the name of the client (fname and lname) and the name of the service contained in the dropdown list, such as: "John Do: Window Washing" is the problem that both come from parents of enrollment. Basically I have to face two organizations that I want to go to on that label.

    I thought that about D-generalization is so much that I have the necessary data in the enrollment record, but I did not want to do this. / P>

    Any thoughts?

    Define the following method in the enrollment category:

      def name "# {Client.full_name}: # {service.name}" end  

    Then you should be able to use this method in your form:

     < Code> & lt;% = f.association: enrollment, label_method :: name, value_method :: id, prompt: 'named service'% ' Select  

    2 * n + 1 to avoid sql questions to prepare enrollment collections with included customers and services.