Posts

Showing posts from March, 2013

exception - Good Patterns For VBA Error Handling -

Are there some good patterns to deal with error in VBA? Specifically, what I should do is this situation: ... some code ... ... some code where an error may occur ... ... some code ... ... some other code where a different error could occur ... ... some other code ... ... some code that should always be run (like the end block). .. I want to handle both errors, and resume the execution of the error after the code can occur. Also, at the end, the code should always run at the end - before an exception has been thrown before. How can I get this result? error handling in VBA Get on error error handler label resume ( next | error handler label ) error goto 0 (current error handler disabled) er Object Resets the property properties normally to zero or zero-strings, which is in the error handling routine, but this Psht the error. Clear . Error handling routine ending errors. Category 513-65535 User Errors are available for custom class errors

c# - Is this locking Okay? -

मेरे पास तालिका है जिसमें अनुक्रम संख्या है तालिका संरचना अनुक्रम जनरेटर साल के अंत महीने का महीना intNetNumber int वर्ष + महीना प्राथमिक कुंजी बनाते हैं अनुक्रम हर महीने रीसेट हो जाता है। मैं डीएएल उत्पन्न करने के लिए सबसोनिक का उपयोग कर रहा हूं। अगले अनुक्रम संख्या प्राप्त करने के लिए मैंने एक वर्ग लिखा है जो अनुरोधकर्ताओं के लिए अगले नंबर देता है: निजी स्थिर पढ़ने के लिए ऑब्जेक्ट _ लॉक = नया ऑब्जेक्ट (); निजी स्थिर रीडोनली स्ट्रिंग FormatString = "{0} {1} {2} {3}"; निजी स्थिर रीडोनली स्ट्रिंग संख्याफ़ॉर्मेट = "000000"; सार्वजनिक स्थिर वस्तु GetNextNumber (स्ट्रिंग उपसर्ग) {ताला (_ लॉक) {int yr = DateTime.Now.Year; इंट महीने = दिनांक समय.अब.माँथ; अनुक्रम जनरेटर संकलन col = नया अनुक्रम जनरेटर चयन ()। जहां (अनुक्रम जनरेटर। कॉलम। साल, तुलना। एक््वल, यार)। जहां (अनुक्रम जनरेटर। कॉलम। मौन, तुलना। एक्लॉल्स्, महीना) .लोड (); If (col == रिक्त || col.Qount == 0) {सीक्वेंस जनरेटर tr = नया अनुक्रम जनरेटर (); Tr.Year = yr; Tr.Month = माह; टीआर। NextNumber = 1

How to copy external CSS and JavaScript in XSLT -

मेरे पास एक XSL रूपांतरण है जो एचटीएमएल का उत्पादन करता है। head तत्व में मेरे पास एक सीएसएस फ़ाइल संदर्भ है। & lt; link rel = "stylesheet" प्रकार = "text / css" href = "css / styles सीएसएस "/ & gt; मैं बाहरी संदर्भों के बिना एक स्टैंडअलोन HTML परिणाम बनाना चाहूंगा और इस प्रकार मैं बाहरी सीएसएस संदर्भों को शामिल करना चाहूंगा। कोड दोहराव को रोकने के लिए, मैं हार्ड कोड को शैलियों को XSLT टेम्पलेट में नहीं करना चाहता, इसलिए मैं सीएसएस फ़ाइल की फाइल सामग्री की प्रतिलिपि बनाने के लिए कुछ एक्सएसएलटी कमांड की तलाश कर रहा हूं। मुझे पता है xsl: शामिल या xsl: import काम नहीं करेगा, क्योंकि उन्हें एक्सएसएलटी फाइल की उम्मीद है न तो & lt; xsl: copy-of select = "document ('css / styles.css')" / & gt; क्योंकि यह कुछ एक्सएमएल आज्ञाकारी की अपेक्षा करता है। मेरे पास कुछ जावास्क्रिप्ट कार्य घोषणाएं भी हैं जो मैं भी प्रतिलिपि बनाना चाहूंगा। क्या यह शुद्ध XSLT के साथ संभव है, या मुझे एक्सएसएलटी फ़ाइल (या एचटीएमएल फ़ाइ

SQL conditional SELECT -

I would like to create a stored procedure with parameters that indicate which field should be selected. I would like to pass two parameters "selectField1" and "selectField2" each as bools. I want something SELECT if (selectField1 = true) field 1 Do not select ELSE field 1 (selectField2 = true) Field 2 of field 2 from ELSE table Want the ability to return the areas with permission, which means that the number of returning areas should also be dynamic. It will work with 2 variables. More than anything else will be confused. Choose Selection (selectfield1 = true and selectField2 = true) Select field 1, from field 2 to the table end (selectField1 = true) Start Select from Table 1 Field 1 Select first (selectField2 = true) SELECT field from end field 2 < / Code> This example will help with dynamic SQL multiples is true, at least 1 column is assuming. announcement @ sql varchar (MAX) SET @sql = 'select' IF (selectField1 = true) BEGIN SET @

Making a TFS Branch Read-Only -

We are trying to follow the strategy of the branches and have reached this point where we represent a release With a branch that should now be read-only. For Branches | In the Security tab, it presents six user groups, each of which has 10 permissions in addition to reading, do I have to go through them and prohibit 60 check boxes, or this branch is a better way to read only ? Right-click the branch in the Source Control Explorer, and lock ... option Edit: It is missing a lot when people are finding it, so I will make it more clear. Lock locks in the form of a "pending change" for the person locking the item. Unless the lock is in effect, it will appear as a pending change. When one committed committed to that pending change, the lock continues . While lock is in effect, the lock branch is effectively read only, because (easy to do) locker is the only user who can commit. h / t @AakashM to be shown in the comment

c# - Keep MEX binding insecure while securing HTTP binding w/ UsernamePasswordValidator? -

After We are using Username PasswordValidator with a certificate to secure access to our WCF services. However, the custom authorization policies we are using are SERVICE behaviors, not endpoint behavior, so they apply to all end points, including the MEX endpoint. Want to be able to obtain and receive service references using Visual Studio without commenting, but since both Mex and wshttp endpoint are secure, then we "Add Service Service" .. " Is there any way around this? Is it binding on both of you? If so, try 2 separate bindings - one for MEX endpoint and one for wshttp: For service - something like this: & lt; wsHttpBinding & gt; Binding name = "wsHttpBindingMessageUname" & gt; Security mode = "Message" & gt; Message client CredentialType = "UserName" chat serviceCredential = "True" install securitycontax = "false" /> gt; & lt; / force Kari & gt; & lt; / wsHttpBindi

jboss - accessing request parameters from inside validator -

Is there a proper way to access other form fields from an accredited user? context.getViewRoot (). FindComponent ("formid: exampleField: Example")? fe I'm going to be a valid investigator checking whether the city's area and country is within a custom verifier. Your question again and again I am going to explain it as: "You want to write a custom legalization that checks that if a city area is present, then the area of ​​the country is equivalent to 'US'." First create a Vatilator interface: @documented @ validate class (value = countryAcclasUS.L. . Class) @ Target (Elimenttaip. Tiipii) @ Riseteshn (retention policy. Aryuentiim) public @ interface Kantryaeclsss [string message () should be the country to default, "the city of the country"; } Then create a valid category: Public category country User OAVaider Applicant accredited & lt; CountryEqualsUS & gt; {Public Zero Start (country features arg0) {} P

java - What are FTL files -

I'm new to a project and it must learn from inside. I see a lot of files with extensions of .ftl I'm not sure what they are. I know that they can be modified and the user sees changes at the front end. I think Freemarker template files

c# - How to set a nice name for an e-mail (System.Net.Mail.SmtpClient) attachment -

I am sending the attachment using the System.Net.Mail.SmtpClient in C #. The attachment name is the same as the name of the file I enter the attachment constructor myMail.Attachments.Add (new attachment (attachmentFileName)); How do I go about setting up a "good" name for the attachment? The names I currently have are basically numerical IDs which indicate which incident of the report has been attached. My users are looking for some more friendly things like "results.xls". see: MIME content in the content type related to this attachment Set or set type name value You can like the property to name . In the example inside the last link, you may have: // Create file attachments for this email message. Attachment Data = New Attachment (File, MediaTipName. Application.Octate); Data Name = "very name. // (not in the original example) ... message. Attachments.Add (data);

path - 2D rendering and zooming in with SVG -

My job is to develop an algorithm that fits different types of curves on the point-sequence given in 2-dimensional space. . To be able to test my algorithms, I have selected SVG to display the results. I have many problems with it. Because my algorithms can have very different input and output, it is necessary that I can see the generated SVG files with the ability to zoom in! But in SVG one path can only be displayed with a fixed width. If I zoom in, the width of the path is widening. I would like to have width for 1 pixel at all zoom levels, for example, is there a solution for this? Apart from this: can SVG display points? Yes, simple, raw points. I've found that this can not happen. Hairline stroke "to use the stroke-width of 0. Not so with SVG, however, I thinks what you can achieve if you use percent stroke-width percentage. See, but basically, you should be able to do something like this: Stroke-width: "1%" This should be your curve stroke

replication - Writing to one db while reading from another using DevExpress XPO -

Does anyone have an experience working with DivXpress' XPO, where DB is repeated? From my one and the server to the server, I think it has been decided that there is a way to get replication. They say that everyone needs to be on the master, and all have to come from slaves. It is understandable, but now it is a matter of setting up XPO to write this master (far away), but read from Das (local). I have found a good at DevExpress forums how this can be done, which I intend to try, but I am thinking that anyone has done this, and they have no insights / GATECACE / REFERENCES. edit: Because you do not like the approach first. Here are some master-master replication links, if you have not seen them. Some potential Wikipedia entries (Cached, original link from Google is now dead for some reason) < / P> Have you tried the suggested method on the DevExpress forum yet? Make a session A Call the session A.Disconect () - Set the connection string to s

Java: Syntax and meaning behind "[B@1ef9157"? Binary/Address? -

Hey, I want to know what is the meaning of the [b @ prefix in java. When I try to print byte arrays, they come out though, the sizes 32 and size 4 byte arrays are the same in length. Always "[b 1234567"] What is this? In addition, they have the property of printing hex values ​​only. I know that this can not be just a binary print because the random extended esi characters will be visible Here is an example of a byte [] hashtable mapping print, where mapping is different from a colon, byte , And byte arrays of these 4 byte keys and 32-byte elements. [b @ 1f9157: [b @ 1f82982 [b @ 181ed9e: [b @ 16d2633 [b @ 27e353: [b @ e70e30] [b @ cb6009: [b @ 154864a [b @ 18aaa1e [B @ 3c9217 [b @ 20be79: [b @ 9b42e6 [b @ 16925b0: [b] 14520eb [b @ 8ee016: [b @ 1,742,700 [b @ 1bfc93a: [b @ acb158 [b @ 107ebe1: [b @ 1af33d6 [ B @ 156b6b9: [b @ 17431b9 [b @ 139b78e: [b @ 16c79d7] [b2e7820: [b @ b33d0a [b @ 82701e: [b] @ 16c9867 [b @ 1f14ceb: [b @ 89cc5e [b @ da4b71: [ B @ c837cd [b

sql server 2000 - DTS Connections Error -

I get this error when I try to execute the package: "Currently the connection Used by a task. The connection can not be closed or reused. " Any ideas? The problem was with "Close on full connection under workflow properties" For them all had to uncheck.

Does jQuery send cookies in a post? -

मुझे यह जानना है कि जब मैं $। पोस्ट (...) "पोस्ट-पाठ" आइटमप्रॉप = "टेक्स्ट"> कुकी को अजाक्स अनुरोधों के साथ भेजा जाता है। जब कुकी को कुकी के लिए सेट किया जाता है, तो यह कुकी क्लाइंट-साइड स्क्रिप्ट से छिपाई जाती है, लेकिन कुकी अब भी अजाक्स के साथ भेजी जाती है अनुरोध।

performance - Best scaling methodologies for a highly traffic web application? -

We have a new project for a web app that will display banner ads on websites (as a network) and We estimate it handles impressions of 20 to 40 billion in a month. Our current language is in ASP ... but going to PHP is there a limit on PHP 5's scaling web application? Or, should our team invest in choosing JSP? Or, is this a matter of the app server and / or db? We are planning to use Oracle 10G as a database. There is no crime, but I firmly doubt you < that Said: The language used in PHP or other languages ​​does not really have much to do with scalability. Since application-level delegates have this database or equivalent, since it requires you to have a suitable load balance, it is straightforward to add that much capacity. The choice of language affects the per-server efficiency and therefore costs, but it is different from scalability. It is scaling the state / data collection which becomes more complex. For your app, you have three basic jobs: What a

WPF ListView with horizontal arrangement of items? -

I want to put items in ListView in list mode in a similar manner to WinForms ListView. This is where the objects are not only vertically but also horizontally placed in the list view. I have no problem that the items are kept like this: 1 4 7 2 5 8 3 6 9 < P> or like it: 1 2 3 4 5 6 7 8 9 The order to maximize the use of the available space Both are presented vertically and horizontally. The closest I had this question was: Only the items tell horizontally. It looks like you are looking for one, which will not leave objects horizontally out of So that there is no other place, and then go to the next line, like: () You can use any one, Fixed number will be placed in rows or columns. The way we get the items listed, the listbox, or any other way to use these panels, by changing the item control property. By setting ItemsPanel you can change it to the default stackpellel which is used by item controls. With RapPanel, we should also set the width.

Using scanf() in C++ programs is faster than using cin? -

I do not know if this is true, but when I was asking often on one of the problems in providing sites, I found some that got my attention: Check your input / output methods In C ++, use of cin and cout is very slow. Use these, and you will be guaranteed not to be able to solve any problem in which there will be input or output in good quantity, instead use printf and scanf. Can anyone explain it? Is scanf () faster than using cin >> something in C ++ programs? If so, is it a good practice to use in the C ++ program? I thought it was special, although I'm just learning C ++ ... here A quick test is a simple case: A program to read the list of numbers from standard input and XOR numbers. iostream version: Include # lt; Iostream & gt; Int main (int argc, char ** argv) {int parity = 0; Int x; While (std :: cin> gt; x) parity ^ = x; Std :: cout & lt; & Lt; Parity & lt; & Lt; Std :: endl; Return 0; } scanf version: #include &a

c# - WPF Treeview Item select Problem -

Image
Colorodo पर विस्तार करता हूं तब समस्या होती है I डिफ़ॉल्ट रूप से एस्पेन का चयन किया जाना चाहिए, इसका मतलब है कि जब भी मैं पहले आइटम का विस्तार करता हूं, नोड को चुनना चाहिए .. कोई भी विचार / सुझाव कृपया दुर्भाग्यवश, जैसा कि मुझे यकीन है कि आपने खोज की है, यह है कि आप treeViewInstance.SelectedItem संपत्ति सेट नहीं कर सकते क्योंकि यह पढ़ा जाता है- केवल स्मृति से, प्रत्येक TreeViewItem में एक IsSelected संपत्ति है जिसे आप सेट कर सकते हैं। आप आइटमों को विस्तार / संक्षिप्त करने के लिए सुनने की कोशिश करते हैं और शायद इस संपत्ति को सेट करें। यह खुद की कोशिश के बिना मुझे नहीं पता कि यह एक है) एक अच्छा समाधान ख) अगर यह भी काम करता है। TreeViewItem प्राप्त करने के लिए है कि आइटम के लिए कंटेनर संग्रह उपयोग में treeViewInstance.ItemContainerGenerator.ContainerFromItem (yourDataItem) TreeViewItem के रूप में; एक अन्य विचार (जिस तरह से मैं यह करूँगा) एक सूची बॉक्स / सूची दृश्य का उपयोग करना और हाइएक्रिकल दृश्य को नकली बनाना है। एक दृश्य मॉडल नियंत्रक और आइटम बनाएं, अ

jquery - How to center my a div in a table using CSS? -

I am trying to add a slideshow to one of my websites. The entire page is placed in an HTML table (which I hate obsession and I have not chosen). I want to center my slideshow inside that patticular column. Here's how my CSS looks: #slideshow {position: relative; } #slideshow IMG {status: complete; Z-index: 8; Opacity: 0.0; } #slideshow IMG.active {z-index: 10; Opacity: 1.0; } #slideshow IMG.last-active {z-index: 9; } My JQuery function for changing images: function slide switch () {var $ active = $ ('# slideshow IMG.active '); If ($ active. Length == 0) $ active = $ ('# slideshow IMG: last'); // images use it to activate the markup var $ next = $ in that sequence. Nxt () Length? $ Active.next (): $ ('# slideshow IMG: first'); $ Active.addClass ('Last Active'); $ Next.css ({opacity: 0.0}) .addClass ('active'). ({Opacity: 1.0}, 1000, Work () {$ active .removeClass ('active last-active');}); } $ (Function () {setInterval (&q

reflection - C# generic list <T> how to get the type of T? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 16 उत्तर मैं एक पर काम कर रहा हूँ प्रतिबिंब परियोजना, और अब मैं फँस गया हूँ अगर मेरे पास "मायक्लस" का कोई ऑब्जेक्ट है जो सूची को पकड़ सकता है तो किसी को भी पता है कि नीचे दिए गए कोड में टाइप कैसे मिलता है यदि संपत्ति myclass.SomList खाली है? सूची & lt; myclass & gt; MyList = डेटा जनरेटर.गेट क्लासिक (); LbxObjects.ItemsSource = myList; LbxObjects.चुनल परिवर्तित + = lbxObjects_SelectionChanged; निजी शून्य lbxObjects_SelectionChanged (ऑब्जेक्ट प्रेषक, SelectionChangedEventArgs ई) {Reflect (); } प्राइवेट व्हॉयल रिफ्लेक्ट () {foreach (lbx ऑब्जेक्ट्स में प्रापर्टी इन्फो पाई। सेलेक्टेड इटैम। गेटटाइप ()। GetProperties ()) {स्विच (पी। प्रॉपर्टी टाईप। नाम। टू लवर ()) {केस "सूची 1": {// यह काम करता है अगर सूची & lt; T & gt; एक या अधिक तत्व शामिल हैं प्रकार tTemp = GetGenericType (pi.GetValue (lbxObjects.SelectedItem, नल)); // यदि मूल्य शून्य है तो टाइप कैसे प्राप्त करना संभव है? // मुझे सामान्य सूच

"Regular expression"-style replace in XSLT 1.0 -

I need to use XSLT 1.0 and change which is really suited for regular expressions. Unfortunately these are not available in 1.0 and I'm unable to use any extension libraries such as EXSLT due to security settings. I can not change. The string I am working with looks like this: 19; # John Smith; # 17; # Ban reynolds; # 1; # Terry jackson I need to change the number and ; # with the letter , . For example, the above will change: John Smith, Ben Reynolds, Terry Jackson I know that recursive string function is required, maybe substrings Use and translate, but I'm not sure where to start with it. Do anyone have some hints to work on this? Here I started with: & lt; Xsl: template name = "trimmulti" & gt; & Lt; Xsl: Ultimate Name = "FullString" /> & Lt; Xsl: variable name = "normalized string" & gt; & Lt; Xsl: Select the value = "general-location ($ fullstring)" /> & Lt; / XSL: variable &a

Cakephp: maintaining hasMany/belongsTo relationships in controller actions -

Forgive the title of the question; Spend 20 minutes to write something relevant (suspected if successful). Anyway, using a blog as an example, our models look like this: Many comment comments in the post areTo Post Suppose I want to add a new comment: When saving the comment, before saving, I need to include the foreign key in the parent post (post.id) in the data array. Because I want to make reference to the user in relation - I do not want them to choose a comment from a select area - here are two options: see I: 1) Enter the comment form in the post view. 2) Post ID as an argument (through GIT) in the comment. Action Action (or to write / write / write from session); Save and post back to parents. Observation. Option 1 is great for a blog, but not for the user's profile, the form that can be neatly included in the user view can be very long. / P> Option 2 works, I think, but I have to write some post-specific display / conditions on some comments. Action a

javascript - iFrame with Background Colour in IE6 -

Is there an iframe style possible with background color within MS IS6? If so, how? Thanks Tony You can programmatically do this with the "parent" page with Javsacript in this way. . window.frames ["framename"]. Document.body.style.backgroundColor = "green"; To work for it, however, the page must be placed on the same domain as a parent within the frame.

WPF TextBox Binding Validation Rules not Firing on LostFocus When TextBox is Empty -

We all know how the sexy WPF authentication emerges outside the box. I am trying a very simple thing and for some reason it has always been unsuccessful. I have a text box and my only requirement is that the user gives some information in the textbox Textbox is bound to FirstName and LastName properties with a customer object. Here is the XML code: & lt; Text box style = "{static resource text box style}" grid. Column = "1" grid. Rows = "0" height = "20" width = "100" margin = "10" & gt; & Lt; TextBox.Text & gt; & Lt; Binding path = "first name" & gt; & Lt; Binding.ValidationRules & gt; & Lt; Exceptional Rule / & gt; & Lt; /Binding.ValidationRules> & Lt; / Binding & gt; & Lt; /TextBox.Text> & Lt; / Text box & gt; Customer class is FirstName property here: Set the public string first name {get {return_firstName;} {if (String.IsNullOrE

c# - Providing serialization services in a base class that can be used in derived classes -

I have implemented a data access library which allows deities to mark their derivative classes with attributes, so that they Processes can be stored directly. So far, so good. Now I want to provide a serialize () method or override toasting (), and the derived sections have to get free serialization in XML. Where should I start? Do I have to use reflection to do this? XML serializer using XML serializer In the first example, Will look in the framework that supports the serialization of objects and uses one from XML. The following links provide examples of using this approach: Iasisable and SerializeAttribute One option of this must be to use a formatter and regular and serialization system. However, there is no built-in XML format besides this framework, so you have to roll yourself or get a third party / open source implementation. Do your own roll Also, to run on your object tree, you can consider writing your own system using serializing items according t

css - Dealing with Firefox and Internet Explorer's Differences -

This question is because I came to know that my site was looking good in IE 7 and in IE8 with compatibility-mode But different CSS files? Thank you, Richard If your layout is fundamentally different, then the best solution will be to go back and think about your layout / CSS again. In all honesty, I do not ever need a sheet of two styles - one for FF, and the other for IE A very useful tool is a "reset stylesheet", like With this, most of your elements can be reset to a situation that is compatible with more than one browser. As a result of the thoughtful and patient development, there may be a single stylesheet (Reset Cas, not including text, etc.) which will work for both FF and IE. I suggest you download and start doing your work through your style. It would also be useful to install - IE's Firebug And if you want to test multiple versions of IE together, check out. Designing a site is a difficult process - do not cut short :) If it comes to layo

html - referencing CSS -

I would like to create an HTML link element to refer to a CSS file and I use the same reference to several documents I want to For example, in my CSS file: {root} /style/style.css For files in {root}, I use it: & Lt; Link type = "text / css" rel = "stylesheet" href = "style / style.css" /> but for files in {root} / inc, call me & lt; Link type = "text / root / css" rel = "stylesheet" href = "... / / style / style.css" /> what is the context of {root} Which I can use: Something like this: & lt; Link type = "text / css" rel = "stylesheet" href = "{root} /style/style.css" /> Sorry for the noob question and thanks Just launch the URL with the slash, root {root} : & lt; Link type = "text / css" rel = "stylesheet" href = "/ style / style.css" />

actionscript 3 - Flex Component Lifecycle with Menus - best practice -

I have created a multilevel application in flex with different user roles. I have a menu to navigate between different pages Use a view stack with the bar. However - each time a page is opened, I make some database calls, implementing user role settings, etc. etc. an init () function. This init function can reference some UI elements of this page. I tried to load it with the "creation complete" event, but it triggered only once (because the page stack to each view styled I now see it as "show" It has been put on the incident, but it seems that it is not being constantly triggered, or the first page is completely created for the first time. Is the best practice for this matter? * Pass In Init Functions (Database Calls) * Mani Primitive Components Ideally I will need to call Init every time I load the page and after all the components are created. Thank you for your help, Martin Just an idea but why not try to remotely call the view stack change e

iis 7 - How to configure SMTP in IIS 7? -

How to configure SMTP Mail in IIS 7? I am new in IIS 7 and want to know how to configure it, or better know, how to use IIS 6 SMTP? Nobody knows that where are some videos to know SMTP in IIS 7? IIS7 SMTP server is managed using the IIS6 Management Console.

file io - Switching Writers on an OutputStream in Java -

I have a method that opens the file and closes it to write some data in some data This second The way the printer wishes to use to write data However, I did not want everyone to use the print-wighter to write that stream. Currently it looks like something (clean example ... do not criticize my choice of method or variable names) Public Zero Export RawDataInStream (OutputStream OS) {PrintWriter public relations = new PrintWriter (OS); PrintFirstData (public relations); PrintSecondData (public relations); } Public Zero Export tofile (file file) {outputstream OS = null; Try {Os = new BufferedOutputStream (New FileOutputStream (file)); ExportRawDataIntoStream (OS); DoMoreWithTimeFile (OS); } Finally {if (os! = Null) {try {os.close (); } Hold (exception e) {e.printStackTrace (); }}}} This does not work, unless I put 'pr.flush' at the end of exportRawDataInStream. I can not close PrintWriter because it closes the whole stream Is the flush valid and reliable? Is there an

.net - EOF marker when generating text files? -

When I am generating a text file program, I should finally put the ASCII EOF marker (decimal value 26) file ? Does Net Programming Languages ​​Perform It Automatically? ^ z No reason for EOF > Marker is no longer (has not been long) - It is more than CP / M, which does not support the exact length in the file in the directory - File size was in reference to the number of 128 byte blocks, so non-128 You had to use an EOF character to finish a file on the byte border. From the early versions of MS-DOS, CP / M (and Microsoft had major impact on CAP / M programs) Your program should open text files with the appropriate attributes so that the OS And / or language runtime is a ^ Z if you come across a file that uses the conference but no need to write anymore. A potential exception Is if you have a binary file , But want to have some text in it initially, then a ^ z , then your data if someone dumps it to the console, instead of extinguishing the trash, something w

php - MySQL between query returning redundant results -

का चयन करें webcal_entry.cal_id, webcal_entry.cal_name, webcal_entry.cal_priority, webcal_entry.cal_date, webcal_entry.cal_time, webcal_entry_user Cal_status, webcal_entry.cal_create_by, webcal_entry.cal_access, webcal_entry.cal_dation, webcal_entry_user.cal_category से वेबकल_ंट्री, webcal_entry_user WHERE Webcal_entry.cal_date के बीच '200 9 601' और '200 9 631' जब मैं क्वेरी निष्पादित करें php वापस फेंकता है: mysql_query (): परिणाम सेट को सहेजने में असमर्थ MySQL क्लाइंट स्मृति से बाहर हो गया जब मैं परिणाम देखता हूं कि यह 2.8 मिलियन परिणाम वापस खींच रहा है। इस तालिका में 7,241 पंक्तियाँ हैं। मुझे पता है कि मैं उपयोग कर सकता हूं, लेकिन मैं वास्तव में उस मार्ग को नहीं जाना चाहता। किसी भी मदद के लिए धन्यवाद! आप webcal_entry और webcal_entry_user तालिकाओं में अपने में शामिल हो रहे हैं से खंड पर आपके पास webcal_entry_user से आने वाली पंक्तियों को सीमित करने के लिए शामिल हों या WHERE की शर्तें नहीं हैं I इसका परिणाम दो तालिकाओं का कार्टेसियन उ

c# - Is there a way I can inline a function to an Action delegate and referenced it at the same time? -

Is there any way that I can inline the delegated work instead of separating it into another function? Original code: Private order of de-attachment_fileoak (Object Sender, CancelEventErgus E) {System.Threading.ThreadPool.QueueUserWorkItem ((O) => Attach Do ()); } Attach zero () // I want to inline this function on file aak event {if (it is invisible) {this.Invoke (new action); } Other {// attach it daily here}} I wanted to do it like this (no need to create a separate function): Private Zero Off Attachment_fileAak (Object Sender, CancelEventErguesE) {Action Attached = Representative {if (This. InvoiceEreer) {// But here it is compiled with "Unassigned Local Variable" Use '' 'This. (New Action (Enclosed));} Else {// Regular Activity Marriage}}}; System.Threading.ThreadPool.QueueUserWorkItem ((o) => enclosed ())}} I think this will work: personal reasons fordAttachment_FileOk (object sender, CancelEventArgs e) {action attaching = ft; at

database design - Any ideas on how to implement flickr's tags clustering system? (preferrably in Rails) -

I primarily decentralized, non-normalized, fully open user-submitted tags, all those meanings groups To understand them all through the combination is called "cluster". Does this make it possible for real people to find out what people mean by tags actually used, or it is only done automatically by analyzing how many times the tags go together Are you Feel free to expose such content wildly :) (Also, if it has been discussed elsewhere, I would love to hear about it). read this article. It provides a good overview of the current approach and describes the algorithm for tag clustering.

How to get the id of an anchor tag in jQuery? -

How to get an ID of an anchor tag in jQuery? This is the tag. & lt; Ul class = "formfield" & gt; & Lt; Li class = "selected" & gt; & Lt; A href = "" id = "text" & gt; Text & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "" id = "textarea" & gt; Teddera & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; I need to get an id, i.e., text, text etc. in a variable. I tried to do something like that, but the field value value. ( a) id of a field To get the attribute, you have: $ ('ul.formfield a'). Click (function () {var id = $ (this) .attr ('id'); alert (id);}); To get text content of a tag (the text between opening and closing tags), you will do this: < Code> $ ('ul.formfield a'). Click (function () {var text = $ (this) .text (); Alert (text);}); Please pay attention to the u

internet explorer - Webbrowser unable to perform search and authentication -

Hello everyone Thank you for your time in reading your question. I am hoping that the resolution of the issue issued by me really understands. I've tried Google around many sites, but issues related to my mail can not be found. The problem is primarily on websites where search / database is queried, such as the search for an automobile database in the car sales website. Usually whatever happens, when you select all the criteria for search and start searching, the webbrover does not load, it is not freezing, but only the paragraph time is running slowly and eventually after long it all Shows errors of type (such as PG can not be displayed, server busy etc.) ... Similar websites are also required, which require authentication. Hotmail, in particular, after clicking on login, the progress bar is loading very slowly and finally failed. Recently, this problem also occurs when trying to post threads Please allow me to summarize the problem solving done so far: 1. All different we

asp.net - Cannot access web application (Internet Explorer Can Not find this Page) remotely -

On local machining (server) IIS 7.0 has deployed my asp.net web application and it is working fine. But when I try to access it from another machine in the LAN, I get this error, 'Internet Explorer This page can not be found.' I tried to use the server name address at the terminals and try to use the IP address. Even I have shared the application folder in the network. Check the Windows Firewall on your Vista PC. You need to go through the TCP port 80.

javascript - Selecting class name of a span tag -

मेरे पास इस तरह की अवधि है & lt; span class = 'class_name' & gt; ब्ला ब्ला & lt; / span & gt; मैं इस अवधि के वर्ग नाम का चयन करना चाहता हूं। उस आईएएम के लिए इस। क्लास का उपयोग कर फ़ायरफ़ॉक्स में इसका काम ठीक है। लेकिन एक्सप्लोरर इसके लिए नहीं ... मैं इसे कैसे ठीक कर सकता हूं ?? यह एक्सप्लोरर में भी काम करना चाहिए आप कोशिश कर सकते हैं, हालांकि: $ (यह) .attr ('class');

wpf - How do I access ListViewItem? -

आइटम एक ListView के संग्रह में वास्तविक व्यापार ऑब्जेक्ट्स शामिल हैं ( SelectedItem ) ListViewItem को मैं कैसे प्राप्त करूं? = "Text"> यदि आपको वास्तव में आवश्यकता है, तो ListView की संपत्ति का उपयोग करें हालांकि, आप अक्सर ItemContainerStyle के साथ बाध्यकारी s: उपरोक्त एक्सएएमएल में, ListViewItem s का चयन किया जाएगा यदि अंतर्निहित बाउंड ऑब्जेक्ट का IsSpecial property है true । चयन / अचयनित करने से IsSpecial संपत्ति को अपडेट किया जाएगा।

visual studio - I have just installed VS.NET 2003 which left my newer versions (2005/2008) crippled -

I had Visual Studio 2008 and 2005 installed on my machine, basically for me to work on it VS.NET 2003 must be installed. An old project though now my VS2008 projects are not being compiled since the installation because they are unable to resolve .NET Core namespaces. I am trying to restore .NET 3.5 and VS2008, but still creating the same errors while creating the solution. Anyone had such a experience and had a tip to solve it? strangelly VS 2005 is working fine and it means its work is fine. Although with the NET 2.0 deployment, the ASP.NET MVC project in VS 2008 is definitely using .NET 3.5 and so, I have also tried to reinstall Right in Rifte It is the safest to install in others because they are issued. At this point perhaps the best part is to repair your Visual Studio 2008 installation. You can do this through the control panel - & gt; Remove the program menu AddThis should fix problems you are seeing.

sql server - SQL-How to Insert Row Without Auto incrementing a ID Column? -

I have a table that has a forced auto-increment column and this column is a very valuable ID that will cover the entire application. Sorry to say that this was a bad development in my part because it is a growing pillar. So, here's the problem. I have to enter an ID for the column in this table that has already been created and deleted from the table. Like to reload this ID and put it back into the table. So how can I do this programmatically, without closing the growth of the column? Correct me if I'm wrong, if I stop it programmatically, it will restart at 0 or 1 and I do not want to do this ...

How to use FMS with C# ASP.NET -

I really need to work with using a Flash Media Server C # and asp.Net. Thx in advance. EDIT: I want ASP.N.S. To edit a shared object in FMS Do you mean a video between the consumption / publishing a web page and the FMS? In that case Flash object contacts directly with FMS, it does not matter to your web app asp.net, php, ruby, etc.

Unable to understand compilers' main optimizations -

is a code where compiler calculates the multiplication by optimizing the code in run-time: Martinus code int x = 0; For (Int i = 0; I <100 * 1000 * 1000 * 1000; ++ i) {x + x + x + x + x + x; } System.out.println (x); Its code after optimizing the folding-compiler continuously on compile-time () int x = 0; For (int i = 0; i <100000000000; ++ i) {x + x + x + x + x + x; } System.out.println (x); This optimization technique seems to be a paltry in my opinion. I think it might be one of the techniques that the Sun has recently started to despise. I am interested in the two types of optimization made by the compiler : Optimizations that have been dropped in today's compilers, such as Run-time in the compiler of Java Optimizations that are used with the majority of today's compilers Please, give each other a different answer to the optimization technique. Which technology is used in the 90's (1) and today (2)? Compiler books should p

C# Powerpoint SlideShowEnd problems -

I create a C # application which runs a PowerPoint slideshow. After the slide show is over, I want to stop PowerPoint and return to my program again. The problem I am facing is that I have to click on the end of the slideshow to return to my schedule ... Is there any way that I am unable to wait for a click? Private Zero Show Presentation () {String Strepeation, Stripic; Strpresentation = Application.StartupPath + "\\ testje.ppt"; Bull b asistanton; //PowerPoint.Application objApp; PowerPoint.Presentations objPresSet; PowerPoint.Presentation objPres; PowerPoint.Slides objSlides; PowerPoint._Slide objSlide; PowerPoint.TextRange objTextRng; PowerPoint.Shapes objShapes; PowerPoint.Shape objShape; PowerPoint.SlideShowWindows objSSWs; PowerPoint.SlideShowTransition objSST; PowerPoint.SlideShowSettings objSSS; PowerPoint.SlideRange objSldRng; Graph.Chart objChart; // Create a new presentation based on a template. ObjApp = new PowerPoint.Application (); ObjApp.SlideShowBegi

Is it possible to embed the sidebar with Google Maps? -

We want to use Google Maps to track local garage sales We have created a map () and we Want to embed the website on that website? However, when we do this, we lose the sidebar of the map, which includes all the list of garage sales. We are quite familiar with embedding Google; They have made this process much easier though, is there any way we can embed the map and keep the sidebar list of garages sold? For my knowledge, the best way is to make your own containers of sales and make them You will have a link to a map that is popping up. I'm assuming that you are building and registering your data on Google's site and using the embed feature, which means that my answer is quite a lot of work. You must be a data down source and use the Maps API to create a map and a sidebar. Now your IFrame can not be used, so you will be coding your own solution if you have done javascript first, then it is actually quite easy, if you do not have some good examples.

bug tracking - Any good strategies for dealing with 'not reproducible' bugs? -

Many times you can get or report bugs for errors that are not 'reproducible' They may be reproducible on your computer or software project, but not on a vendor's system. Or takes the steps to reproduce the user, but you can not see the flaws locally. To make so many variations on this scenario, I think what I am trying to learn: What is your company's policy regarding 'copyable' bugs? Shelve them, turn them off, ignore them? I sometimes see intermittent, non-duplicate bugs in the 3-rd party framework, and they are very close by the seller very quickly ... but they are real bugs. Do you have any technique that helps you get these kinds of bug fixing? Generally I am receiving a system information report from the user, and steps to reproduce, search on keywords, and try to see patterns of any kind. Verify the steps used to generate errors Often people or people reporting the error repeat the error, some will do wrong and will not end in the same

windows - How do I add CRRedist2008_x86.msi to Visual Studio Deployment Project? -

I need to add CRRedist2008_x86.msi to my deployment project because it is a requirement for my app, however, Want to run in the form. I do not want it to be added just as a file and then the user has to click on it to run after my app installs. Can someone guide me? It seems that it should be very easy, but for some reason I am missing something. What you want it is set as "merge module" in your deployment project. Instead of .msi, find the .msm file that should be available on the CR website. Then in your deployment project, right-click on the project and select Add-> Merge module. Browse for the file and you are set. When the installer runs, it will automatically open the related crystal report related items and install them for you. You may also need an important file depending on the licensing of the application.

java me - Multiple instances of j2me midlet problem -

I have a J2ME midlet that runs on a cell phone. This code works fine, but the problem appears. That is, this program is running more than one instance. I have the code at the beginning of the app inside the AppStart () method which runs twice when the app starts. Public Micros () {/ p> form = new form ("miegagram"); CmdClose = New command ("XIT", Command.exit, 1); Form.addCommand (cmdClose); Form.setCommandListener (this); Display = Display.getDisplay (this); Display.setCurrent (form); } Public Zero startApp () {form.append ("Start the App \ n"); // Program Program Programs} I do not know why the code is being said twice. I am coding on i290. This is definitely a JVM bug startapp () at startup Calling should be made only once and can not be called by pauseApp () or call can not be made until notifiedPaused () Yourself I recommend that the following code is: Private Boolean Midtown Start = Valid; Public Zero startApp () {if

How to take control if we are playing a video /mp4 file in iphone /ipod? -

What I have to do is play a video file in MP4 format. If the device is in portrait mode it should display the video, but when the user changes the device to landscape mode it should only show one picture. But at the moment when I play a video, it takes control of the whole app; I can not send notification to any event, and after running the full-length video, I return only to my code. We are playing video on the device, so how can we access the other things? Try to create a new thread and Then call the code to play the video from the new thread, leaving it to drop the rest of your code for free, as long as I do not misunderstand your question.

objective c - iPhone Obj-C: Anonymous Category or "private" Category? -

To declare private methods Style-wise (and functionally, if there is any difference), which of these its better? @interface MyClass () @interface MyClass (private) Two syntax serve different purposes. An Enrolled Category - @ Interface Fu (FooCategory) - It's usually used: (1) Extending an existing class by adding functionality . Example: NSAttributedString in the Foundation is enhanced by a category in the appet, which adds AppKit specific RTF-like text formatting API. (2) Declare a set of methods to implement or not by a representative. Example: Various classes declare - but do not implement - @interface nsobject (setodelegate method). Form (2) is now favored that @protocol @optional methods have been extended to support Object-C 2.0. A class extension - @interface Foo () - You are designed to allow additional personal APIs - SPI or System Programming Interface - It is commonly used to implement interiors. It usually appears at the top of the .m file. A

c - Variable Persistence in Linked List -

I am creating a domino game and when the user adds a domino to the left, the domino is added but the function exits Has been added to Domino For information:. The fitxesJoc (link list) is domino of the game and passed for an indicative function (so that it keeps all games) opcionesCorrectas (Domino ) Is the correct option for domino infer is included in the small number of domino large number of superior dominoes position opcionFitxa (integer) player ultimaFitxa-> SEG 'next' node tNode * ultimaFitxa = (tNode *) malloc's choice (include sizeof (tNode)); UltimaFitxa-> info.inferior = opcionesCorrectas [opcionFitxa - 1]. Upper; UltimaFitxa-> info.superior = opcionesCorrectas [opcionFitxa - 1]. Super; UltimaFitxa-> info.pos = opcionesCorrectas [opcionFitxa - 1] .pos; UltimaFitxa-> seg = fitxesJoc; FitxesJoc = ultimaFitxa; function unsigned int demanar_fitxa_tirar (tJugador * jugador, tNode * fitxesJoc, tPartida * top partida, tP

quartz graphics - iPhone: why isn't drawRect getting called? -

OK, I think I'm missing something important, and I can not find an answer. I am posting all the code because it is too small. Anyone please tell me what I'm doing wrong? For example, I have worked on this for example, for some time, and I do not want to do anything. When I make the app, then whatever skeleton gives me a UIViewController I put a scene on the controller I am creating the variable to add to the controller when I UIView my UIView in my UIView I try to connect, so the compiler is okay, but it also insists on connecting with "view", or the app crashes. I would not be surprised if this is the problem, but if it is, So i have to fix it Africa can not understand. Here is the code: DotsieAppDelegate H: #import & lt; UIKit / UIKit.h & gt; @ Class DotsieViewController; @ Interface dotsapadalelett: NSobect & lt; UIApplicationDelegate & gt; {UIWindow * window; DotsieViewController * viewController; } @ Property (Nonomatic, Retaini

Segmentation fault when malloc/free appear in loop in C -

मेरे पास ऐसे प्रोग्राम हैं जो मूल रूप से दिखता है: typedef struct cpl_def {int A; इंट बी; इंट ठीक; संरचना cpls * लिंक; } CPLS; Int मुख्य (शून्य) {int n1, n2; Int संख्या = 300; / * कहना * / int * a; ए = नल; Int * apt; Int * b; बी = नल; Int * bpt; सीपीएलएस * सीएलपीटीआर; Cplptr = NULL; Int i, j; (I = 0; i & lt; 2000; i ++) के लिए {if (i == 0) {cplptr = (cpls *) मॉलोक (num * sizeof (cpls)); / * संरचना का निर्माण / / (सीएलपीटीआर) initalize; } / * ... cplptr पर कार्रवाई ... * / FOO (cplptr); / * ... निर्धारित करें कि मुझे आकार n1 के एक सबसेट (आकार n1 का एक सकारात्मक पूर्णांक जो कि पाश के दौरान बदलता है) cplptr से प्रविष्टियों की आवश्यकता है ... * / n1 = FOO2 (cplptr); एन 2 = FOO3 (सीएलपीटीआर); / * ... cplptr में अतिरिक्त एन 2 प्रविष्टियों के लिए ए, बी के मूल्यों को बाहर निकालें ... * / cplptr2 = (cpls *) malloc (n2 * आकार (सीपीएलएस)); / * अतिरिक्त प्रविष्टियों को संग्रहित करने के लिए एक दूसरी संरचना * / / * .... cplptr2 पर कार्रवाई ... * / / * ... cplptr से n1 प्रविष्टियों की प्रत

HTML DOM: How to call a SELECT box's update method? -

I am writing a VB application that contacts HTML DOM. If I go to this page: And then select "I like the content" SELECT box on the right "Yahoo! Asia ", the default option is selected, I can do this by using this command: Document.Forms.regFormBody.preferredent.selectedIndex = 10 But the problem is that it is not the same behavior as you have manually changed that option to Yahoo! using your mouse, Asia if you manually do this without using the DOM If you try to do this, then after changing it, the page refreshes I'm assuming that this is a JavaScript call or something that refreshes the page that has been chosen, but I have tried to revise that behavior and I It can not be understood. Can anyone help? Thanks in advance. Your On Change is looking for the event. Of course it is a possibility that the form is being submitted by another event, The following additional questions have been updated apparently from the following line:

django - How frequently should Python decorators be used? -

I recently started experimenting with dragon decorators (and higher order function) because it seemed that they could do more to my Django unit. brief. For example, instead of typing: def visit1 (): login () do_stuff () logout () I can do this instead < However, after using some experiments I found that the decorator was not as easy as I had hoped. First of all, I was confused with different decorative syntax which I found in different instances, until I did not think that decorative people behave differently, then I tried to decorate a method, and In the end it was discovered that it was not working because I had to first by adding the __Matching <__ method. During this entire process, I have been confused more than a while and it has still found that it is more common to debug this "decorated" code because it is usually for Python. Now I am evaluating again whether I really need decoration in my code, because my initial inspiration was to save a little bit, be

.net - Does my IBackingStore need to be thread safe? -

The documentation for Enterprise Library says: The way the cache object is operated, You are guaranteed that any banking store will be called in single-threaded manner. This means that you do not have to secure your implementation thread. and related to the Cash Manager: Each method created through the Cash Manager object is secure for call threads. But a simple test proves the opposite: Here's my custom backing store (only the ad is relevant) Public Class Mystore: Ibkingstore {Unstable bull is entered = false; #region IBackingStore Add Member Zero (CacheItem newCacheItem) {if (pointed) new NotImplementedException throw (); Enter = true; Thread.Sleep (1000); Enter = wrong; } Calculate public int {get (throw new non-emulated exposition); }} Throwing public zero flush () {new NotImplementedException ()}; } Public Systems oath. Hashable Load () {New System. Selection. Hashtable (); } Remove public Zero (String Key) {Throw New NotImplementedException; } Public Ze

asp.net - Login and syntax error -

I try to make a login using asp.net 3.5 and sql server 2005, I am creating a dataset And this code but some code is missing in the code protected by btnlogin_Click (ByVal Sender as Object, ByVal E. System.EventArgs) handles btnlogin. Click Login in the New ClassSet.UsersDataTable Dim LoginAdapter as New ClassSetTableAdapters as UsersTableAdapter LoginAdapter.FillBylogin (LoginTable, txtuser.Text, txtpass.Text) DimR as DataRow () = LoginTable. Select ("name = '" and .txtuser.Text & amp; "' password = '" & amp; txtpass.Text & amp;; "'") If Dr. Langs & gt; 0 Answer If the "Copy Redirect" ("MyClassifieds.aspx") Else Label1.Text = "Invalid user name or password" if the end sub it says that password = "& Amp; txtpass. Text in line 5. But what I can not do is help in getting it > You are missing the name and password between "and" statement .Text & amp; "

git - Will a commit be garbage collected if it's referred to by tag but not by branch? -

I have a comment that is mentioned in the Commit (is this thing if it is annotated?) And there is no branch there. Can the garbage be collected after some time? No, the committed garbage will not be collected. One reference from one tag is enough to stay alive.

c# - Determining which code line threw the exception -

One line in dotNet throws an exception and is caught, how can I find out which file to throw exceptions was given? It seems relatively simple, but I can not understand it ... You can only do this if You have debug symbols available hold (ex before) {// ex.StackTrace check property} If you want to debug such a situation, in VS, you better Check that the throttled checkbox in the normal language runtime exception in the exception located in debug checkboxes. Menu The debugger will be broken as soon as the exception is thrown, even if it is in try block .