Posts

Showing posts from September, 2013

uniqueidentifier - How to Generate Unique ID in Java (Integer)? -

How can I create an unknown ID that is an integer in Java that does not accept the next number? How should this be unique? If it is unique only in a process, you can make a call using one each time you need a new value.

Which functional programming language should I choose as first functional programming language? -

I would like to learn a functional programming language to look at a different programming pattern. My background programming: Java (I have passed the SCJP exam now), some ruby ​​and very limited rail. I use bash for basic sysadmin functions I use Ubuntu 9.04. As a second goal, I would like to use FP to show children (14-18 years of age) How mathematics and CS are connected, people are very good in programming (they are from the first year Pythonic High School is learning Python and Java). Although the tests show that they have problems with mathematics, basic concepts of discrete mathematics, I think we can develop our math skills by using programming (and possibly my teacher may be the subject of training thesis) I think that a very basic vocabulary will be the best service to this project. itemprop = "text"> If your primary goal is to work with adolescence, Is understood to work with adolescence, and this book (with free online) (aka dosacham) is there. The...

c++ - How to structure data for optimal speed in a CUDA app -

I am trying to write a simple particle system that leverages the CUDA to update the QDA status. Right now I am defining a particle, in which there is an object with defined position with three float values, and one velocity is also defined with three float values. While updating the particles, I am adding a constant value to the Y component of Velocity to emulate gravity, then add the speed to the current state to come up with a new situation. In the context of memory management, it is better to store two different arrays of float to store data or structure in an object oriented manner. Something like this: structure vector {float x, y, z; }; Structure particle (vector position; vector velocity;}; It looks like the size of the data is with the same method (4 bytes float float, 3 plot per vector, 2 vectors per particle , A total of 24 bytes) sounds like OO, more transparent data transfers between CPUs and GPUs will be allowed because I can use a memory copy statement instead o...

webserver - Which Web Server To Setup In University Project Center -

We want to set up and configure a web server for our project center in our university and we have a web server Want to supply PHP, Python and Web Applications based on Aspen? Is there a server supply for all these 3 different platforms? IIS (like Windows Server) can run all 3 ASP.NET can not run anything but Windows, for my knowledge, so that you are a limiting factor.

oracle10g - Help Optomizing Bulk Inserts into Oracle Using VB.NET -

I am inserting a block of 5000 records at a time, right after the second one block command in a different DLL Have been created and can call any of 4 different stored procedures. Is there a bulk method which can accelerate it? Transcription takes about 1.5 MC per record and wants to get around 7 MS from the bottom Thanks, Dave Shared sub WriteCMSMessagesToDatabase (List as feature type, MyValility as ByVal command (System.Data.OracleClient New OracleCommand as a slow Oracle connection, try a new stopwatch as the new OracleConcondation slow _Cmd as the key of OracleCommand. Connection String _Cmd.Connection = oracleConnection _Cmd.CommandType = CommandType.StoredProcedure oracleConnection.Open () _Cmd. Transaction = oracleConnection.BeginTransaction for each ACMD in the form of OracleCommand _Cmd.CommandText = aCmd.CommandText _Cmd.Parameters.C For each aParam, ACMD as Oraclepamator parameter. New OraclePRMMRPMRM = CTEP (CMOD, OracleParameter), _Cmd.Parameters.Add (PRM) Next ...

html - Problems with CSS and styling input tags for a search bar -

The CSS code I'm working with here: #navigation input # Search_bar {background: urls (images / searchbar pages) no-repeat; Border: None; Height: 20px; Width: 156px; Margin: 0; } #navigation input # submit {background: url (images / submit.png) no-repeat; Width: 30px; Height: 20px; Margin-left: -30px; Border: None; } HTML: & lt; Div id = "navigation" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Services & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; About us & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Portfolio & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Contact us & lt; / A ...

unix - When using vim or less in gnu screen, quitting vim or less leaves a lingering imprint -

On my new Ubuntu system, I start a screen session and edit a file in VIM or lower it After leaving me, the screen does not re-prepare itself, but just scrolls to show a command line under all screws which I was just looking at in vim or less. How can I change it so that by leaving the Vim, how can I return to the screen before using Vem before using Wom? The screen's altscreen (optional screen) feature is off by default. Make it your . Add to Screenrc : code see:

oop - Object oriented programming in C -

Image
संभावित डुप्लिकेट: मुझे याद है कि कुछ समय पहले किसी के बारे में (मुझे लगता है कि यह लीनस टॉर्वाल्ड्स था) सीओ + एक भयानक भाषा है और आप सी के साथ ऑब्जेक्ट-ओरिएंटेड प्रोग्राम कैसे लिख सकते हैं, इसके बारे में बात करते हुए मुझे प्रतिबिंबित करने के लिए समय था, वास्तव में देखें कि कैसे सभी वस्तु उन्मुख अवधारणाओं को सी में ले जाता है। कुछ चीजें काफी स्पष्ट हैं उदाहरण के लिए: सदस्य कार्यों का अनुकरण करने के लिए, आप स्ट्रक्क्ट्स में फ़ंक्शन पॉइंटर्स डाल सकते हैं। बहुरूपता का अनुकरण करने के लिए, आप एक फ़ंक्शन लिख सकते हैं जो तर्कों की एक चर संख्या और पर कुछ जादू करते हैं, कहते हैं, sizeof पैरामीटर (s) आप encapsulation और विरासत हालांकि कैसे अनुकरण होगा? मुझे लगता है कि इनकैप्सुलेशन को एक नेस्टेड स्ट्रैट रखने के द्वारा अनुकरण किया जा सकता है जो कि निजी सदस्यों को संग्रहीत करता है। यह काफी आसान हो जाएगा, लेकिन संभवत: प्राइवेट नाम का हो सकता है या संकेत के समान कुछ भी स्पष्ट है कि इसका अर्थ संरचना के बाहर से नहीं किया जाता है आप विरासत के बारे में क्या कर सकते हैं? आ...

php - Determine if a string is a valid geographic location -

I have found a bunch of "places" - some are accurate (Gaborone, Botswana), some geocodes (40.75, -73.9 9 7) and some completely useless (#siliconcape) I have to run through the list and find a way to determine the city and country of each string and geocode, and will have to return the spaces to the invalid places. Is there any type of library / service / API / method can be used to determine whether a given string represents valid geographical location or not? Accounting for errors, ordering errors, etc. Perhaps the easiest way would be to use something like that. It takes a string and tries to parse it at some place. You can get output as XML, JSON, CSV. Here are some examples of CSV output: Input: Gaborone, Botswana Output: 200, 4, -24.6541100,25.9087390 Input: # Siliconcape Output: 602,0,0 , 0 Input: 40.75, -73.997 Output: 200, 8, "324 W30th St. New York, NY 10001, USA"

Qt Show/Hide widget animation -

The widget I'm trying to implement a show / hidden widget animation is QDockWidget and so is inside QMainWindowLayout. Using QPropertyAnimation starts working, I'm seeing something like this: m_listViewDock-> SetSizePolicy (QSizePolicy :: extension, QSizePolicy :: Fixed); QPropertyAnimation * animation = new QPropertyAnimation (m_listViewDock, "geometry", m_listViewDock); Animation-> SetDuration (1000); QRect G = m_listViewDock-> Geometry (); Animation-> SetStartState (g); G.setHeight (80); Animation-> SetEndState (g); Animation-> Start (QAbstractAnimation :: DeleteWhenStopped); Unfortunately this does not do anything. I thought I did not set up my widget layout properly using the designer, but even if I play with the minimum size, I do not even have any results. If I want to play with size then I What kind of size policy should you use? I'm stuck, it would be great if someone could explain my problem, I'm not sure I'm doing...

visual studio - Why can't i add Bin Folder in an asp.net MVC web application? -

मैं asp.net MVC का उपयोग कर एक वेब अनुप्रयोग विकसित कर रहा हूँ ... RightClick- & Gt; ऐड- & gt; ASP.Net फ़ोल्डर जोड़ें- & gt; कोई बिन फ़ोल्डर नहीं है ... मैं asp.net MVC 1.0 के साथ दृश्य स्टूडियो 2008 एसपी 1 ... का उपयोग कर रहा हूँ सुझाव ... मुझे अपने रूट फ़ोल्डर में एक बिन फ़ोल्डर मिलता है, लेकिन समाधान एक्सप्लोरर में नहीं। समाधान एक्सप्लोरर में सभी फाइलों को दिखाएँ आइकन क्लिक करें तब बिन पर राइट क्लिक करें और प्रोजेक्ट में शामिल करें चुनें उम्मीद है कि यह मददगार होगा।

Rails Error When Trying To Mail to Multiple Users -

Whenever I'm trying to use the plugin to process a model for some time on the rail When I try to use the mail-out process in my user model, I get the following error: Can someone tell me in the right direction of being wrong? /var/lib/gems/1.8/gems/rails-2.3.5/lib/commands/runner.rb: 48: /var/lib/gems/1.8/gems/activesupport- 2.3.5 / lib / active_support / dependencies.rb: 380: IN`load_without_new_constant_marking ': / home / tnederlof / dropbox / ruby ​​/ daily_trailer / app / model / user .rb: 9: syntax error, unexpected tIDENTIFIER, expect' '' (Syntax error) @ User = find (all :: conditions => "# {workdays} sub" "" ") My schedule. R.B is as follows: each 1.day ,: at = & gt; '5:30 am' runner "user.mail_out" end My user model is: class user & lt; ActiveRecord :: Base acts_associative def self.mail_out day of the week = DateToday.frafttime ('% A'). Downcases @ user = find (all :: condi...

vb.net - Windows Forms' Appearance -

Just started using Visual Studio 2008 and was hoping to convert my VBA UserForms to VB.NET with the intention of upgrading my old files user matching the new operating system Controls the new Windows form controls. I am creating a Windows Forms in Visual Studio, but when I load them into PowerPoint or Excel, Form Controls Will VB.NET in Visual Studio be present in my Visual Studio Is there a way to employ modern controls? You can either use one of several available custom drawn buttons or maybe That you have to turn on the visual style so that they can be rendered better

unix - How to change the prompt in putty -

When I start a putty on a server, I get the prom prompts as below: hpbl802! Benjaminb: ~ [22] & gt; How can I change this signal Benjamin: ~ [22] & gt; This is not a confirmation, it is your shell that gives you quickness If you are using, try: PS1 = 'Benjamin: \ w [\!] & Gt; If this works, you can add two lines to your $ HOME / .bashrc server. Information on and more. If your shell is not bash, then you need to tell us what the shell is. The easiest way is to type a non-existent command on the command-line: $ 42-left: 42: command not found The above tells me That's my shell bash.

perl - Is there a vim plugin that makes Moose attributes show up in Tag_List? -

I am editing a package that uses mousse, and I was wondering whether the mousse attributes should be in the tag There was no plugin to show in the list. For example, in the following code, the attribute does not appear in the option tag_list, but print_out_site does: Mood; MooseX :: AttributeHelpers; ... in 'Options' = & gt; (MetaCLASS = & gt; 'Collection: hash', isa = & gt; 'hashff [str]', = '' ro '', which = = (exists>, 'exists',' To get & gt; '', set = & gt; 'set',},); ... sub print_out_site {my $ self = shift; my $ key = shift; $ self-> fast_out_fah-> gt; ; Print ("& gt;", $ key, "\ n"); $ self- gt; fast_out_ff- & gt; print ($ self-> site-> {$ key}, "\ n" );} add row - regex -perl = / is '(. *)' = & Gt; \ (/ \ 1 / a, attribute, moose attributes / to ~ / .ctags and show it To avoid duplicate matches in other ...

javascript - jquery, trigger, bind, strange parameter -

मेरे पास निम्न कोड है: & lt; body & gt; & LT; प्रपत्र & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" / & gt; & Lt; / प्रपत्र & gt; & LT; स्क्रिप्ट & gt; $ (फ़ंक्शन () {$ (दस्तावेज़) .बंड ("EVENT", फ़ंक्शन (इवेंट, एलीमेंट) {console.log ("BIND", एलीमेंट, इवेंट);}); $ ("फ़ॉर्म")। प्रत्येक (फ़ंक्शन पुनरावृत्त (इंडेक्स, एलीमेंट) {console.log ("पहले बीएनडी", एलीमेंट); $ (दस्तावेज़) .ट्रिगर ("ईवेंन्ट", एलीमेंट)})}}) & lt; / script & gt; & Lt; / body & gt; मुझे उम्मीद है कि मैं जो तत्व TRIGGER को पास करता हूं वह है I जैसा BIND पर मिलता है लेकिन कोई नहीं BEND पहले: यह फ़ॉर्म है, क्योंकि यह अपेक्षित है BIND: यह INPUT बॉक्स है, पता नहीं क्यों क्या यह कोई बग है या मुझे कुछ याद आती है? सर्वोत्तम, विक्टर jQuery का कहना है कि अतिरिक्त पैरामीटर को एक सरणी में पारित किया जाना चाहिए। इसलिए: $ (दस्तावेज़) .trigger ("EVENT", [element])

php - Setting a greeting based on user's time (Good morning, good afternoon…) -

Whether any extrapolation to implement "good evening" or "good morning" based on user's settings Can do? Perhaps the PHP server will get time, but I want to welcome site visitors with a timely-based greeting that understands their time of day. EG: Good morning, good night, good afternoon Place it on the .getHours () on the date. Javascript's date object will use the user's local time instead of server-time: var now = new date (); Alerts (now .hosthors ()); Some conditional checks, and you are in business. For example, the following is a very simple and easy-to-understand example: var now = new date (); Var Hers = now Guesthors (); Var Message = ""; If (hours> 0) msg ​​= "Morning Sunshine!"; // Actually if initial (hours> 6) msg ​​= "good morning"; // If after 6 o'clock (hours> 12) msg ​​= "Good Off"; // 12pm after (hours> 17) msg ​​= "good evening"; // 5pm after (...

magento - Differences between an extension and a module? -

Both extend the features and functionality of Magento, but can someone tell me what is the difference between them? As I did not get the clear explanation. Thank you. I got the answer in the end. Extensions are packing modules In other words, you extend Magento's features and functionality by writing a module. After that you have the option to leave it or pack it ( system & gt; Magento Connect & gt; package extension ). An expansion (a pack module) is then published.

vim - How to map angle brackets in Windows gVim? -

मैं बहुत सारे HTML कोड और मैं CTRL + & gt; से & amp; gt; और CTRL + & lt; से & amp; lt; क्रमशः, उन प्रतीकों की विशेषता वाले बहुत सारे पाठ टाइप करते समय इसे आसान बनाने के लिए विम मैनुअल की जाँच करने के बाद, मैंने imap & lt; C- & gt; & gt; & Amp; gt; , imap & lt; C - & gt; & gt; & Amp; gt; और यहां तक ​​कि imap & lt; सी-एस -। & Gt; & Amp; gt; लेकिन अभी तक मुझे कोई सफलता नहीं मिली है कोई भी विचार? सभी & lt; C-X & gt; प्रकार संयोजन "Ctrl + X" के लिए, आपको चाहिए: : imap & lt; & Amp; lt; : आईएपीएपी & gt; & Amp; gt; एक विकल्प के रूप में, आप : ab : : iab & lt; & Amp; lt; : आईएबी & gt; & Amp; gt; फिर आप & lt; SPACE टाइप कर सकते हैं और आपको & amp; lt; मिलेगा यह आपको लिखने की अनुमति देता है: & lt; a href और प्राप्त करें: & lt; a href या प्रकार: एक्स & lt; वाई और प्राप्त करें: एक्स & amp; lt; उम्मीद है ...

javascript - Pass var through JQuery load -

A very simple question I'm sure the brain is not working this morning. I have been using with JQuery and Google Maps v3 API. I'm basically trying to refresh a map with new search results when it has been dragged to a new location. google.maps.event.addListener (map, 'dendend', function) (var newlatlng = map.getCenter (); $ ('# venue-list-container') Load (' /maps/geoMap.php?'-, {latlon: newlatlng});}); However, what should I use in the parameters after posting the URL Newlatlag (Lotlan: Newlat). At the moment it does not work Use the post? Var lat = newlatlng.lat (); Var lng = newlatlng.lng (); $ ('# Venue-list-container'). Post ('/ maps / geoMap.php?', {Latitude: latitude, latitude: lng}); The $ .post function calls the PHP script, sending it with coordinates. PHP scripts are able to retrieve these coordinates by referring them to the $ _POST array. ['Latitude'] like $ _POST

winforms - Working with XML -

I am planning to create a news item that uses XML because it is backend and the display should be the same: Date: 08 / March / 2010 ------------------------------ Title & nbsp; & Nbsp; | News ------------------------------ News 4 | Some News News 3 | Some News News 2 | Some News News 1 | Some News ------------------------------ Date: 07 / Mar / 2010 - ------- --------------------- Title & nbsp; & Nbsp; | News ------------------------------ News 5 | Some News News 4 | Some News News 3 | Some News News 2 | Some News News 1 | Date (descending) after appearing should be sorted on time (descending) Today's news item should be on top , Then the title should be sorted - (similarly), later the news items of the previous day will arrive. I did not come with XML argument which should be used in this case. Apart from this, I do not understand how to check "Today's date" in XML's "if" statement. Can I get some code samples...

visual studio - How to optimize .NET applications to 64-bit? -

में विजुअल स्टूडियो & gt; बिल्ड & gt; कॉन्फ़िगरेशन प्रबंधक आप लक्ष्य प्लेटफ़ॉर्म चुन सकते हैं। यह क्या बदलता है? क्या कोई दूसरा तरीका है कि मैं अपने .net ऐप का अनुकूलन कर सकता हूं जब x64 प्लेटफार्मों को लक्षित करता है? जैसा कि पहले ही उल्लेख किया गया है, .नेट विधानसभा में आईएलएफ मंच स्वतंत्र है (यह है कि Any सीपीयू सेटिंग का अर्थ है)। एनआईटी रनटाइम के जेआईटी (बस-इन-टाइम) कंपाइलर इस मंच को स्वतंत्र बाइट कोड को उस प्लेटफ़ॉर्म के विशिष्ट ऑप्टिमाइज़ेशन के साथ प्लेटफ़ॉर्म विशिष्ट देशी कोड में संकलित करेगा। तो आम तौर पर कुछ भी नहीं है जिसके बारे में आपको चिंता करनी चाहिए। हालांकि, यदि आप स्पष्ट रूप से अपने प्रोजेक्ट को एक्स 64 के साथ प्लेटफार्म लक्ष्य के रूप में स्थापित करने के लिए सेट करते हैं तो असेंबली अब x86 रनटाइम पर नहीं चलेंगे (और इसके विपरीत x 86 मंच लक्ष्य पर) यह केवल तब उपयोगी होता है जब आपके कोड में मूल x64 / x86 पुस्तकालयों जैसे कि प्रक्रिया में COM घटकों पर निर्भरता हो। जैसा कि एक टिप्पणी में जोड़ा गया है, प्लेटफॉर्म लक्ष्य को अंतर्निहित के बीसीसी के...

sql - Microsoft Access 2003 - creating a separate field that totals 5 other fields from the table -

This is what I have done in the SQL code ... ........ Select [code] DISTINCTROW [OEE / A Query]. [SumEfLabor Hours]] [sumOfLabor Hours of Yoga], Yoga ([OEE / A Query]. [SumOfGood Pieces]) [SumOfGood Yoga of Sum], Yoga ([OEE / [Quote] [SumOfSumOfMachine Hours], Sum ([OE / A Query]. [Total part time earned] [Quantity] ]) [SumOfTotal Parts Hours earned], Yoga ([OEE / A Query]. [Expected Stand PCS] [OEE / A Query] by [OEE / A Query] Group [Standard PCS Expected]. Press ; I How do I add D to another field which uses 5 different fields? Here I think it may look like this but I'm not sure .. SUM (straight), SM (straight) , From SM (Shine), SM (standardization), SM (Sasten), SAM (sorting), [shift report table]; It really depends on what you are asking. I am not sure whether your second query is just another example, or if this is the real To add a separate data source in your first question. If you want to add another column to your first query, by column, which is alrea...

c# - How to check if two System.Drawing.Color structures represent the same color in 16 bit color depth? -

How can I check that the two systems Drawing The color structure represents the same color in depth of 16-bit color (or usually the screen's value, the primary screen. BeatsPixel)? Suppose I set the form. Transparency Voice1 (color type), I want to know that when the user chooses a new background color for the form (value 2), I do not set completely transparent. On the 32-bit color depth screen I compare two values: If (value1 == value2) However, this 16bit color Depth does not work on the screen, because the more color values ​​for value 2 will represent the same real 16bit color as value 1, because I found the hard way. Try the following code: zero myTestMethod () {TransparencyKey = Color.FromArgb (128, 128, 64); BackColor = Color.FromArgb (128, 128, 71); Byte TR = Convert R (Transparency R); Byte TG = Convertji (Transparency.G); Byte TB = Convertib (Transparency.b); Byte BR = Convert R (Backcorer.); Byte BG = Convertiji (backcolor.g); Byte Bb = convert B (bac...

sql - Case statement with multiple whens...not working! -

This is a simplified version of what I'm doing, but I can not find anything to work on. After the statement 'ERR' without giving a comma, I want an error that I want the column to be 'month' and I want to do this work, but I have a lot of trouble. Thanks for your help! One Select POL_PRI_RSK_ST_CD, a.MASTER_COMPANY_NBR, when a.char046 is tap, then 'ERR' when a.char046> '010' then '11 + 'second a.char046 end as the policy_yesers, a.last7days, a.Last30Days, A.Last90Days one. RECORD_ID = b.RECORD_ID is reported from reporting an Inner Response B, where a.POL_OGN_EFF_DT> = '2008-11-01' group a.POL_PRI_RSK_ST_CD, a. MASTER_COMPANY_NBR, the case when a.char046 is taped, then 'ERR' when a.char046> '010' then '11 + 'ends in the form of second AIR 046 policy year, a.Last7Days, a.Last30Days, a Note: This question is the result of a debugging session in comments. Error in the form of 'code' as th...

PHP gd library clarification -

I'm looking at this code and went through docs, but still do not understand how Should work. This code is just fine as well, but I am thinking that I should output the header as a PNG rather than JPEG. What is actually going on in this code? Is the PGG image converted into JPEG? What I have to do at the end is to mark all GIF, JPG, BMP and PGG images in the same directory. I am outputting all the headers regardless of the image type as JPG. is this correct? I hope that I'm making sense here, I'm tired. $ im2 = imagecreatefrompng ($ image) imagecopy () and more code header ("content-type: image / jpeg"); Imagejpeg ($ IM2, ', 50); Makes your code more or less as: // Load PNG file into memory $ im2 = imagecreatefrompng ($ image) $ im2 Now a resource , referring to an image once in memory, it is not a png or jpeg; This is a raw, uncompressed data, the "format" of an image specifies how raw data is packaged and formatted; At this...

iphone - How to keep on rotating a view with a CAKeyFrameAnimation? -

I try to do this: is a scene that has already been rotated in some values, say 15 degrees . Imagine a scene swirling from 15 degrees. Next, I only know that I want to rotate this view from the current rotation up to 40 degrees. Imagine that the scene now rotates from 15 to 40 degrees. For practice, I want to do it with CAKeyFrameAnimation. But the thing is that from everything I can do it is to make it clear where from where to go, there is no convenient "taking the current state" thing like Uiview Animation, right? How would I go about it? In addition, I always want to specify 3 keyframe for that rotation, no matter how much rotation is required. How to visualize it spins from 15 to 40 degrees, to do this, use the keyframe of 3 But another major problem : It may be that, another animation may have to kick with a different goal, say that a scene currently rotates between 20 and 100 degrees, and somewhere between the animation a new animation kicks. A...

maven 2 - How to use Continuum to build from multiple branches -

I have a project that was created using Maven and Continuum. We have many release branches, most of which are in retirement, but if any problems arise, then anyone can revive anyone. My problem is that adding branches to Continuum is very heavy; The best way I found so far is to add each branch as a separate project, but it requires proper setup as we do not release all of them often, that's fine, but I continue against short-term facility branches I would like the ability to keep, and I do not want to set everything by hand every time. I would like the ability to continue with short-term facility branches, and I don ... hand all the time I do not want to set everything from Probably no expected answer but my suggestion would have to be changed for other CI tools. For example, what you describe with Hudson will be very fast and easy (create a new maven2 project build, fill out scm url and you complete).

language agnostic - Why use the switch statment instead of if else statments? -

Switches seem so useless because they can be replaced with if-else statements, which are just a four / int / enum etc. . I can only think of a good use for a switch, and it will be to understand command line arguments. What are some real uses for switch statements? In my mind there are two reasons to use / vs, switch vs.: Compiler can be optimized for switch optimization. The switch description more clearly expresses the code's logic more specifically, it is the idea that you are taking a separate branch based on the value of something else, rather than the basis of more complex logic On. This is by far, more important reason for me.

UI-Performance for ASP.net -

I know Grails and asp.net can not be compared directly, but still, do anyone know Is there anything available for ASP.NET that even looks like the remote's functionality? You have to explicitly do this yourself though very cool plugin. Anyway: Transfer your JS to the bottom of the page Minimize the stuff by using an msbuild function. There are some MSBuild functions that you can merge and Looking for including JSCMpress. Use YSLL with firebug to track your score again to Yahoo UI guidelines.

asp.net - ASP - running in localhost - unable to reach internet -

I have ASP MVC controller action I am trying to make a web request Public Action Index () {WebRequest Request = HttpWebRequest.Create ("http://www.example.com"); WebResponse response = Request GetResponse (); String str = response.ToString (); } "I get" WebException occured "" Remote name can not be solved: 'www.example.com' If I start Fiddler , Then the WebRest works. I tried to add: > & lt; defaultProxy & gt; & lt; proxy Utility systemdefault = "True" Bypassonlocal = "True" /> web.config (with HT bypasspointlocals and Without it) and it still does not work. Any suggestions? Try to clearly specify the server: & lt; system.net & gt; DefaultProxy & gt; & lt; proxy proxyrace = "http: // proxy .yourcompany.com: 80 "/> & lt; / defaultProxy & gt; & lt; /system.net> You can also set a proxy program: request.Proxy = new WebProxy ("http...

Changing .bin file's data in C -

As a sequence of strings I have a lot of data stored in the bin format. I randomly read any strokes And I want to be able to modify it in C I am trying with the following code but it does not work. Can anyone fix this for me? Also, would it be possible to delete an intermediate structure from the file in the middle? The code is below: #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; Struct rec {int x, y, z; }; Zero f_rite () {int i; File * ptr_myfile; Structure RE my_record; Ptr_myfile = fopen ("test.bin", "w"); For (i = 0; i = 0; i--) {fseek (ptr_myfile, sizeof (structure RE) * i, SEEK_SET); Fred (& amp; my_record, sizeof (structure rec), 1, ptr_myfile); My_record.x = my_record.x + 100; FILIT (& amp; my_record, sizeof (structure REC), 1, ptr_myfile); } Fclose (ptr_myfile); Return; } Int main () {f_rite (); F_read (); F_rerite (); F_read (); Return 0; } FOPIN has no "RW" flag you can read and write (upda...

php - curl halts script execution -

My script uses curls to upload images to the site. I loop through a folder and upload every image there but after uploading 3-4, curl_exec will fail, prevent everything from uploading and uploading other images. $ Sign_id, "albumID" = & gt; $ alb_id, "$ sign_id" = " "Filename" = & gt; zerofill ($ n, 3). ".jpg", "data" => base64_encode ($ data), "bytecount" = & gt; strlen ($ data), "MD5Sum" = & Gt; $ data_md5); $ Ch = curl_init (); Curl_setopt ($ ch, CURLOPT_POST, true); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, true); Curl_setopt ($ CH, CURLOPT_SSL_VERIFYHOST, 0); Curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, 0); Curl_setopt ($ CH, CURLOPT_POSTFIELDS, $ upload_array); Curl_setopt ($ c, CURLOPT_URL, "https://upload.smugmug.com/services/api/rest/1.2.2/"); $ Upload_result = Curl_xac ($ CH); // fails here curl_ close ($ ch); Updated: So I added logging to my script. When this fails,...

pdf generation - Batch Decollating Directory of PDFs and Bar Code Imposing -

I have a directory of PDFs, all of them are different, but they have 5 pages for each PDF It is necessary to put the bar code after this procedure I have to combine and distort every PDF. Essentially 5 different PDFs have been created. First of all the PDFs contain all pages, second page, etc. I need to find a tool or toolset, which will allow me to complete it. I am ready to prepare my own program, but I do not even know what will be the most effective language to attack with it. PDF :: rebound and pdf :: reuse :: using barlow libraries with pearl in the directory To get all the PDFs, drag the desired pages, put barcodes, and left out for a new PDF.

asp.net - Set Web User Control Property to GridView Selected Row -

I have a web user control (SSCX) that exposes the "id" property What I want to do is this property Is set when a gridview is set on fire in a page with an index that is selected. However, I can not do this .... Here is my code: Protected Zero GridFiciansCertified Index (Object Sender, EventAgds E) {physicians_certif1.mdid = grdPhysicians.SelectedDataKey.ToString (); MvData.SetActiveView (viewEdit); PanAdditional.Visible = true; } Physicians_certif1 is user control. It seems that before the User Control is loading it has the chance to set its property in the selected Index Charged Event. Any ideas people? ASP.Net page can be difficult to understand with lifestyle, particularly with ASK user controls. , Who also has their own life cycle, if you are setting up MDID property in page_load of page or ASCX control or have hardened a default value in XHTML, then it may be possible that after the selected inc exchange fire Resetting. Set a breakpoint in grdPhysician...

php - Determine What Line a Function Was Executed From -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब मैं बनाने की कोशिश कर रहा हूँ एक त्रुटि वर्ग और बहुत सारे त्रुटि वर्ग मैंने देखा है कि पिछले त्रुटि के कारण FILE और LINE उपयोग में देखा गया है, लेकिन वे फ़ंक्शन में इसका इस्तेमाल करते हैं वे हमेशा एक ही होते हैं, जो बहुत बेकार जानकारी है प्रत्येक फ़ंक्शन के साथ FILE और LINE को रखने की एक सरणी भेजने के अलावा (जो काफी दर्द हो सकती है), मैं कुछ नहीं सोच सकता या उसे नहीं ढूंढ सकता उदाहरण: & lt;? Php / / File1.php dosomething (गलत); ? & Gt; & Lt;? Php // file2.php फ़ंक्शन dosomething ($ इनपुट) {यदि ($ इनपुट === गलत) मर ("फ़ाइल में फ़ाइल (फ़ाइल) में त्रुटि (पंक्ति)"); }? & Gt; समारोह "संदेश में लाइन 3 पर त्रुटि /file1.php " संदेश के साथ मर जाएगा। " मुझे लगता है कि एक समाधान का उपयोग किया जा सकता है। दिए गए उदाहरण को इस तरह से एक बैकस्ट्र्रेस मिलता है: सरणी (2) {[0] = & gt; सरणी (4) {["फ़ाइल"] = & gt; स्ट्रिंग (10) "/tmp/a.php" ["रेखा...

proxy-like python module -

In case of self-import, may the python module be hand in other modules? You can do this (in normal CPYthon too): # Uglyhack.py Import System Import Other Modules sys.modules [__name__] = Other module then: & gt; & Gt; & Gt; Import uglyhack & gt; & Gt; & Gt; Uglyhack & lt; Module 'Other Modules' to '...' & gt; This depends on the global assignment for imported script module / module is being imported after the imported module is removed, so when the import assignment occurs, then sys .modules lookup has been broken up to point to another module. I will not use it (possibly) in the appropriate code for anything other than debugging. Anything that could be up to you

newline - Is it always safe to change line breaks type (i.e. LF, CR+LF, CR) in javascript source? -

Can swap new lines (such as by some text editor) to break the javascript code? There are two control letters in fact you do not need line breaks. It's just for better readability, except for those situations where you really need those letters like wire or regular expression, but there you can escape sequences \ n and \ r can also be used.

php - Displaying number of results from a MySQL db -

I have a classified website, and it is using MySQL as a database. My goal is Problem: There are two types: DB in private with a search term entered in a text input within the form, and the company Show the total number of ads! Advertisement: Private , and Company . The user can specify which performance, or both, so that the three option. On the website, after displaying the search results, I want to show the user THREE tab: all ads , personal ads , company ad . I have a area in every record in MySQL that contains either the value of either private or company . I have a way to display advertising, corporate advertising and total number of ads, but it requires multiple questions . For example, if the user checks the personal check box, then only private ads are searched, but I do not know how many company ads are there until I do a new query, Also search for them then add them, and I also have the total NR of ads. Just wondering if you know a well, then ma...

ASP.NET Virtual Directory For Common Markup -

I have some applications that need to be shared with a normal group of markup. Scenario: I may have www.site1.com, www.site2.com, and www.site3.com. On all sites, / care / contact /us.aspx and / care / faqs.aspx will be exactly the same, but every other page will be completely different. Problem: I am trying to not duplicate .aspx files and one / care virtual directory for each of these sites, which will include contact-us.aspx and faqs.aspx I'll use every site I've seen, but I'm looking for any other solutions / ideas. Question 1: What would be the best way to set up the care directory to share it? Question 2: Any idea about sharing the code behind it Background, if you care about: In a heritage application (ASP classic / vbscript), we have the ability to use / normal virtual directories for sites. Share common markup and code (since they All are mixed in .asp files). Thanks for any help or ideas! Set up virtual directories in IIS for each app pointing t...

javascript - performing jQuery show/hide on dynamically created content -

I have a page created with jQuery, and this page contains the table where the table rows have a classname that gives them Recognize a certain color (i.e. tr square = "yellow square") The user is able to filter the rows by clicking on the hidden / hidden checkbox to show / hide the table. My problem is that the table is generated through flyJSON requests. To add new content to the table, I do the children for the first time (). On the tabs of the table () () ($ ('my_table_tbody')) Children (). Remove ()), and then I'll use the append to add new table information back. An example of this function is: $ ('# my_table_tbody'). Children () Remove (); $ .getJSON ("http://my_url.com/my_cgi_bin/my_cgi", {data: myadata}, function (j) {var for mylength = j.length; (var k = mylength - 1; k> = 0; K--) $ ('& lt; tr] class = "' + j [k] .color + '" & gt; & lt; td class = "my_first_col_class"> gt; [j]...

cocoa - Switching line properties while using NSBezierPath -

While drawing different lines (for charts) with NSBezierPath, I have some very basic problems like line color / width Changing is happening. The following code should clarify what I am trying to do: #import "DrawTest.h" @ Implementation DrawTest - (id) initWithFrame: ( NSRect) frameRect {NSLog (@ "InitWithFrame" in ...); If ((self = [super initWithFrame: frameRect])! = Zero) {[self drawBaseline]; [Self performance]; // ...No! [Self drawPlotline]; } Healthy return; } - (zero) Drobysline {nsrified window; Integer width, height; Windowct = [self-bound]; Width = round (windowRect.size.width); Height = round (windowRect.size.height); TheLineWidth = 1.0; [[Enkolor gray color] set]; // Allocate an example of 'NSBezierPath' ... path = [[NSBJairpath Alok] init]; // Drawing a horizontal line ... [Moving paths: NSMKpoint (0, height / 2)]; [Path lineToint: NSMpointpoint (width, height / 2)]; } - (zero) dropline {leanwith = 10.0; [[Enscores red color] set]; // Dra...

c# - MVC2 IModelBinder and parsing a string to an object - How do I do it? -

मेरे पास टाइम नामक एक ऑब्जेक्ट है सार्वजनिक वर्ग का समय {सार्वजनिक अंतराल {प्राप्त करें; सार्वजनिक एट मिनट {get; set;} सार्वजनिक स्थिर समय पार्स (स्ट्रिंग टाइम स्ट्रिंग) {// टोस्ट्रिंग () के पिछले आउटपुट को पढ़ता है और एक टाइम ऑब्जेक्ट देता है) संरक्षित स्ट्रिंग ToString () को ओवरराइड करता है {// कुछ बाहर डालता है 14:50 जैसा (2:50 अपराह्न में)}} तो मुझे क्या चाहिए जो एक स्ट्रिंग से समय सारणी को सेट करने के लिए संपादन या क्रिएटिव एक्शन पर स्वत: मॉडल बाइंडिंग के लिए है ( अर्थात् स्ट्रिंग के साथ पार्स विधि को खिलाऊं और परिणाम लौटाए।)। इसके कारण मैं यह कर रहा हूं कि मेरे पास चयन करने योग्य समय के साथ एक ड्रॉपडाउन लिस्ट होगा प्रत्येक विकल्प का मान पार्सर पठनीय स्ट्रिंग होगा। क्या कोई भी आईएमोडेल बिन्डर इंटरफ़ेस से एक उदाहरण बिंड मॉडेल विधि प्रदान कर सकता है? ठीक है, मैंने पाया कि मैं क्या चाहता था आप एक किंवदंती स्कॉट हैं मुख्य घटक कुंजी का नाम प्राप्त करने के लिए "बाध्यकारीकॉन्टेक्स्ट। मोडेलनाम" का उपयोग कर रहा था और फिर मूल्य प्रदाता से मूल्य खींचें: बाध्...

mysql - Amazon RDS (Relational Data Store) and SSIS -

Does anyone know if it is possible to use SSIS with Amazon RDS? Since RDS is essentially MySQL - is it possible that OLE DB or something ... ... Amazon offers full support for all MySQL features except RDS replication so you can use OLE DB, or other driver to access MySQL from your application.

c# - Paged Custom ComboBox -

Image
I have to do some sample code, how to make a paged combo box. My data includes 1300+ items when the user clicks on the combo box arrow, then the ComboBox display will display 25 (Page Size Configuration) items with the arrow at the top / bottom of the time (depending on the location of the location) so that the user Could request the last / next page. The data is coming from a general list. (List) In this way, this idea is to display only one subset of data over time. Users can choose by scrolling from the list according to the normal combo box. Note: All data is read-only. The top and bottom list should have a new button to request the previous or next page of navigator values. For legacy issues I can only use Winforms (.NET 2.0) and C # but VB.net code will also work as well You may want to consider using a previewview as a drop-down control for your content, like it does here: You can source code here for this control Can get A. I think you should give an idea of ​...

How to make a simple audio equalizer for the iPhone? -

I want to make a simple audio equalizer for the iPhone, but I do not know how to get started. Equalizer should really be simple and just change bass, high, distortion and maybe echo and chorus. How can i start Perhaps a sample code would be helpful. First of all you are confused in your vocabulary. An equalizer changes the frequency response of just one audio channel, usually there is a fixed number of frequency band, whose personal benefit can be controlled by the user. Distortion, Echo, Chorus, etc. Effects - In the digital domain, they are just modifying the data by changing the algorithm that apply to an audio channel. So you need to decide what you're designing: an equalizer, some type of processing processing machine, or maybe some of these combinations. Once you want to implement it, you have a tough design, you can start working on the various algorithms used to implement this design. For Equalizer you can consider filtering the frequency domain or impl...

COBOL: SYSIN JCL for compiling source from PDS -

I'm just starting COBOL, and went with JCL ... How do I get my original COBOL program I compile the PDS, I know that this could just be // SYSIN DD * code code code / * I tried to do something like this // SYSIN DD DSN = The.pds.location (file), DISP = SHR but all shots were trash back and I think return code of 12. If someone can help, then be thankful. Depending on the information you posted, your JCL should work. Maybe you are missing something else, following JCL provides complete job phase to compile COBOL: ... your job card goes here ... // COB EXEC PGM = IGYCRCTL // STEPLIB DD DISP = SHR, DSN = SYSP.IGY.V3R4M1.SIGYCOMP // SYSUT1 DD unit = SYSDA, SPACE = (Siwayel, (1,1)) // SYSUT2 DD unit = SYSDA, SPACE = (Siwayel, (1,1)) // SYSUT3 DD unit = SYSDA, SPACE = (Siwayel, (1,1)) // SYSUT4 DD unit = SYSDA, SPACE = (Siwayel, (1,1)) // SYSUT5 DD unit = SYSDA, SPACE = (CYL, (1,1)) // SYSUT6 DD unit = SYSDA, SPACE = (cv, (1,1)) // SYSUT7 DD unit = SYSDA, SPACE = (...

Spring-security is not picking up my authentication manager -

itemprop = "text"> I am spoiling with the spring security configuration issue My configuration here Pre > & lt; Security: global-law-security pre-post-annotation = "enabled" /> & Lt; Security: http auto-config = "true" & gt; & Lt; Security: Block-url pattern = "/ dologin" access = "ROLE_USER, ROLE_ANONYMOUS" /> & Lt; Security: form login login processing-url = "/ security_check" login-page = "/ onlogin" always use-default-target = "false" authentication-failure-url = "/ onlogin" default-target-url = "/ home "/> & Lt; Security: logout invalid-session = "true" logout-url = "/ logout" logout-success-url = "/ onlogout" /> & Lt; Security: Remember- I / & gt; & Lt; Security: http-basic / & gt; & Lt; / Security: http & gt; & Lt; Security: Authentication Manager Last Name = "Authe...

svn - Best method for using Subclipse with an SSH Remote Project in Eclipse -

I have a remote project (via SSH) set up in Eclipse Duplicate Plugin Remote Project File system can not use: As a result, you can not use subclass features in remote projects. Is this my only option to synchronize a remote SSH folder in Elypes ?: In the local folder with subclipse, rsync / Unison Distributed revision control system. It seems that support for the acceptance of DRCS is still in the early stages and there is some instability. Thanks for the help, Derek I Synchronizing a local folder with a remote folder in conjunction with an integrated environment eliminated using a local development environment has proved to be very weak and difficult. Development environment and integration environment require proper amount of setup and coordination. Ultimately however, it is worth the effort to establish the work flow of proper development, integration and production environment.

Java Servlet Filter redirect problem -

I am having trouble with my certification filter when the login login page redirects, if any image is displayed in JSP login Does not happen. However, if I go to the login page manually on the login page, images are displayed. I do not understand why this is happening! I appreciate any help: -) AuthFilter: if (authorized == tap & amp; path.indexOf ("AUTH") = = -1 & amp; Index IndexOf ("Login") == -1) {httpResponse.sendRedirect ("Login"); Return; } And {chain.doFilter (request, response); } Login servlet: // Just using a servicelet, I want to send more data to JSP Dispatcher.dispatch ("View / Login.jsp ", request, feedback); login.jsp: & lt; Img src = "picture / logo.png" /> jsp is otherwise "normal", all the required HTML tags are present. The "Images" folder is in the project's default "Web" folder, with all other jsp and javascripts. Thanks in advance for any he...

what http response code for rest service on put method when domain rules invalid -

What is the most appropriate response code to return to using a PUT method for updating a resource, and in the request Some data included can invalidate domain rules? For example, in a customer resource, the name should be specified. If an agent tries to issue PUT without supplying an name then I do not want to update the resource, and I want to tell the caller that they name . What HTTP response code? The response code is not related to http. In this case, the method should return the same status code such as This was a post request. I can say that you use 400 or 409 ( note: see more discussion about the difference between two in comments ) needed.

c++ - Creating an ATL COM object that implements a specific interface -

I need to implement a simple ATL COM object that implements a specific interface for which I need the .tlb file and Both have been given. An .idl file interface is very simple and consists of only one method. I have made several ATL items in the past but have never implemented a specific interface. Why do I need to achieve this? I'm assuming that somehow I need to reference the interface IDL or TLB in my new object IDL? Any sign is welcome. It is much more automated than the other answers here. All boilerplate codes are written by you for Visual Studio. You are lucky that you have ADL is, it is by far the most suitable, I think. You can paste. The contents of the ADL file are currently available on your ATL Com project. Insert into ADL file, which will give you access to announcements about it. For example, something like this can be pasted into an IDL file: [object, uuid (ecaac0b8-08e6-45e8-a075-c6349bc2d0ac), dual, dislikes, helpstring ("IJim Interface ...

parsing - Hidden token into default channel - AntlrV3 -

Suppose I am white space (WS) in a hidden channel and for a particular rule alone, I want to Also considered white spaces, is it possible to get WS on the default channel only for that specific rule in parse? Look at the answer to your question question, how to notice that I have a '\ n in the parser rule I will. You should be able to put 'as well' Now, on the Hidden Channel all the options of your WS will be the only concern being in the rule. Like rulename: Token1 '' Token2 '' 'token 1 {location action here}; Please note that the name of the rule begins with a lowercase letter and it is a parser rule, whereas "token #" starts with uppercase letters and has lexers rules. The rule between the different tokens requires a place in this example, and I think you can put something like ("'|' '' '\' 'r' | '\ n') + but I Do not try it, leave it to try for you.

function - PHP: Split string into chunks of 8, how do I do this? -

I basically have a binary, say that it's 300 in length, how do I split (using a lot of explosions) Will divide into 8-bit chunks? I look at chunk_split () but it considers only an 'end' parameter, it is not an option to put it in an array .. or can it socket in the array? The last 8 digits can be below 8 (if someone has a miscopy, and this is 4) then no verification is required, just properly 8 numbers in chunks from beginning to end. class = "post-text" itemprop = "text"> : $ chunks = str_split ($ data, 8) ;

c# - Performance question: SQl Server CE 3.1 secured with a password -

मैं Windows Mobile 5.0 और above अनुप्रयोग को C # , नेट कॉम्पैक्ट फ्रेमवर्क 2.0 SP2 और SQL सर्वर CE 3.1 । मुझे SQL सर्वर सीई डेटाबेस पर कुछ गुप्त जानकारी संग्रहीत करने की आवश्यकता है और मुझे आश्चर्य है कि अगर मैं एक पासवर्ड के साथ डेटाबेस को एन्क्रिप्ट करता हूं, तो अनुप्रयोग के प्रदर्शन को प्रभावित कर सकता है। मैं भी एक संहिता में पासवर्ड को संभाल करने के लिए सोच रहा हूं क्योंकि आप असेंबली को अलग कर सकते हैं और पासवर्ड पुनर्प्राप्त कर सकते हैं। क्या प्रदर्शन को प्रभावित करने जा रहा है? मैं पासवर्ड डेटाबेस को इसे पुनः प्राप्त करने से कैसे बचा सकता हूँ? धन्यवाद। मुझे यह कहना होगा कि किसी एप्लिकेशन की "सुरक्षा" वास्तव में केवल एक सापेक्ष उत्तर है, क्योंकि इससे कोई फर्क नहीं पड़ता कि आप कितने अच्छे हैं, disassembly से अपने स्रोत की रक्षा कर रहे हैं हमेशा एक क्रैकर यदि वे चुनते हैं तो वे तोड़ सकते थे सी # यह विशेष रूप से कमजोर है क्योंकि आप परावर्तन के उपयोग से लगभग किसी भी वर्ग में आसानी से देख सकते हैं, इसलिए आपकी सम्मेलन को बचाने और हटाने के लिए उत्पादो...

Can I use alias field names in django templates? -

I'm new to the deegago and dragon ... I have a model that includes 10 generic Attrib_00 field through attrib_09 I pass these areas as a reference to a DJ ango template string. I would like to use more meaningful names in the template. The template string has been derived from any other model and I have a field that contains a comma-delimited list of related alpha names, the idea to be the first surname in the list maps for Attrib_00, attrib_01 for second ... I think the context needs to be modified before referencing so that the general key is replaced with the alias. Am I on the right track? Is there any better way? Thanks, ed PS (the comment button is not working for me?) I have no one yet I do not have code, maybe I should understand what I am trying to achieve ... I have an existing application that has been written in Delphi, which helps me maintain a large number of eBay listings. And I do it in the Django / Python Web App. Each product / listing...

c++ - Using Iterators to hide internal container and achieve generic operation over a base container -

I basically want to create a base container class which can return a normal errator to an example of the container Need to specify the class without iterator template, can be used for. I suppose I can not apply the base container to a class template, after which the template class needs traversal algorithms, which do not know in advance. The base container can be inherited and implemented within any (custom or standard) container type / implementation. There are some code samples to clear it: struct MyObject {int myInt; } // A Abstract Container Class Baccountainear {Public: Enter Virtual Zero MyObject (MyObject & obj) = 0; Virtual Iterator getFirst (); // Iterator type is for virtual display only for getLast (); // Iterator type is for demonstration purposes only) // sample container class uses a std :: vector example to manage the object class BaseContainer_Vector: Public Base Container {Public: Zero Insert MyObject (and MyObject & obj) ); Eg eg Just back vector itter ...

What's the proper column type to save urls in MySQL? -

I am using varchar (300) , but I have seen too many URLs . Use TEXT , enter each URL Is enough for>. Note that with the long URL , you will not be able to create an index that covers the entire URL if you have UNIQUE index is required, then you should calculate the URL hash, store the hash separately and instead the hashes should be indexed.

wpf - Select ListBoxItem if TextBox in ItemTemplate gets focus -

I added the DataTemplate to bind the ListBox class Is I name = "lstEmails" height = "259" margin = "12,0,12,41" width = "276" SelectionChanged = "lstEmails_SelectionChanged" & gt; ListBox X & lt; to archive; & Lt; ListBox.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; StackPanel Orientation = "Horizontal" & gt; & Lt; Label visibility = "hidden" content = "{binding ID}" & gt; & Lt; / Labels & gt; & Lt; Text box width = "200" text = "{binding email address}" & gt; & Lt; / Textbox & gt; & Lt; / StackPanel & gt; & Lt; / DataTemplate & gt; & Lt; /ListBox.ItemTemplate> & Lt; / ListBox & gt; This does what I should do. However when I click on Textbox , then ListBox is automatically set to ListItem as the selected does not do. I could do this in code, but I like to use it as a c...