Saturday 15 May 2010

winforms - C# WaitCursor while form loads -


I am getting a form that takes seconds to display at the end. This form is called:

 using  (result frm = new result ()) {this.Visible = false; Frm.ShowDialog (); This.Visible = True; }  

It's useful to let me see the default cursor as cursor. VAT Kaiser is available, while waiting for the form to display at the end. Currently I am able to successfully do this using the stable 'current' property:

 using  (result frm = new ResultsForm ()) {//this.visible = false; Cursor Current = cursor Wait cursor; Frm.ShowDialog (); //this.Visible = true; }  

But it has two problems:

  • This forces me to disable the mainstream hide-ins feature which I would like to maintain.
  • This increases the coupling after the cursor. Current = cursor Default; is to be called within the event shown as a result.

How can I change the cursor during the form before replacing the code snippet and avoiding coupling while loading without loading?

Update: The question was answered now, the video presentation was removed so I do not go to my ISP bandwidth limits

Why you have to remove it. View = false? You should still be able to do this while determining the cursor.

What would be an acceptable solution to set the cursor instead of the parents? Get it to set the cursor before starting the code which takes all the time, then set it back to the end.


.net - JSON.Net serialization and custom objects -


So I was working toward serializing some of my objects to a fairly lightweight approach, and the use of NewtonSoft's JasonNet Was hoping to do.

The challenge is that I am trying to use a simple interface for serializing an IDictionary. T will be one of the many institutions in my domain in this case that everyone has a Gid ID (which creates its key in the dictionary).

The problem I have is JSON.Net is successfully sorted by the dictionary key value and the ID property of the stored objects, but none of HT's other properties (which, at this point, are all simple types) . My serialization code is much more accurate than the JSON.net website:

  string json = JsonConvert.SerializeObject (data, formatting indent); As "Data" I have said that there is an IDictionary, and T (for this test) is a "property" type which is just a Guid ID and a string name property. The output looks like this:  
  {"d1cb1764-66cd-4cfb-8f51-c0b8457ce00e": {"Id": "d1cb1764-66cd-4cfb-8f51-c0b8457ce00e"}}  

Thank you.


Is there a way to push a MATLAB workspace onto a stack? -


Does anyone know that there can be a heap of workspaces in MATLAB? It would be very convenient, to say the least.

I need this for research. We have several scripts that interact interestingly. Functions are local variables, but there is no script ...

The regular metallab function call stack is a stack, the easiest way to use one's workspace function, and copy-on-written of Matlab makes it appropriately efficient but perhaps it Not what you are asking for.

There is a natural correspondence between workspace and strokes because the same identifiers are valid for variable names and structures fields. They are essentially both identifier => Mxarray mapping.

You can use whos and evalin to capture a workspace position for a structure. Use a cell vector to apply one of those stacks. (A straight array will not work because it requires homogeneous field names.) Stacks can be stored in the appadata to prevent it from appearing in a workspace.

Here are push and pop functions for this technique

function push_workspace () c = getappdata (0, 'WORKSPACE_STACK'); If Hamperity (C) C = {}; The end% hold the workspace w = evalin ('collar', 'whos'); Name = {w.name}; S = struct; I for = 1: numel (w) s (Names {i}) = evalin ('caller', names {i}); Push it to end% stack C {And + 1} = S; Setappdata (0, 'WORKSPACE_STACK', c); Function pop_workspace ()% off previous workstation stack C = getappdata (0, 'WORKSPACE_STACK') pop; If direct (C) warning ('nothing on the workstation stack'); Return; End s = c {end}; C (end) = []; Setappdata (0, 'WORKSPACE_STACK', c); % If you want a blank slate for your workspace evalin ('collar', 'clear'), do it; Caller's workspace names =% stick wars in field names; I for = 1: number (name) assignine ('caller', name {i}, s (name {i}); End

copying a texture in xna into another texture -


I am loading a texture2D that contains several phantom textures. I initialize to store in different texture2D objects I would like to draw different textures while loading texture, but there is no such way where I have to do this. SpriteBatch Draw, I believe that only one beginning, the end block should be called right from within?

Thank you.

I am loading a texture2D that contains many phantom textures. To store texture in 2D object, I would like to draw different textures while loading the initial texture.

You do not have to do this, nor should you want to reach a single texture faster than many settings. In addition, textured GPU textures are stored in memory to split it does not make sense.

You should instead focus on the written code that can reach individual sprites within your phantom sheet. I suggest how you can see how a play based game works

Here's a great tutorial video series that you should help:


What does the jQuery() function do? -


In answer to the question

I have a follow-up question. What does the jQuery () function do? (There are four answers on this; the subject should describe at least selector and element-set mode)

I tried with googling but could not get a clear answer.

Thanks for any help in advance.

jQuery function input:

  • $ ("") , $ (zero) , or $ (undefined) < Li> $ (DOMElement)
  • $ (html) -> $ (array)
  • $ ("# id")
  • $ ("TAG")
  • $ (expr, $ (...))
  • $ (expr, context)
  • $ (function)

To see how this is controlled, see, respectively.


java - 2nd level hibernate cache understanding -


** 1 ** For second-level caches, can only set the timeout period but can not clear the refresh / unit cache? Or is auto-refresh / cache saving / updating / mergeupdate every time as the tipping annotation @Cache (use = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) ? Is hibernated template. Flush () related to this?


2. Is it good for all institutions to enable second level cache?

= "text">

1) If you have to do then you can manually remove the bodies from the second level cache. There are several ways for this purpose; Some ejected a single instance of a unit (or collection); Others ejected all bodies of the given class (or name of the given entity).

He said, you should not do this like Normally - Hibernate will keep the cache updated for you (as long as you are not updating something like that SQL Update - in which case your question is clear).

2) Generally - no, it is not good for cash All Organizations This is usually a good idea to cache an inevitable institution, as well as Are often loaded / rarely updated; Suppose you do not have tons of them. But again, it really depends on you what you are doing.

There is a timeout (or, if you make a safe), your cache size / good caching strategy should not be trusted.


asp.net - RedirectUrl info lost after doing postback in client-side code -


My login page works like this: when you enter it, javascript reads some of your information, Writes in the input and submits so that the read data can be read and processed on the server.

  & lt; Script language = "javascript" type = "text / javascript" & gt; Function getUserInfo () {var userInfo = xyz.GetSecureBox (); Form1.info.value = userInfo; Form1.read.value = "true"; Form1.submit (); } & Lt; / Script & gt;  

Depending on the data provided, the server code authenticates the user or not

The problem is that when you try to enter a different page , Then make it the default .aspx, you are redirected to the page login with the redirect URL parameter so that you can be certified. But after postback I have lost the javascript redirectUrl information. How can I protect it?

OK, I can definitely read that string string parameter in JS and write it in some input. How do I use query string parameters in JS? And maybe there is a different way?

The only way I can think about session and / or cookie.

If using the query string and parsing in JS, then you have to code yourself. There are so many code out there that are doing this eg.


Determine installed PowerShell version -


Which version of PowerShell has been installed on a computer, and how can I actually install it?

Use $ PSVersionTable.PSVersion to set the engine version If the variable is not present, it is safe to assume that the version of the engine is 1.0 .

Note that $ Host.Version and (Go-Host) .Version are not trusted - they only reflect the version of the host, Not all of the engines are PowerGUI, PowerShellPLUS, etc., and they will set the version of the host to reflect their product version & nbsp; & Mdash; Which is absolutely correct, but not what you are looking for.

  PS C: \ & gt; $ PSVersionTable.PSVersion Major Short Build Amendment ----- ------------------4 0 -1 -1  
< / Html>

c# - XtraPivotGrid dynamic dataset creation -


I already have a dynamic XtraPivotGrid build, but the table adapter and dataset is 1 (a) specific table. I want to be able to get data from the specified table, but I do not see a way to type without writing about 2.5k lines (IDE designs in time, but for any table). Does anyone think in an easy way to do this?

In the same circumstances, I was making extrapidad in the design time, but then the basis of the user table selection Changed the data source at runtime. Then I was using XtraGrid's built-in methods to create columns automatically.


python - django admin permissions - can edit user but can't edit his permissons - how to do it? -


I gave editors such permission:

  • auth | User | Users can add / change - On

  • auth | Permissions | Still, while editing, they can change their permissions (and they allow themselves to work, which they should not do).

  • I got a ticket from 2 years ago: and it still works like this.

    How to allow user versions (email, password, etc.), but change block permissions?

Your current approach is not going to work. I'm scared.

From:

If you have permission to add users, then you have the power to create superusers, which can then, in turn, change other users.

So if you manage to block the editors by changing the permissions, it will not help, because they can still make the SuperUutter.


c - Minimum Number of Operations needed -


I have a problem, suppose I have the string given: "best", the target string assumes: "animal" . So I have to set the number of operations to convert the defined string to the target string, though the action is allowed: 1. Add a character for the string. 2. Remove a character. 3. Swap two or four posts (should be used wisely, we have a chance to swap.)

In the case of the above it is 1. How do we solve such a problem, and what kind of problem is it? I am learning a newbie.

The widely used method of this kind is called Levenshtein Distance.

The WP page also mentions / links other similar concepts. This is essentially a metric of the number of edits required to replace one word in one word.


line - Regex: finding several linebreaks -


नमस्ते मुझे यह html मार्कअप होता है

  & lt; body & gt; & Lt; तालिका सीमा = "0" चौड़ाई = "50%" align = "center" & gt; & LT; टीआर & gt; & LT; टीडी & gt; & LT; केंद्र & gt;  & lt; center & gt;  टैग - यह कैसे काम करेगा  

और मैं लाइनब्रेक के लिए "वाइल्डकार्ड" ढूंढने का प्रयास कर रहा हूं

thx

एक दोहराए जाने वाले लाइनब्रेक को खोजने के लिए सामान्य RegEx है "[\ r \ n] + "जिसका अर्थ है कम से कम 1 लाइनब्रेक यह प्रत्येक दूसरे के बाद सीधे किसी भी लाइनब्रेक से मेल खाएगा।


Formatting plain text output for printing? -


This may be a simple question, but I have bare programs with me that show a report in plain text. There should also be a plain text for the report to be loaded in the third party program, the report needs to be printed.

When handling plain text, on what border should I set the line size and the number of rows printed on a print?

It definitely depends on the font used on print, and as long as you Do not control, you can not guarantee that it will print well. For example, in Word 2007, fonts make up blank documents and set the font in Courier New 10pt only fits 77 characters per line and 28 lines per line. Changing margins and line differences will modify this, however, if you have used it and try to print it with WordPad, this will not work as the default per line with courier New 10pt fits only 72 characters. In either case, standard 80 characters do not work. These defaults are also not global defaults.

The best you can possibly do is choose a size and provide instructions to print the report with many general editors so that it is acceptable. Specify fonts, margins, line spacing, etc.

Have you considered creating two options, like creating two files? Another program may have a plain text for import, another format may be better suited for printing.


webserver - Google Hack Database (GHDB) -


Wikto is a web server evaluation tool when searching for vulnerabilities on the target site, it uses GHDB as a section. Can anyone explain what a GHDB is and how is it useful to find weaknesses?

A database list of queries that reveal the known issues with software running Google hacking database websites There are some disturbances that expose such information that you do not want public reading (password, etc.).

This is not hacking you, you understand. While browsing the sites, Google is the only thing raised.

But changing the scanner depends on what Google can see, which will not be great for security analysis. Without looking very closely, I use patterns in Imaging Vico GHDB and test them against my site. If you find matches, you may have a problem.

This is not a test for real exploitation which is a real issue and will generally leave you more open.


Is there any file that accurev reads when login? -


In linux, I need to log in once to enter, PS1 changes in the following:

Suppose paths ~ / myfiles / accurev / ws / myworkspace

  & lt; Username & gt; @ & Lt; MachineName & gt; My workplaces located in : ACCUREV & gt;  

Therefore, when I ~ / myfiles / accurev / ws / myworkspace / myproject1 / org / daz / from the CD, then be PS1:

< Previous> & lt; Username & gt; @ & Lt; Machine name & gt; : ACCUREV / myproject1 / org / daz & gt;

You can use the data to drag accurev info It may stop, but it may be annoying at every prompt load because the command takes a few seconds to complete. You may get angry by thinking that your PWD has changed and can only be run when changing the directory. For example, a way to get your PWD path relative to the 'top' of Aquarium information is:

  PWD | Cut-b_accurev information 2 & gt; / Dev / null | Grep Top | Awk '{print $ 2}' | | Wc -c | Awk '{print $ 1}' `- 2> gt; / Dev / null  

You can leave it in PS1, but then each prompt will take 1-2 extra seconds. If you wanted to do this only on directory changes, then you might use PROMPT_COMMAND to work but only if PWD! = OLDPWD .

achievable? Yes. Worth it? it's hard to say.

Oh, and look for your colors as specifically for PS1 definition below. This should give you some ideas.


Testing for equality in a two-dimensional array in Java -


How do I find all the matching elements in a two-dimensional array in Java?

In fact you simply repeat through rows and columns, check whether the contents of the addressed cell are both The matrix is ​​similar (!) And the result is another matrix, which is the result of your operation.

Do not forget to apply the mandatory check for the matrix, else the algorithm will definitely crash if you provide 'illegal logic'.

Variation: If you need Java primitives (int or float), change the type of array and do not use equal to compare but == operator. Personal Boolean [] Find matches (object [] [] array 1, object [] [] array 2) {if not (not comparable (array 1, array 2) {returns tap;} boolean [] [] results = new boolean [ Array1.length, array1 [0], length]; (int row = 0; row & lt; array1.length; line ++) {for (int column = 0; column & lt; array1.length; column ++) {If (array1 [row] [column] .equals (array2 [row] [column]) {result [line] [column] = true;}}} return result;} private boolean not identical (object [] [] array1 , Object [] [] array 2) {// dummy implementation - add here your check to guarantee here Make sure the arrays are not empty, empty and return false in each line in the same size;}


html - Embed Flash Transparent FLV -


I am trying to embed a flash movie (.flv) with a transparent background in a webpage.

Requirements: - Flv runs in transparent mode - I should be able to see the contents below. - Movie is not Auto Play - Movie is fully used in DEV and POSZEND using CSS - no video control or overlay, you should not know that it is a flv - Load is hidden on Movie - jQuery By using, I click to show an image link and play video, prevents it from clicking again and hides the video - Contrary to the contrary

I have a longer video player Used to use swfobject.js and javascript controls but there is no happiness. The video is not transparent and there is still a click to control the feature.

Do I seem to be a simple task. >

Adobe Flash embed parameters are set correctly and wmode = transparent

Any help would be greatly appreciated.

Cheers Paul

This will give you a transparent overlay in Flash. It has a very good code.

SWFObject example

The examples given below require the use of bare bones of SWFObject, but what would you do to offer the Flash plug-in Want to use some other parameters? SWFObject makes it very easy to add any additional parameters that you may need.

A simple example by adding a few extra parameters

  & lt; Script type = "text / javascript" & gt; Var then = new SWFObject ("Movie. Swf", "Charmovie", "200", "100%", "7", "# 336699"); Therefore.Dipam ("Quality", "Low"); So.addParam ("wmode", "transparent"); Therefore.Deparam ("Lolin", "T"); So.write ("flashcontent"); & Lt; / Script & gt; & Lt; Div id = "flashcontent" & gt; & Lt ;! - Insert the image of a place holder here. - & gt; & Lt; / Div & gt;  

Edit: Thanks to the clutter: An update has been made to the code library, which you can now access here:


drupal - How does one create product collections in Ubercart? -


I thought I could use the 'attribute' feature for this, but unfortunately, Price shows limited How do I group products together in ubercart (like a group of all glassware made by the same designer) with the option of buying the entire collection or different items?

I believe the productive kit module (sent with ubercart) may be after that Dedicated classification .

Product Kit module allows you to group products in the kit, so that you actually own your cart Instead of individual components, you can add full kit.

Kit creation gives you different options such as:

  • The user can see how the kit is made or not ("Bohemian set" vs "1 x big glass + 1x glass small + 1 x sauce").
  • < Li> User can change individual number of kit elements or only the number of kits purchased ("3 x Bohemian kit" vs "3x big specs + 0x small glasses + 3x sauce").

With a list view and a dedicated classification then you can present the product and kit based on those conditions For example, Bohemian kit plus you can display all the glasses and sauces.

Be careful that the kit is always listed as a "extended" product, when the carriage is turned into an order (i.e.: you will never get "kit" in order, But always "glasses and sauces").

HH!


Is there any opensource high-performance IPC-like msg bus library in c++? -


In my current project, I have a slightly distributed architecture, that is, to perform many executable things, Cooperate with I to make things easier, I hope I have a reliable 'backbone' message: when an executable message is hooked up over the bus, then when a new message arrives Callback can be received. Similarly, it can publish a new message in the bus.

I know that some companies provide off-shelf solutions in this way, however, OSS Is anyone free?

If you do not need Windows support, and your process is not spread on different computers , Then I will definitely take a look.

This is written in Bindings for C & F (according to web page) for "CT, GLIB, Java, C #, Python, etc."

It's quite impressive, too.


jquery.validate plugin - how to trim values before form validation -


I'm using excellent by Jenner Jeffer and I was wondering if there is an easy way to make that form element Automatically valid before trimming?

The following is a cut off, but the work example of a form that confirms the email address:

   & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ () Valid (work () {$ ("# comment form"). Validate ({Rule: {email: {required: true, email: true}}})}}   gt; body & gt; form class = "cmxform" id = "commentForm" method = "get" action = "" & gt; & gt; label for = "cemail" & gt; ; E-mail: & lt; / label & gt; input id = "cemail" name = "email" class = "required email" /> & lt; input class = "submit" type = " Submit "value =" submit "/>  gt; & gt; & lt; / html & gt;  

problem That's why some users are getting confused Because they accidently enter some white space in their email address, eg "Test@test.com" and the form will not be submitted and there will be an error message: "Please enter a valid email address." It is not how whots are given space and they can get out of the site instead of trying to work.

Anyway, I was hoping that the series " JQuery.trim ( Value) "Whitspace before legalization There never has been deleted and validation error?

I can use to create my own email verification work but I'm sure there is a more elegant solution?

I have done this with success.

Instead:

  email: {required: true, email: true}  

I did this:

  email: {required: {dependent: function () {$ (this) .val ($ .trim ($ (this) .val ())); Back true; }}, Email: true}  

Performance Implications when sending large files via HTTPS -


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

जब HTTPS पर बड़ी फ़ाइलों को भेजना (जैसे 10-15 MB) (एचटीटीपी के विपरीत) प्रदर्शन प्रभाव (यदि कोई हो) क्या हैं? (फाइल CSVs हैं) धन्यवाद।

एचटीटीपी HTTP से अधिक सीपीयू गहन है

आम तौर पर बोलते हुए, मैं कहूंगा कि न तो नौकरी के लिए सही टूल है, यह जानने का एक अच्छा तरीका है कि आपके उपयोग परिदृश्य में ठीक है या नहीं। एक संभावित समस्या ये है कि बाधित स्थानान्तरण के सभी सर्वर समर्थन को फिर से शुरू नहीं किया गया है। इसके अलावा, एचटीटीपीएस सामान्य रूप से कोई संपीड़न नहीं करता है

आपको एक अच्छा जवाब मिलेगा।


What determines whether the Powershell pipeline will unroll a collection? -


  # सरणी सी: \ & gt; (1,2,3)। गणना 3 सी: \ & gt; (1,2,3 | उपाय) .काउंट 3 # हैशटेबल सी: \ & gt; @ {1 = 1; 2 = 2; 3 = 3}। गणना 3 सी: \ & gt; (@ {1 = 1; 2 = 2; 3 = 3} | माप)। संख्या 1 # फ़ंक्शन C: \ & gt; फ़ंक्शन असोलमे {$ args} सी: \ & gt; (UnrollMe a, b, c)। संख्या 3 सी: \ & gt; (UnrollMe a, b, c | उपाय)। गणना 1 सी: \ & gt; (1,2,3) .gettype () -ईसी (UnrollMe a, b, c) .gettype () सच है  

हैशटेबल के साथ विसंगति है, हालांकि केवल इसका आंशिक रूप से उल्लेख है ( उदाहरण के द्वारा)।

फ़ंक्शन के साथ समस्या, हालांकि, मेरे लिए समाचार है मुझे आश्चर्य है कि इससे पहले मुझे अब तक काटा नहीं गया है। क्या कुछ मार्गदर्शक सिद्धांत हैं जो हम पटकथाओं का अनुसरण कर सकते हैं? मुझे पता है कि सी # में सीएमडीलेट लिखते समय एक ऐसा स्थान होता है जहां आप स्पष्ट रूप से संख्या को नियंत्रित कर सकते हैं, लेकिन एएएआईआईआई ने पॉश भाषा में ऐसा कोई निर्माण नहीं किया है। अंतिम उदाहरण बताता है कि, पोश दुभाषिया का मानना ​​है कि वस्तुओं के प्रकार में पाइप होने में कोई अंतर नहीं है। मुझे संदेह है कि कुछ ऑब्जेक्ट बनाम PSObject weirdness हुड के तहत हो सकता है, लेकिन जब आप शुद्ध पोश लिख रहे हैं और स्क्रिप्ट भाषा को "बस काम" की अपेक्षा करते हैं तो इसका थोड़ा उपयोग होता है।

/ संपादन /

कीथ इंगित करने के लिए सही है कि मेरे उदाहरण में, मैं 3 स्ट्रिंग तर्कों के बजाय एक स्ट्रिंग [] तर्क में गुजर रहा हूं। दूसरे शब्दों में, माप-ऑब्जेक्ट का कारण यह है कि गणना = 1 कहती है क्योंकि यह एक सरणी-के- arrays देख रहा है जिसका पहला तत्व @ ("a", "b", "c") है। काफी उचित। यह ज्ञान आपको कई तरह से इस मुद्दे के आसपास काम करने की अनुमति देता है:

  एकल वस्तुओं को छड़ी सी: \ & gt; (UnrollMe ए बी सी | मापन)। संख्या 3 # नेस्टिंग सी को संभालने के लिए फ़ंक्शन को फिर से लिखना: \ & gt; फ़ंक्शन UnrollMe2 {$ args [0]} सी: \ & gt; (UnrollMe2 a, b, c | उपाय)। संख्या 3 # स्थिति सी: \ & gt; फ़ंक्शन UnrollMe3 {$ आर्ग्स | % {$ _}} सी: \ & gt; (UnrollMe3 a, b, c | measure) .count 3  

हालांकि, यह सब कुछ समझा नहीं है ...

  # जैसा पहले देखा गया - अगर हम वास्तव में @ (@ ("a", "b", "c") लौट रहे हैं) क्यों नहीं गिनती = 1? C: \ & gt; (UnrollMe a, b, c)। संख्या 3 # हमारे सिद्धांत को इन परिणामों की व्याख्या भी करनी होगी: C: \ & gt; ((UnrollMe a, b, c) | उपाय)। गणना 3 सी: \ & gt; (@ (@ ("ए", "बी", "सी") | उपाय)। गणना 3 सी: \ & gt; ((UnrollMe a, b, cd) | measure)। Count 2  

मैं खेल में एक और नियम का एक्सट्रपलेशन कर सकता हूं: यदि आपके पास एक तत्व है और पार्सर है में, तो दुभाषिया "खोलना" तत्व कहा जाएगा मुझे कोई याद नहीं है?

$ args अनारोल्ड है याद रखें कि फ़ंक्शन पैरामीटर सामान्य रूप से उन्हें अलग करने के लिए अंतरिक्ष का उपयोग कर पास कर रहे हैं। जब आप 1,2,3 पास करते हैं, तो आप एक एकल तर्क में गुजरते हैं जो कि तीन अंकों की एक सरणी होती है जो कि $ args [0]:

  पीएस & gt; फ़ंक्शन असोलमे {$ args} पी एस & gt; UnrollMe 1 2 3 | एक गणना अभिव्यक्ति (या subexpression जैसे  $ () ) के भीतर परिणामों को (एक सरणी) डालने के लिए यह फिर से अनदेखी करने के लिए इसे फिर से पात्र बनाता है: UnrollMe द्वारा लौटे 1,2,3 वस्तु वाले [] को अनारोल्ड करता है: 

  पीएस & gt; ((UnrollMe 1,2,3) | उपाय) .कौरा 3  

जो समतुल्य है:

  पीएस & gt; (1, 2, 3) | माप)। 3 अंक  

बीटीडब्ल्यू यह केवल एक तत्व के साथ सरणी पर लागू नहीं होता।

  पीएस & gt ; ((1,2), 3) | किसी सरणी पर पहले से ही एक सरणी है पर सरणी subexpression ( @ () ) का उपयोग करना {{$ _। GetType}। नाम} वस्तु [] Int32  

कोई प्रभाव नहीं चाहे कितनी बार आप इसे लागू करते हैं :-) यदि आप अनारोल्ड को कोमा ऑपरेटर का उपयोग करना रोकना चाहते हैं, क्योंकि यह हमेशा एक अन्य बाहरी सरणी बना देगा जो अनारोल्ड हो। ध्यान दें कि इस परिदृश्य तुम सच में unrolling को नहीं रोकते हैं में, आप बस एक बाहरी "आवरण" सरणी है कि अपने मूल सरणी, उदा, के बजाय unrolled हो जाता है शुरू करने से unrolling के आसपास काम:।

  पी एस & gt; (, (1,2,3) | उपाय)। अंक 1  

अंत में, जब आप इसे निष्पादित करते हैं:

  पीएस & gt; (UnrollMe ए, बी, सी डी) | आप देख सकते हैं कि UnrollMe दो आइटम (ए, बी, सी) एक सरणी के रूप में और एक स्केलर के रूप में घ देता है। उन दो वस्तुओं को पाइप लाइन को अलग से भेजा जाता है, जिसके परिणामस्वरूप गिनती 2 है। 


jQuery - Syntax Error -


I am using the following to identify the currently selected (active) link in the site:

< Pre> $ (function () {var path = location.pathname.substring (1); if (path) $ ('# sidebar_content a [@ href $ =' '+ + path +' "] '). Atr ('class', 'selected');}); It appears to correctly identify the path, but it also generates an error.

Error: : Syntax error, unrecognized expression: [@ href $ = "/ Ohs_north_carolina"

The source of the page does not show that the class is added to the link.

Appreciate some help.

Thanks.

[@ attr] remove style selectors in jQuery 1.3 Remove the @ symbol and it should work.

  $ ('# sidebar_content a [href $ = "' + + path + '"]' ). Attr ('class', 'selected');  

to:

Note: jQuery 1.3 [@attr] style selectors have been removed Was (they first demoted in jQuery 1.2 े).

Just remove the '@' mark from your selectors.

line - VBScript: Function parameter list too long? -


I got a function:

 enter  function in Progressions (first name, LastName, Street1, Street2, City, State, Zip, x, y, z, a, b, c, d, e)  

When I try to compile this function , Then the "Required Identifier" error, however, if I shorten the list of parameters, then it works fine.

Is such a long list of parameters?

I thought that VBSSPT does not care how long a line goes ..

Is there a way to break my parameter list in 2 lines?

I tried to use an underscore, but there is no benefit.

OK ... It has been found that the length of the parameter list was not the issue. The issue was that one of my parameters was called "type" and I think there is a reserved word in VBSPRT. Of course, the readpad does not show me at all ...

Thanks anyway!


flex - Adding annotations to a PlotChart -


I'm looking to add text annotation (and delete, dynamic) to PlotChart. Especially I want to annotate plot points in the chart. I am currently using Circle ITEM Renderer for points.

I have found a tutorial for other conspiracy types, but they are not applying to Plotchart.

Someone has an example, or can point me in the right direction.

The usual way to do this kind of thing is to add an example of the Cartesian data cast, Property This line is for charts, but the principle is similar to any Cartesian chart.

Here also one.


best method to manipulate array keys in PHP -


I have an associative array, I need to add ':' at the beginning of all the keys. Will it be the fastest / straightforward way of doing this?
And what would be the most effective way to do this?

The easiest way would be to create a new array:

  $ NewArray = array (); Forex currency ($ key as $ key = & gt; $ value) {$ newArray [":" $ of] = $ value; }  

visual studio - Set #include directory from C++ code file -


MSVC ++ में आप हमेशा

 #pragma टिप्पणी (lib, "libname.lib") कर सकते हैं < / Pre> 

परियोजना विकल्प संवाद के साथ नगण्य के बजाय, एक कोड फ़ाइल से एक पुस्तकालय लिंक करने के लिए।

मैं "अतिरिक्त शामिल निर्देशिकाएँ" जोड़ने के लिए एक रास्ता खोज रहा हूँ से परियोजना सेटिंग्स / कॉन्फ़िगरेशन गुण / सी, सी ++ / सामान्य / अतिरिक्त निर्देशिकाओं को शामिल करने के बजाय कोड फ़ाइल

क्या ऐसा करने का कोई तरीका है?

यह संभव नहीं है यदि आप पहले से जानते हैं कि जब आप कोड लिखते हैं तो हेडर संग्रहीत होते हैं, तो आपको #include डायरेक्टिव में पथ को शामिल करना चाहिए।


asp.net - Storing a SHA512 Password Hash in Database -


In my asp.net web application, I am hitting my user password with SHA512.

Despite that SO'ing and Googling is not clear how I should store them in the database (SQL2005) - shows the basics of the code below how I made a string as a string And I'm currently putting it into the database, in the form of a variable (88) column it seems that continuous length is prepared

keeping it in the form of string is best The way, if it is So always SHA512 will have 88 characters (as I have seen some strange stuff on Google)?

  dim biointeput byte () = encoding.utf8 Dim Hash Hasish Algorithm = New SHA 512Manageet () Dim CINSRTO Database String = Convert as GetBytes (SSLL and SINTP). Tubes 64 string (hash. Compute hash byteInput))  

SHA512 output 512 bits, or 64 bytes. You can store those 64 bytes in those biometry columns, if you want

If you want to handle the hash outside of your application, then Base 64 string is more comfortable to store, as The Base 64 connects approximately 33% of the continuous overhead, so you can expect that the string is always 88 characters.

It has been said, there is a Biltin in ASP.Net, which should be used.


ruby on rails - Creating and editing my element instead of using `new` -


So, basically my 'index' action is a long list of elements of the elements in the form of a table of rail, Each one has a checkbox near it. These elements are items in a list that contain line items in a quote.

A user can like multiple checkboxes, then click a button that says "Create a new quote" Cloning items that are checked, clone them in a new table so that they differ from the bid - Can edit them in different ways.

I think that when this list is really long, then 6000 records say that to load the horrible long list, so I want to put a score on the page, but! My checkbox will not work because users change the page, because they will move away.

Additionally there is no way to get the user back to this page so that they can add more items for the quote.

My first thought was that when they browse this "index page and basically meet the user, then create a new element while editing the quote".

Any ideas on this implementation? I stuck a little bit on how to start implementing it

This classic shopping cart type has trouble. You may want to read the session along with the session on implementing those people in the Rail. The simple example is to use a user's session. You can either construct a class by explaining the argument, or simply use a hash or array to catch that AIDS. So when the user clicks on "Start new quote" you can set var to clear var in your session:

  session [: new_quote_items] = []  

Then when they check the item, you can get a link to add them to the bid. You can then place those IDs in the array. On the page display of potential quotation items, you can show the user what to check, and then add / remove the ID from this list. Then when a user is done, they can click on a full link which will take ID from the session and now you have the quote.


c# - How to copy all datatables from one dataset to another with 2 differents db connection? -


Suppose I want to access the sample code of MS Access from MySQL to do this? Of course, this schema has to be kept in mind due to lack of account. Thank you.

Unless you have a good reason to do so (such as a process that needs to be done Is repeatedly), I will use MS Access "Import" process instead of coding a solution. It is very easy

Better yet, if you want a live link that never gets imported again To be used, directly linked to MySql tables by using the linked Tables feature Not.


orm - 3-tiered web-service enabled architecture -


After reading many articles on the Net about best practice application-designs and patterns, I still have all the information in one Can not merge with my real-word application on the map ...

I have to apply a 3-tiered application:

  • UI-Layer:
    ASP.net - A Silverlight-application hosted within the webpage

  • BusinessLogicLayer:
    WCF-Services / .NET RIA services are underway
  • < / Li>
  • , I do not know where my business object should be placed and where to fill them with data

    should be another layer, in which all of my There will be business items, so that they can be used in all 3 layers?
    Or should I put them in my BLL and call NHHNET-methods in DH - but then will I have circular dependencies between BLL and DAL? Is it not "highly architecturally" if I present "DataAvst Objects" inside DAL and I can copy all the properties in Business Objects in BLL?

    Any help appreciated!

    Best regards, Daniel Long

Business objects go into business layers These objects Is used by the UI layer, and the data layer is used to populate the phone methods themselves.

In general, objects in one layer only call methods in their own layer or just one down.

One of the motivations is to be able to change one of the layers without changing the other. For example, there may be a different way of presenting the UI, using similar methods from the business layer Or maybe, the database can be changed, as long as there are methods similar to the old methods in the new data layer.


http - TypeError: ListControl, must set a sequence (python error) -


I am using Python mechanisms to open a website, filling out a form and submitting that form. It really is very simple, it works until I come in the radio button and the "selection" input box.

  br.open (url) br.select_form (name = "postmsg") br.form ['subject'] = "Is it good for the holidays?" Br.form ['message'] = "I'm new to technology." Br.form ['E'] = '0' br.submit () br.form ['e'] = '0' file "Build / BDIS.Lennx-X86_64 / Eggs / ClientForm UP", in line 2897, __setitem__ file "build / bdist.linux-x86_64 / egg / clientform.py", __setattr__ file in the line _______ "build / bdist.linux-x86_64 / egg / clientform.py", line 2100, _set_value in type error: list control, Set a sequence  

Why did I get this error? Why can not I set e like a text box? (E is a radio button)

EDIT: This is according to web developer.

  element index id name type value label size maximum length state 0 subject subject text 35 2 message message text recognition 3 identification identity 1 13 action_btn hidden 14 _charset_ hidden 16r hidden / stock_ (a_tov_j) / Stocks_g 9e radio 0 was checked 8 e radio 1 15 .Chrome hidden 1 N 1 U3 MQ 3 7 E radio 2 17 bn hidden 25263 6 e radio 3 5 e radio 4 4 e radio 5 12 Submit SubmitSendal Cancel Cancel 1 mbpostthreads Thread Button Check current topics first 11 SubmitPost SubmitPost Submit Post Messages 10 Radios Free Online - United States - Archive for Europe Area - Radio Button and Checkbox Different behaviors are different elements, depending on their name and ID .  

If the item has the same name, try doing this:

  br.find_control (name = "E"). Value = ["0"]  

Another option is:

  form.find_control (name = "E", kind = "list"). And finally, it can work:  
  br ["e"] = ["0"]  

(I have not done mechanization in a while, so I do not remember at all).


asp.net - Dynamically retrieving UserControl's Virtual Path -


मेरे पास एक प्रोजेक्ट फ़ाइल में अलग फ्रंटएंड और Codebehind / वर्गों एक पूरी तरह से अलग कक्षा पुस्तकालय में विभाजित। UserControl Type से, यह VirtualPath प्राप्त करने के लिए मुझे किस प्रकार की आवश्यकता है।

आमतौर पर, हम इसे कोड में रखते हैं

<पूर्व> बोर्ड uc = (बोर्ड) पृष्ठ। लोड नियंत्रण (@ "~ \ बोर्ड.सकैक्स");

लेकिन मैं चाहता हूं कि ऐसा कुछ

  बोर्ड uc = (बोर्ड) Page.LoadControl (Board.VirtualPath);  

OR

<पूर्व> बोर्ड uc = Page.LoadControl (बोर्ड);

किसी को भी एक विचार है कि मैं इसे कैसे पूरा कर सकता हूं?

पहले से धन्यवाद:)

एमवीसी फ्रेमवर्क गलत है।

मुझे लगता है कि आप नियंत्रण को लोड करने की कोशिश कर रहे हैं, जबकि आप शायद आंशिक दृश्यों के बारे में सोच रहे हैं।

आम तौर पर, यहां एमवीसी भूमि में, आप & Lt;% एचटीएमएल.पार्टीएलव्यू ("आंशिक दृश्यमान", मॉडल); % & Gt;

आप WebFormViewEngine amd PartialViewLocationFormats का उपयोग आंशिक दृश्यों के साझा स्थान निर्दिष्ट कर सकते हैं।

आप अपने दृश्य से यह भी कह सकते हैं कि & Lt;% एचटीएमएल.पार्टीएलदृश्य ("~ / views / myController / PartialViewName", मॉडल); % & Gt;

मैंने किसी MVC अनुप्रयोग से LoadControl का उपयोग करने वाले किसी को नहीं देखा, या सुना है।

आप अपने खुद के एचटीएमएल हेल्पर्स भी बना सकते हैं वेब नियंत्रण लेकिन इनमें से कोई भी LoadControl का उपयोग नहीं करता है।

लगता है जैसे आप अपने वेबफ़ॉर्म नियंत्रणों का पुन: उपयोग करने का प्रयास कर रहे हैं मैं संभवत: अपने वेब नियंत्रणों को एचटीएमएल हेपरर्स या वेबकंटोलॉल्स में कनवर्ट करना चाहता हूं। रिसर्च एमवीसी वेब कंट्रोल्स।


c# - get the value from one master to another -


Iam using the dropdown list in a master page. I want to get a dropdown list value in the session and I want to use it in any other master page.

How to do this.

To enter the selected value in the session, you can do something like this:

< Pre> safe void ddlMyDropDown_SelectedIndexChanged (object sender, EventArgs e) {session ["MySelectedValue"] = ddlMyDropDown.SelectedValue; }

This key stores the value selected in the session with "MySelectedValue".

When you want to read it back, you can:

my string = "[MySelectedValue"]
< P> It may be an idea that wrap your access to a class in the session, so that everyone can be typed strongly, and allows you to add verification or other logic:

  // session data fully accessed for public class MySessionData {// logged in user's current user name sub Yogener names are, otherwise void Public string MyUsername {get {return session ["MyUsername"]; } Set {session ["MyUsername"] = value; }}}  

ms access - SQL Date Interval -


I have a table of MS Access that has a start date and an expiry date, how do I use a line from the table using SQL How to remove when the difference between two intervals to reach 6 months? I do not have to give date by me, I need this because I am asking ... any help plas? Use

to:

  from your_table where the date is in date (" 6 months and older for the record:  
  your_ table from where to remove DateDiff ("m", "m", start date, end date) = 6  

Start date, end date) & lt; = 6


javascript - how to render a .htm page into .aspx page -


I have an ASPX page, which is to be rendered. How can I get an Htm page

If possible, I want the added feature which I want to call after that JavaScript. .html page is translated

pls help

If you only have basic To serve the file, you can do the following:

  feedback. clean (); Response.WriteFile (localPathToHtmFile);  

As you would like to modify it instead, and assuming you need to adhere to the full file, you have to do some light purse when you want to add that script. Page loads in browser Instead of using WriteFile, you want to type the modified string in the response.

Another option, if you can only include html within that file, then load it into a lexical control. Then you have regular options for sending / sending scripts you want to run on page load.


c# - find controls in TableLayoutPanel -


निजी टेबल लेआउटपैनेल बनाएँलेआउटपैन () {pTablePanel = नया TableLayoutPanel (); PTablePanel.BackColor = System.Drawing.SystemColors.ButtonFace; PTablePanel.ColumnStyles.Add (नया कॉलम शैली (आकार प्रकार। एसेटोल्यूट, 30)); PTablePanel.RowStyles.Add (नया पंक्ति शैली ()); PTablePanel.Size = नया सिस्टम। ड्रॉइंग। आकार (165, 223); PTablePanel.Location = नया सिस्टम। ड्रॉइंग.पॉइंट (9, 14); PTablePanel.TabIndex = 0; pTablePanel.Controls.Clear (); PTablePanel.ColumnCount = 2; वापसी pTablePanel; }

<पूर्व> पिक्चरबॉक्स पेंट; निजी शून्य AddtoPbx (छवि im) {try {pict = new PictureBox (); Pict.BackColor = System.Drawing.Color.Blue; Pict.Padding = नया पैडिंग (2); Pict.Image = m; Pict.Width = 100; Pict.Height = 60; Pict.SizeMode = PictureBoxSizeMode.Stretch छवि; चेकबॉक्स chkBx = नया चेकबॉक्स (); ChkBx.Name = "चेक इमेज"; ChkBx.Location = नया सिस्टम। ड्रॉइंग.पॉइंट (40, 40); PTablePanel.Controls.Add (chkBx, 0, iCount); PTablePanel.Controls.Add (चित्र, 1, iCount); iCount ++; PTablePanel.AutoScroll = true; System.Threading.Thread.Sleep (50); pict.Focus (); STA_gbxImages.Controls.Add (pTablePanel); } पकड़ (अपवाद पूर्व) {}}

यहाँ मैं एक पंक्ति में chkbox और छवि भी जोड़ूंगा .... अब मेरी समस्या यह है कि अगर chkbox चेक होता है तो मुझे ccorresponding जोड़ने की आवश्यकता है छवि को अन्य संग्रह में .... यह कैसे करें कृपया मेरी मदद करें ...

गतिशील बनाते समय नियंत्रण, उन्हें सीधे रूप में शामिल न करें बस एक प्लेसहोल्डर नियंत्रण डालें और इसे अपनी मेज जोड़ें उसके बाद, अपने प्लेसहोल्डर से FinfControl () का उपयोग करें: PlaceHodler1.FindControl ("table1")


How to get the number of words in Jquery form validation plugin? -


This tag has input box validation. A poster can combine multiple words into one-word, used to isolate the location tag. I use the Jquery Farm Verification Plugin to validate the form. To validate the tag input box, I need to add an optimized method to this code:

  $ .validator.addMethod ("tagcheck", function (value, element) {return value & Amp; value.split (""). Length & lt; 4;}, "input on maximum 3 tags.");  

But what if there are two places between two adjacent words?

You can use a regular expression for your string:

  $ Validator.addMethod ("tagcheck", function (value, element) {return value & amp; value.split (/ \ S + /). Length & lt; 4;}, "input on maximum 3 tags.");  

\ s + will match one or more white space characters, including space, tabs, form feeds, line feeds.


java - Android OnLongClickListener not firing on MapView -


I have just registered an onlineclicklist on my My Maps view on an Android app, which I am currently writing.

  Applies to the public-class FriendMapActivity MapActivity OnLongClickListener {Private Static last int CENTER_MAP = menu.update; See a private map map map; Map Controller of Private Map Controller; // ... private boolean doCenterMap = true; /** Called when the activity is first created. * / @ Override Crate on Public Zero (Bundle Saved Instantstate) {Super. Contents (Saved Instantstate); SetContentView (R.layout.friendmapview); This.mapView = (MapView) findViewById (R.id.map_view); This.mapController = mapView.getController (); MapView.setBuiltInZoomControls (true); MapView.displayZoomControls (true); MapView.setLongClickable (true); MapView.setOnLongClickListener (New OnlineClicklist) {Public Boolean On Longclick (see V) {// Never Returns Url; False Return;}}); // ...} Override public boolean on @KeyDown (intccode, key event event) {switch (keycode) {case of event. KEYCODE_3: mapController.zoomIn (); break; Kyle Kyle. KEYCODE_1: mapController.zoomOut (); break; } Return super.Condondon (keycode, event); } @ Override Public Boolean Dispatch Touch Event (Motion Avene Eve) {int action type = ev.getAction (); Switch (action type) {case MotionEvent.ACTION_MOVE: doCenterMap = false; break; } Return super. Descapture Event (Eve); } ...}  

May the overlay which is adding the cause of the problem to me ?? Any suggestions?

I just ran into this problem I tried the solution given above, but it A lot of <100% do not work, we want the press action to fire for a long time, even if the user is still holding a finger.

Similarly, I have implemented a solution using a handler and delayed work - as a side note, I have used a similar type of implementation, but in reverse, touch / touch / Zoom control to show zoom control.

Private handler mHandler = new handler (); Private Finals Runable mTask = New Runnabal () {@ Override Public Wired Run ()} // {Your Code Here}}; @ Override Public Boolean On Touch Event (Motion Avenger Eva) {if (ev.getAction () == MotionEvent.ACTION_DOWN) {// Start the start time, start the timer mEventStartTime = ev.getEventTime (); MHandler.post delimited (mTask, LONG_PRESS_TIME); } Else if (ev.getAction () == MotionEvent.ACTION_UP) {// Record the end time, do not show that long enough is not enough mEventEndTime = ev.getEventTime (); If (mEventEndTime - mEventStartTime & lt; LONG_PRESS_TIME) {mHandler.removeCallbacks (mTask); }} And {// proceeding, panning, etc. Do you want to // that you count it as a long press - mEventStartTime = ev.getEventTime (); MHandler.removeCallbacks (mTask); MHandler.post delimited (mTask, LONG_PRESS_TIME); } Return super. Tontivent (Eve); }

How Decimal places are converted using FLOAT in SQL Server 2000/2005/2008 -


In this, the OP wanted to leave 0 in decimal places for its results. Now I had to cast the example below (below) with DCIMIL, then CAST with float. Use

like

  Cast (0.55 AS Float)  

Use the example above and run it in SQL Server 2005/2008 Seems to be getting the correct result of 0.55. But as Peter said in the second post, it generates 0.550000000000004 in SQL Server 2000.

So my questions are:

  • Float should be deferred, it comes to data conversion in SQL?

  • Why cast (0.55 in the form of flaps) yields 0.5500000000000000004 in SQL2k yet 0.55 In the later editing?

  • Is Microsoft using Flat more reliable in later versions of SQL Server?

  • My personal rule is: Avoid Float In recent years, I can not use float myself.

    All the business scenarios I had taken had to store the values ​​of money either with a certain precision, so I used to DECIMAL or money .


Android: Render a string in an imageview -


Is there any way to provide string processing ( strings.xml ) in an image view ?

Thanks

The easiest way to do this is to start an image view in the image The text can be the same if it is undesirable for some reason, you can only use one analog layout to replace a TextView image above the image and then show it properly or hide it.


.net - Images and Geometry in C# -


I am developing an application that loads an image, and then I want to draw some points with the mouse. To mark above. These points should be at a different level, i.e. i do not want to modify image data.

What is the best way to do this? I was thinking of using Direct X, but I have seen that it is a bit obsolete. Does GDI + solve?

Thanks in advance

How about this?

& lt; Border & gt; & Lt; Border.Background & gt; & Lt; ImageBrush ImagesSource = "foo.jpg" /> & Lt; /Border.Background> & Lt; Canvas background = "transparent" /> & Lt; / Border & gt;

Display the image in the background and paint your point on a canvas which is located at the top of the image.

Edit: This looks in C #:

  Boundary limit = new border (); Canvas canvas = new canvas () {background = brush. Transpress}; Grid.AddChild (range); Limit. Children = canvas; Limit. Background = new imagebrush ();  

Then you only need to load your image to the limit. Backgill wrapped in an imagebrush.


asp.net - Telerik RadComboBox javascript API problem -


I am having trouble using RadComboBox's JavaScript API and not, I have jQuery or any other There is no power to switch over the setting. It is enough to say that now there is no hair left on my head: P

In short I selected the selected index of a RadComboBox I want to capture, and want to update another RadComboBox in this index. for example. First, the selection of a value in RCB automatically updates the other on the client side. My problem is actually that I do not find any way to set the index on the other RCB, even if the docs says that there is an easy way to do this .. (you have heard that the first is correct)

I have followed API docs on this page (), and I've used the excellent firebug in JavaScript debugger and Firefox in IE8. I'm techie vibe I am using the UI assembly version 2009.2.826.20

I do not need a complete source to solve, but pointing to the right direction would be greatly appreciated! :)

Here are some example codes I have cooked together:


  ; Var index = item.get_selectedIndex (); DetailCB.SetSelected (index); // method does not exist, but should be in accordance with docs.} & Lt; / Script & gt; & Lt; Div & gt; & Lt; Taylor: RadComboBox ID = "MasterCube" Runat = "Server" OnClientSelectedIndexChanged = "masterChanged" & gt; & Lt; Items & gt; & Lt; Taylor: RadComboBoxItem Text = "One" Value = "1" runat = "server" /> & Lt; Taylor: RadComboBoxItem text = "two" value = "2" runat = "server" /> & Lt; Taylor: RadComboBoxItem text = "three" value = "3" runat = "server" /> & Lt; / Item & gt; & Lt; / Telerik: RadComboBox & gt; & Lt; / Div & gt; & Lt; Div & gt; & Lt; Taylor: RadComboBox ID = "DetailCB" runat = "server" & gt; & Lt; Items & gt; & Lt; Taylor: RadComboBoxItem Text = "One" Value = "1" runat = "server" /> & Lt; Taylor: RadComboBoxItem text = "two" value = "2" runat = "server" /> & Lt; Taylor: RadComboBoxItem text = "three" value = "3" runat = "server" /> & Lt; / Item & gt; & Lt; / Telerik: RadComboBox & gt; & Lt; / Div & gt; & Lt; / Form & gt;  

I do not need a complete source to solve, but a kick in the right direction will be highly appreciated! :)

Many thanks for Veselin Vasilev and Steefet for your input, JS debugging and Diet Cup coffee After many hours I found it to work with IE8 and FF3.5.

The correct JavaScript event handler to update the parallel radcombobox (answer to the selected combination of indexed indexes):

  Function MasterChat (Sender, e) {Var detailCB = $ find ("& lt;% = DetailCB.ClientID%>"); Var item = e.get_item (); Var index = item.get_index (); // Receive individually allDetailItems = detailCB.get_items (); Var itemoutEx = all the delitititis.GetItim (index); See detailed in item // See CB item.inx Selection (); }  

By making multiple calls on one line it can definitely be small, I can have a way to do this with less code like this, but I have to do almost everything Tried and this is the only solution that works for me.


Enums in Scala with multiple constructor parameters -


I am writing my first big scala program. In Java equivalents, I have a UI that stores labels and tooltips for my UI controls:

  Public NIL ControlText {CANCEL_BUTTON ("Cancel", "Cancel Change" and Dismiss the Dialog Do "), OK_BUTTON (" OK "," Save changes and dismiss dialog "), // ...; Private last string control text; Private end string tooltip text; ControlText (string control test, string tooltip text) {this.controlText = controlText; This.toolTipText = toolTipText; } Public string getControlText () {return controlText; } Public string getToolTipText () {Return Tool tip text; }}  

Never try to use enums for this, there are other places that I want to talk about.

How can I do this by using Scala? Calculation. Value class takes only one string as a parameter. Do I need this sub-class?

Thank you.

You can do what matches are used:

 < Code> Sealed Abstract Class ControlTextBase Case Class ControlText (controlText: String, toolTipText: String) Object Okbutan ControlText ("OK", "Save Changes and Dismiss") Object CancelButton Control Text ("Cancel", "Bull!") Increases  

c# - Linq to DataTable without enumerating fields -


I am trying to query a DataTable object without specifying the field like:

 Var linqdata = Select itemData.AsEnumerable () from ItemA ItemA  

but the type of return is

  System.Data.EnumerableRowCollection & Lt; System.Data. DataRow & gt;  

and I need the following return type

  System.Data.EnumerableRowCollection & lt; & Lt; Object, object & gt; & Gt;  

(like standard anonymous type)

Any ideas? Thank you

If I understand you correctly, you want to get a collection of objects, t Need to define in your code, but it is usable to use it in a strongly typed fashion. Unfortunately, no, you can not.

A anonymous type looks like any type of type or dynamic object , but it is actually a strongly typed Is a class, which is defined in time compilation. .NET automatically defines the type behind the scenes for you. For .net to be able to do this, there should be some clue with that code with which the definition of type can be estimated. It will have something like this: ItemA.Item ("name"), ItemA.Item ("email") from ItemA in ItemAdata.AsEnumerable ()

So it knows what the members have to define. There is no way to get around it, the information must be for an anonymous type to be rationally defined.

Depending on why you are trying to do this, there are some options.

  • If you still want intellisense while increasing your data access, you can return XML instead of a datatable to your encoded data access class. (You can easily convert the data table to XML. You want to like the new System.Xml.Linq sections. They are very good!) Then you can get the VS2 Xsd schema xml again Use / Import the schema at the top of your code page and you have intellisense.
  • If you have a object with properties for your data, but do not want to define a class / structure for them, you should come in C # 4.0 / VB 10 Will love the new dynamic objects . You have an object property based on SQL, but you will not be intelligent. There is also a display cost for this, but (A) that does not matter to your situation and (b) this is not really so bad in some situations.
  • If you are just trying to avoid too many classes, consider defining Stront / structures on the same code file below your class definition. When you add more columns to your result set, adjusting a structure with more public areas is easy.

In short, you can have two in the following three: (A) dynamic, (b) strontally-typed object, (3) intelligence, but not all three.


Portion of my php is displaying in the browser -


I am trying to add a php to send a website when the user clicks on a submit button. For some reason, a part of my php is appearing in the browser and I do not know why I have seen the information and tried to check my quotes and things like that, but I do not know that its one What would be the reason for displaying part as text.

screenshot of PHP

  & lt; Php $ action = $ _ request ['action']; If ($ action == "") / * contact form * / {? & Gt; & Lt; Form id = "contact-form" action = "" method = "post" encrypt = "multipart / form-data" & gt; & Lt; Div class = "row" & gt; & Lt; Label = "name" & gt; Your name: & lt; / Label & gt; & Lt; Br / & gt; & Lt; Input id = "name" class = "input" name = "name" type = "text" value = "" size = "30" /> gt; & Lt; Br / & gt; & Lt; / Div & gt; & Lt; Div class = "row" & gt; & Lt; Label = "email" & gt; Your Email: & lt; / Label & gt; & Lt; Br / & gt; & Lt; Input id = "email" class = "input" name = "email" type = "text" value = "" size = "30" /> gt; & Lt; Br / & gt; & Lt; / Div & gt; & Lt; Div class = "row" & gt; & Lt; Label = "message" & gt; Your message: & lt; / Label & gt; & Lt; Br / & gt; & Lt; Textarea id = "message" class = "input" name = "message" rows = "7" cols = "30" & gt; & Lt; / Textarea & gt; & Lt; Br / & gt; & Lt; / Div & gt; & Lt; Input id = "submit-button" type = "submit" value = "send email" /> & Lt; / Form & gt; & Lt ;? Php} Other / * Send submitted data * / {$ name = $ _ request ['name']; $ Email = $ _ request ['email']; $ Message = $ _ request ['message']; If (($ name == "") || ($ email == "") || ($ message == "")) {echo "All fields are required, please fill the form again."; } And {$ from = "to: $ name & lt; $ email & gt; \ r \ n return-path: $ email"; $ Theme = "Message sent using your contact form"; Mail ("email@gmail.com", $ theme, $ message, $); Echo "Email Sent!"; }}? & Gt;  

Why is this being understood ...

Meditation Given how the code part is only a bit in your code after and is ? Specifically & gt; .

When you open a PHP file in your browser, most PHP codes will not be shown by the browser except by a large, invalid HTML tag and the visual source and document inspector tool, without processing it on the server. . However, since your code has & gt; , it marks the end of the "invalid HTML tag" and anything after the page appears.

To fix this, use a server! PHP has a built-in form of 5.4, so if you installed it on your machine, you can open a command line in your PHP root folder:

  php -S localhost: 8000  

Then open a browser and go to http: // localhost: 8000 / yourfile.php and it will run. Nifty!


ios - Button with multiple functions (swift, Xcode 6) -


H, I have a button, which many functions I I choose App Your Own Adventure, Fei I started " play "button will keep a button, when changes are made it click not only text (I've changed the function it worked). I think this story would like to pursue "story" is a label the top part of the screen, that when the button is pressed, I would like to change. I can change it once, but I would like to change it when the button will be pressed for the first time. How would I go about doing this? The way I am a newcomer to the particularly rapid programming I