Posts

Showing posts from July, 2010

python - How to do conditional character replacement within a string -

I have a Unicode string in Python and basically need to go based on the characters, and depending on the characters Replace Some People Rules One such rule is that a is converted to ö , if a is followed by n . In addition, if the line has two vowels, then they are replaced by a vowel and : . So if I have string "natrek", then what is the easiest and most effective way to get "nötaro: k" ? Edit: Two vowels in one line mean the same vowel (o, aai, ii) # - * - coding: UTF-8 - * - Diff subpacer (s, prefix, suffix): deaf sub (i, sent = object)): r = prefix.get (s [ I: i + 2], transmitted) if r is not sentinal: return rr = suffix.get (s [i-1: i + 1], sentinal) if r is not sentinal: return r returns s [i] s = '\ 0' + s + '\ 0' return ' Prefix = {} suffix = {'no' in the array (1, lane (s)) for i (sub (i)) vowel = [(v + v), 'aiu'] for 'aiu' : U'o '} suffix.update (vowel) print subpair (' naturook &#

Does Visual Studio 2008 have something like Delphi's structure view? -

I use the Delphi 2007 in my daily work and now I'm starting to look for VS2008 and C #. Compared to Delphi, a misleading thing is VS. I have a design editor. Delphi has a form designer As you look at the left I can include the hierarchy of components, some of these tepel and other components in the TGOOfbox Are there. It is very easy to change the parent by dragging and dropping in the tree view. Comparing it with VS, which has flat structure, how can I reorganize the layout of components in VS? Is there something I have missed? Regards Are you looking for something like this Or if you are a CodeRush user and DXCore is installed in your visual studio, you can also check it instead.

Convert UPDATE with INNER JOIN from SQL for use in MySQL -

I would like to convert it to MySQL for: UPDATE product SET value = 12.95 Join Product INNER from product_to_category ON product.product_id = product_to_space.product_in join the category product_to_category.category_id = category_ category_id and category.parent_id = 39 MySQL does not like FROM part , And I'm not sure that INNER Johns will also work in writing. Product SET price = 12.95 where product_id (Product for product_d from product_id INNER category Produce on product_to_category.category_id = category.category_id where category parent_id = 39)

qt - How do I resize QTableView so that the area is not scrolled anymore -

I want to keep the size of QTableView equal to that table (and default) so that it is not a scrollbar What you can do is calculate your table view column width according to their data (or you can change the size of each column Can call up to column-to-continents for size on their content). Then, if the width of the tableview is equal to equal or greater then change the total width of the column + vertical headers if shown. If you have been shown the horizontal header then you will need to track the model changes and adjust your table view width, you can resize the columns and adjust them again, there is some sample code for this below: / P> Initialization: // Add 3 columns in the table view control table-> Insert column (0, QModelIndex ()); Table modal-> Insert column (1, qmdale index ()); Table modal-> Insert column (2, qmdale index ()); ... // Close horizontal scrollbar; Although it is not really needed here, Iui- gt; TableView-> Set Horizontal ScrollBarPol

java - IllegalMonitorStateException -

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

java - adding Scrollbar listener to JOGL project -

As the title suggests, I am trying to add an event listener to a project to get a profit . Any help would be greatly appreciated I have never used JOGL, but this link If a 3D painting API looks like this, the general rule for custom pitting is to specify the preferred size of the panel where you are doing custom painting. This is because the scrollbar appears only when the preferred size of the panel is greater than the size of the scrollbar. Your listener should work after the scrollbar appears.

osx - Cocoa Emacs print-buffer -

In the Carbon Amax, I was able to call MX print buffer and saw an OS X print dialog, Printers Now that I have switched to Cocoa Amex 23.1, the print-buffer command does not behave in the same way. It ends up sending the job directly to the printer using the last selected printer (which is probably not even available). What is the Ok XM Print Dialog to Coco Macs? I am also interested in it. I've got a Mac print mode on MXWiki: I have not yet had a chance to see it, but it looks like the one you are looking for.

python - Troubles installing PyQt4 -

I'm following the guide. In Python C: Python 31 is in PyQt4 C: \ Python31 \ pyqt In Cip C: \ Python31 \ sip At QtC: \ QT \ 4.6.0 I followed the instructions of that guide, but when I tried to test it, then , it was said that the module was not present. I checked all the files which the guide has said that it should be present, and none of them exists. What should I do? Oh: Error did not occur from sip import * , print (SIP_VERSION_STR) output 4.10-snapshot -20091204 . There is already a built-in version, why do you still need to make yourself?

Determining output (printing) of float with %f in C/C++ -

I have gone through the earlier discussions on temporary point numbers but it did not clear my problem , I knew this floating point issue could be normal in every forum but my question is not related to floating point arithmetic or comparison. I'm curious about its representation and output% F. The question is straight forward: "How to determine the exact output: float = & lt; some_value & gt; F; printf ("% f \ n", & lt; float_valable & gt;); lets us consider this code snippet: Float f = 43.2f, f1 = 23.7f, f2 = 58.89f, f3 = 0.7f; Printf ("f1 =% f \ n", f); printf ("f2 =% f \ n", f1); Printf ("f3 =% f \ n", f2); printf ("f4 =% f \ N", f3); Output: f1 = 43.200001 f2 = 23.700001 f3 = 58.889999 F 4 = 0.700000 I know that% f (for double) is a default preci of 6 Sai also I know that the problem Or (in this case) can be fixed using double but I'm curious about the output f2 = 23.70000

sqldependency - Cache drop if query has WHERE Clause -

I am using the SqlDependency and CacheManager class (Enterprise Library Cachcing Block) to create a cache in the vb.net project . I have a registration on-dependent change (as an object in the form of a sub-sender, as a squalching an Avent ARG) method to get information back to SQL Server 2005. The problem is that if the query does not contain any WHERE clauses, the cache is successfully created, but if I If you add a clause to the query then theandianspenscise () method will get information soon The cache has been created I suggest that it is possible to have a WHERE clause in the query used for caching. My query (with the WHERE clause) is: SELECT [DATABASES_ID], [DATABASENAME], [SERVERNAME] FROM [dbo] [Database] WHERE datediff (dd, getdate (), [DATECREATED]) & lt; = 0 Thanks Brijesh Check out the limits of SQL appencing questions Removing this article Note specifically: This statement does not use any of the ethical functions including ranking and

SQL Server 2000 Triggers -

Using SQL Server 2000, I need to insert deleted records from one table to another table. What is the best way to get it using SQL Server 2000 triggers? Thanks and relation Sothia on these articles Take a look and

java - Nested synchronized blocks on interned Strings -

The title seems to have many problems in front of me: this is my special case: This is a travel ticket There is a limited amount of tickets in each route, and therefore, buying last tickets for the given route should not be accessible to two people (a standard scenario). However, there is a "return ticket" option. Therefore, I am using the unique route ID (database-provided) to do the following: synchronize (bothRoutesUniqueString.intern ()) { Synchronized (routeId.intern ()) {if (returnRouteId! = Null) {synchronize (returnRouteId.intern ()) {return doPurchase (selectedRoute, selectedReturnRoute); }} Return doPurchase (selected route, selected ReturnRoute); }} The thread is only two inner synchronized blocks to close there if this special route ticket is being purchased by two people on the same time No, if the tickets are purchased at the same time for two different routes. The second synchronization is that if this is due to the fact, then anybody can try to b

drag and drop - C# DragEnter event of the Winforms DragDrop -

Why do we really have to handle the drag destination event dragent? What is the effect of this destination? at source Public Partial Classroom Toolbox: System.Windows.Forms.Form {Public ToolboxForm () {InitializeComponent (); } Private Zero lbl_MouseDown (Object Sender, System.Windows.Forms.MouseEventArgs e) {label lbl = (Label) Sender; Lbl.DoDragDrop (lbl.Image, DragDropEffects.Link); }} at destination: public partial square DrawingArea: form {public drawingia () {InitializeComponent (); } Private Zero DrawingArea_Load (Object Sender, System.EventArgs e) {ToolboxForm toolBoxForm = new ToolboxForm (); This.AddOwnedForm (toolBoxForm); ToolBoxForm.Show (); PictureBox1.AllowDrop = True; } Private Zero picDrawingArea_DragEnter (Object Sender, System.Windows.Forms.DragEventArgs e) {if (e.Data.GetDataPresent (DataFormats.Bitmap)) {e.ffect = DragDropEffects.Copy; } And {e. Effect = drag effect; }} Private Zero picDrawingArea_DragDrop (Object Sender, System.Windows.Forms.DragE

php - How can i get some part of html using XPath? -

I need to get some part of html pages using the php XPath query (sorry, new to XPath ). Example html page & lt; Html & gt; & Lt; Head & gt; Blah Line & lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "mytable" & gt; & Lt; Table & gt; & Lt; Tr & gt; & Lt; Td> Table cell cost & lt; / Td> & Lt; / Tr & gt; & Lt; / Table & gt; & Lt; / Div & gt; K & lt; Body & gt; & Lt; Html & gt; Is there any way to get the div content of the example above with the HTML tag using the Except? The following xpath query will return" mytable "div: // div [@ id = 'mytable']

Replacing a Regex Match Collection in C# -

I should get a text that starts with [and ends] and replaced with that value What does the function do? So, here's an example of what I'm doing here: public string process template (string input) {return reggax. Replay (Input, @ "\ [(* *.] \]", New match Evolution (match match) {return process blocks (match result ("$ 1"))})); } Public string process block (string value) {return Block.FromString (value). Process (); } Now, my problem occurs when I have to edit the block so I can search for blocks, edit them, and convert then to text Thought of Therefore, I created a list of blocks and the ProcessTemplate method has two methods: FindBlocks and ReplaceBlocks : Public Zero FindBlocks (string input) {input = input; Fresh (match match in reggax. Matts (input, @ "\ [(. *.) \]")) Block Add (block frame string (match. Result ("$ 1")); } Public string ReplaceBlocks () {string input = input; (Block block block) input = input C

asp.net - jQuery code behaves differently in Debug vs. Release mode -

I am developing a website where I am using a tab implementation with jQuery. In debug mode, all go well, I was developing it all day, and when I was posted on the live site and compiled it in 'release' mode, tabs do not change anymore. Why would this code behave differently? I'm assuming that this is a JavaScript code that is executed differently. What can I check? Thank you. You can try to check the type of errors mentioned in the answer to your debug code in BTL . . Although you want to mention it to hide a / * jsl: ignore * / tag by the end using it, as if it contains a bunch of stuff that is caught by the lint. / P>

c++ - Method not being called in switch statement -

EDIT: Now works perfectly in the debugger, but usually the block does not rotate while walking. I have a problem that I have run a ton through the debugger and it has narrowed it down. I have got a block on the screen which comes in between and rotates. Obviously the image of the block depends on the rotation, and it is done in a switch statement. switch (m_CurrentRotation) {case BossRotation_ZeroDegrees: {Apply field (m_BossRect.topLeftX, m_BossRect.topLeftY, bosfive image :: p_ZeroDegrees, p_Buffer); break; } Case BossRotation_NinetyDegrees: {Apply surface (m_BossRect.topLeftX, m_BossRect.topLeftY, BossFiveImage :: p_NinetyDegrees, p_Buffer); break; } Case BossRotation_OneEightyDegrees: {Apply surface (m_BossRect.topLeftX, m_BossRect.topLeftY, BossFiveImage :: p_OneEightyDegrees, p_Buffer); break; } Case BossRotation_TwoSeventyDegrees: {Apply Apply (m_BossRect.topLeftX, m_BossRect.topLeftY, BossFiveImage :: p_TwoSeventyDegrees, p_Buffer); break; } Default: {}} The block

python - Google Federated Login vs Hybrid Protocol vs Google Data Authentication. Whats's the Difference? -

I am trying to implement Google Authentication on my website, in which I used Google Google API Pulling data And I'm using Google App Engine with Genezi 2. My question is, many ways to do this are I am confused between Google Federated login, Google Data Protocol, Hybrid Protocol. Are these things the same or different ways to do the same thing? What I have read and understood, which can be wrong, uses Google Federated Log Hybrid Protocol to obtain authentication and Google data. Is there a proper guide to implementing any of these in Python? Examples that I found on the Google link, they are different I understand, if I am wrong then correct me, I only have to apply the OpenID consumer part. To implement Google Federated login in Python, I have seen that we need to download a separate library OpenID-enabled.com found me a separate library for Google data implementation < P> As you can see, I am very confused: D. Please help me :) thanks here especially

javascript - Can sIFR js files be combined into 1 js file? -

In the new CIFR 3, the author has implemented the ability to combine CSS files into 1 file. It has the total number of 4 .js files, and I was wondering if any idea how to combine these files to load faster on client files and I was wondering if it already included sIFR CSS styles There was no way the existing CSS file. These modifications can significantly reduce the load / wait time on the end user and I was wondering if there was any thought on the upcoming builds or if this idea is to be completed. Actually there should be two javascript files posted in production, but yes, you can add them. Do not try to include yourself sifr.js , it is already compressed for you.

svn - Which version control system or platform is the best one for tracking and distributing personal Emacs configurations? -

I currently track my configuration changes of MX and my '.emacs.d' directory for various 'platforms' I use the epilogue to sync. Many packages are part of the Amax distribution such as Ido, Music, or Org-Mode, which come with Debian or Carbon MX (OSX). But the other packages I am also using are not part of those distributions, so I need to add manually to my personal collection stores. The advantage is that now I have my entire '.emacs.d' configuration where I want to work. The disadvantage is that I have to track those packages for updates and every time a new update is available, I have to update my own repository manually. Is there a better way of integrating my own configuration and packages to the 'community' people? I realized that github.com is used by many people for this reason. Should I use Git better instead of syncing and sharing my AMACS configuration with the community? And does it mean that instead of using my own subdivision s

c++ - How to properly initialize class value member? -

We say that we have it: square fu {public: Fu ( Const Bar & amp; B): M_bar (B) {} Private: Bar M_bar; }; Now, about efficiency, it says: Consider the following creator who uses the initial list to launch the member object "x": Fred :: Fred (): X (whatever) {} The most common benefit of doing this is a better performance. For example, if the expression which is the same type as the member variable "x", then in "x" The result of which the expression is created directly - the compiler does not make a separate copy of the object Is. Should the conservator consider the value rather than the context? Since I am using constructor initialization list, will there be any performance difference? Finally, and most important , will there be a sense difference? For example, the new fu (bar) caller thanks - edit - Corrected parameter declaration as Conf reference. I can divide it into performance and differences, as you requested: Can th

c - Memory alignment on modern processors? -

I often see the code such as the following, when representing larger bitmaps in memory: Width of Size_T = 1280; Size_t height = 800; Size_t bytesPerPixel = 3; Size_t bytewidth = ((width * byte pepperix) + 3) & amp; ~ 3; / * 4 bytes * / uint8_t * pixeladata = algorithm (bititude = height); (i.e., a bitmap that is aligned with a certain number of bytes in a batwidth , most commonly 4) allocated in the form of the nearest block of memory is done. A point is placed on the image: pixelडेटा + (byteudith * y) + (bytepixel * x) This clue gives me two questions: Does this align a buffer like this, which affects the modern processor? Should I be worried about alignment, or would the compiler want to handle it? If it has any effect, can anyone point me to a resource to find ideal byte alignment for different processors? Thank you. It depends on many factors if you have access to pixel data at only one byte at a time , The alignment will not create the vast majo

memory leaks - problem with MFC Diagnostics -

So I implemented my memory tracking (in this question) and to identify my memory leaks, Tried to use So I really have been described here: This is my code: #ifdef _DEBUG CMemoryState oldMemState, newMemState, diffMemState; OldMemState.Checkpoint (); #endif int * test = new int; #ifdef _DEBUG newMemState.Checkpoint (); If (DiffMemStatekDifference (Puranammstet, Nyammstet)) (Tracey ( "memory leaks! \ N"); diffMemState.DumpStatistics (); diffMemState.DumpAllObjectsSince ();} #endif But Displaying output, instead of outputting any useful information <0> memory leak! 0 blocks by 0 free blocks. 1 in 4 blocks in normal blocks 0 bytes 0 CRT blocks 0 blocks in 0 blocks Ignore 0 0 bytes in the client blocks The largest number of use: 0 bytes Total allocation: 4 bytes Dumping objects - & gt; {714538} normal block 0x029628 C8, 4 bytes long data: & lt; & Gt; CD CD: \ dd \ vctools \ vc7libs \ ship \ atlmfc \ src \ mfc \ thrdcore.cpp (306 ): {714536} on the

asp.net - Retrieve data from DataList -

This will be a simple table on the page, which has some initial cells and another user should enter. I use ItemTemplate with DataTemplate: & lt; ItemTemplate & gt; & Lt; ASP: text box id = "celltextbox" runat = "server" text = '& lt;% # bind ("cell")% & gt; / & Gt; & Lt; / ItemTemplate & gt; In the code, I override this control database (): public override zero databind () {MyDataList.DataSource = dataTable; MyDataList.DataBind (); } It does not work anymore. Users enter some cells and click the Submit button, but the data is not included (Data of this button in the method of handing onclick event) - only initial What should I do? I'm not sure that I fully understand but I think that you have problems because you have a page There is a need to check a post on the load. You can try something like this: Public Zero Page_load (object sender, event case e) {if (! This.IsPostBack) { MyDataList.Data

php - Nice way to pass parameters to PDO -

When working with 3 or 4 criteria, the status criteria become a nightmare. Nominated parameters are verbose I'm thinking of doing: query ("user WHERE user name =", $ username, "and password =", $ password) with dynamic parameters (using func_get_args () ), each other is being converted into a positional parameter. I have never seen this before and wanted to know that someone has done this before and why / why not? This is a smart idea. I see that there is only one problem that the SQL and pass-in variable How to differentiate between Unless you do not make a assumption that every other ARG is a variable I think the perception is delicate, and makes things unclear, makes things more clear than that. A better method might be the use of interpolation: query ("SELECT foo FROM bar WHERE id = # {id}", array ("id" = & Gt; "23")); Then type the argument to launch them.

licensing - ANTLR grammar license -

I am planning to implement Lua for DLR, and I want to use the Lua 5.1 grammar listed. Although I do not see a license which was issued to it, can someone please me please talk to me in the direction of the license? Excluding lexical parts, grammar looks like this is from the Lou Reference Manual, which is written by MIT License Is subject to

java - How do you uninstall the Scala Eclipse plugin? -

I tried installing an advert eclipse plugin advertised. The version of SpringSource Tool Suite 2.2.1 that I installed with me is thinking that everything will be fine. I am still using Mac OS 10.4, and thus have not upgraded to Java 6. Take, and see, I was wrong. Even after adding the Scala plugin I can not restart STS so I would like to remove it from config files so that eclipse does not try to load it anymore. I have removed anything that matched artifacts.xml and config.ini. I removed the scale jar from the plugin directory, but there is no luck Do any of you Eclipse Scala Plugin Can you suggest some more to remove? In Eclipse 3.5.1, go to Help-> About Eclipse, then press 'Installation Details' . In the tab 'installed software' you can remove a feature, you can return to the previous configuration in the tab 'installation history'. Since you have removed the pieces manually, so it can be too late to fix things. To clear the OSGI bundle cach

iphone Development - GDB error signal EXC_BAD_ACCESS -

मुझे संकेत त्रुटि EXC_BAD_ACCESS मिलता है जब यादृच्छिक BallPick विधि से वापसी आउटपुट को पुनर्प्राप्त करने का प्रयास करते हुए, i शायद यह गलत है। NSString * temp = [आत्म यादृच्छिक BallPick]; UpBall1.image = [UIImage image नामांकित: temp]; सरणी (कंटेनर) बनाए रखना / रिहाई आइटम जो जोड़े / हटाए गए हैं। ऑब्जेक्ट को रिलीज प्राप्त होगा जब इसे removeObjectAtIndex: से कंटेनर से निकाल दिया जाता है: ताकि आपको < इसे हटाए जाने से पहले और autorelease को अपनी पद्धति से वापस लौटाए जाने से पहले को बनाए रखो। NSString * चुने गए एफिलन नाम = [[[इमेज एरेरे ऑब्जेक्टअटइंडएक्स: चुने] बनाए रखा गया है) ऑटोरिसेज]; [इमेज एरे को हटायें ऑब्जेक्ट आटेंडेक्स: चुना]; चुने हुए एफिलन नाम;

ms access - Error in getting Dates in database (BETWEEN Clause| VB.NET|OLE) -

Shortly before, I used a code to get between 2 dates from the database (date With column dd / mm / yy), I think it works best for the first time, the code is: New date in the form of a slow B as a whole (a value) Tx2.Text) b = System.DateTime.Today B = B. Ed. (-a) MSBBC (B) Con. Open () SQLRR = "Choose from TB * where between the last circuit # 01/01/1800 # and #" & amp; B & amp; "#" Dim DataAdapter1 New OleDbDataAdapter (SQLstr, Connecticut) DataSet1.Clear () DataAdapter1.Fill (DataSet1, "Tb") Conn.Close (as in) As you see , Enter a number to the code user and make it today by making zero, then calculate the date I want, after that I use the pen to get all the dates between them < P> But now, this code gets some data and overrides others, I mean Some dates are between TWOs, but the code never gets, why does this happen? If you look at the generated SQL string, then what is your hope on that date? is? I think it would be a data

java - Download a non html file with HtmlUnit -

I am writing a JUnit test that includes downloading a file from the web app. How can I do this with HtmlUnit? I do not file that type, but maybe this code test may be helpful if other tests Do not try to get the answer.

asp.net - how to open new IE window on click of hyperlink -

"text =" & lt;% # Eval ('name')%> "लक्ष्य =" _ रिक्त "रनैट =" सर्वर "/> यहां यूआरएल नेविगेट करने के लिए बाइंड किया हुआ टेक्स्ट किसी भी यूआरएल (जैसे: एएसपीएन, google.com) हो सकता है यह मेरा कोड है जब मैं कोशिश करता हूं एक नई आईई विंडो खोलें क्योंकि मेरी फाइल एक निर्देशिका व्यवस्थापक / abc.aspx के अंतर्गत है, अब यूआरएल में यह इस तरह खुलती है: लेकिन यूआरएल में इस www.asp.net की तरह होना चाहिए ताकि यह वेबसाइट खुल जाए कोई भी मदद महान होगी धन्यवाद अपने यूआरएल को http: // के साथ शुरू करना याद रखें, अन्यथा यह सोचना होगा यह एक सापेक्ष यूआरएल है।

asp.net mvc - RouteLink without link? -

Is linking to the route table without linking? i.e. only www.foo.com/someroute/34 without linking / m You can use the extension method: & lt;% = Url.RouteUrl ("default", new {id = 75})% & Gt; And if you want a full url: & lt;% = Url.RouteUrl ("default", new {id = 75} Request Url.Scheme)% & gt;

svn command line utility will not work if full file name is longer then 256 characters -

I can not copy the work from the command line via the svn utility, if the full filename for some files is too long . But I can successfully copy work from TortoiseSVN or subclips. Why? As an alternative solution, you can copy the code to subst To keep the length of the path below, you can do the drive letter: c: \ user \ me \ svn \ my \ cool \ repository \ \ one \ lot \ long \ path & gt; ; Subst S:. C: \ Users \ My \ SVN \ My \ Cool \ stores \ with a \ lot \ long \ path & gt; S: S: & gt; Svn up

visual studio - Component Object Model via C++(maybe VS) -

I was searching through Google about the Microsoft component object model. Only a few steps were found on the basis of only a few general articles and steps, which did not work. Are there any links / references / books / tutorials that give you VS Know how to make Simple Comp component through C ++? Any answers or help would be appreciated! "post-text" itemprop = "text"> COM is generally considered ancient technique these days, do not say that no one is still using it - lots of There are legacy systems that still invest in it - but nowadays it is rare for someone to come to Newby. I'm not sure things have gone too much but my recommendations will be there and. Actually my overwritten recommendation will be to avoid this if you: -)

sql - Regarding case when in stored procedure -

मेरे पास क्वेरी है। घोषित करें @Prm_CourseId int घोषित @Prm_SpecializationId int सेट @Prm_CourseId = 5 सेट @ प्राम्मिललआईआईजी = 0 घोषित @WhrStr varchar (500) सेट @WhrStr = मामला @Prm_CourseId जब 0 और फिर 'ई। कोर्सेड रिक्त है या ई। कैर्सआईड रिक्त नहीं है' -1 तब 'ई। काउर्सआईडी रिक्त है या ई .CourseId शून्य नहीं है 'जब isnull (@ Prm_CourseId, 0) तो' ई। काउंसिल नल है या ई। कोर्स ई 'नहीं है' और 'ई। कोर्सईड =' + कन्वर्ट (varchar, @ Prm_CourseId) अंत @WhrStr = मामला सेट @Prm_SpecializationId जब 0 तब 'ई। स्पेशलाइजेशन आईडी रिक्त नहीं है या ई। स्पेशलाइजेशनआईडी रिक्त नहीं है' जब -1 फिर 'ई। स्पेशलाइजेशन इंक रिक्त है या ई। स्पेशलाइजेशन आईडी' रिक्त नहीं है। ZationId, 0) तो 'ईएस स्पेशलाइजेशन इडाल रिक्त है या ई। स्पेशलाइजेशन इड रिक्त नहीं है' और 'ई। स्पेशलाइजेशनआईडी =' + कन्वर्ट (varchar, @prm_SpecializationId) अंत प्रिंट @WhrStr exec ('select f.EnquiryID, e। [Name ], F.Attendbyby, f.Remarks, f.CreditedDate से STD_FollowUp

SQL Server distributed databases -

How to link two separate databases into a single SQL server instance and send questions between them < / Div> Use as below. DB1.dbo.TableFromDB1 DB2.dbo.TableFromDB2 DB - Database

java - Getting raw text from JTextPane -

In my application, I use the JTextPane to display some log information. As I want to lighten certain lines (for example error message) in this lesson, I have set contentType as " text / html ". In this way, I can format my text. Now, I am creating a pocket button that copies this JTextPane content into the clipboard. This part is easy, but my problem is that when I call myTextPane.getText () , I get the HTML code like this: & lt ; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; Blabla & lt; Br> & Lt; Font color = "# FFCC 66" & gt; & Lt; B & gt; Fauber & lt; / B & gt; & Lt; / Font & gt; & Lt; Br> Blubber & lt; / Body & gt; & Lt; / Html & gt; Instead of just getting raw content: Blubal Fobar Blubber Is there only one way plain The contents of my jtextpane in the text? Or do I need to change the HTML in raw text by myself? based

c# - Html.RenderAction is not available after including Microsoft.Web.Mvc dll -

We want to use Html.RenderAction in our MVC1.0 project. I have downloaded the Futures Microsoft.Web.Mvc dll from codeplex, it has copied it into our project bin folder, and added a reference to it. However, when I try to use it in any one, the HTML renderer action is still not available. This may be a silly extension, which I am missing, but I do not know what else I have to do: ( PS I checked, and I really In "Microsoft Web.MVC.View Extensions.Renderer Action" and I complete the Visual Studio code, so it appears that DLL is included in the project correctly. You can do this in web.config "Name space" tag. gt; & gt; page & gt; & lt; namespace & gt; & lt; add namespace = "Microsoft. Web.Mvc "/> gt; & lt; / namespaces & gt; & lt; / pages & gt; & lt; /system.web>

python - Django search capabilities -

Is there an easy way to add search capability to fields in Django? Also please tell me what is the search. Try it is very easy to setup. A full-text search engine written in Java.

sql - changing multiple column names with a single query -

In MS-Access, how to write a query / DDL to replace multiple column names with a single query. You have to create a new table, copy data, old table drop < P> does not support multiple ... Optional column segment You can add more than one column at a time, then populate, then drop the old columns. Multiple ADDs are supported.

c# - Why this performance difference? (Exception catching) -

While reading a question about what our computer can do in a second, I did a little test, While and I am very surprised with the results. Look: A simple program for catching zero exception takes approximately one second for 1900 iterations: for (long c = 0; c & Lt; 200000000; c ++) {Try {test = null; Test.x = 1; } Catch (Exception pre) {}} Alternatively, if test == faucet is being checked before assigning, then aprox 200000000 repetitions in the same pogram one second Can do. for (long = 0; c & lt; 1900; c ++) {test = null; F (! (Test == faucet)) {test.x = 1; }} Why is the description of this vast collection to any person? Edit: Run the test in the release mode, I'm getting 35,000-40000 iterations versus 400,000,000 iterations (always aprox) outside of Visual Studio < Strong> Note I have a crappy PIV 3.06Ghz P> There is no such way , Unless you are not running in the debugger, then another should take 1900 iterations. Running a demon

Problem requiring resource PHP Codeigniter -

So I had a problem last night when I went to upload a project that worked locally on my server was doing. I had this: require_once "/../ controllers / source / myspace id / myspace.fp"; The correct path for that file was its way outside the libraries folder until I put it on the server, until it worked fine. Any ideas? On the server you resume the current work directory (echo getcwd ();) and check It seems strange to me that the CI will use the library / library as your operating directory - unless you set it yourself. Note that you should use the APPPATH of the Code Igniter continuously, to make the full path rather than relatives, this will make things easier for you for a long time.

Java EE for a .NET developer -

I'm always a .NET developer. I've created some swing applications in the past and I handle Java language very well But I do not have much knowledge of any other related technologies for JavaEE or enterprise application development. 1) What are the technologies relevant to entreprise development in Java? 2) What are the best places online for them to know? 3) Is there any online repository of information for Java MSDN Library? 4) Which development tool is recommended for this technique? Thanax What are the relevant technologies for entreprise development in Java ? Serlet / JSP is the most important I can say. This is part of Java EE Spec and the Java Web Framework is the basis for 99%. The second is the Spring Framework, which should be "almost" The best places to know them are online? Writing code, of course. Is there any online store of information for Java like MSDN Library? There and others. Which development tool is recommende

objective c - How to implement an NSTextView that performs on-the-fly markup to RTF conversions -

I am trying to create a NSTextView that can take the "marked" input, which is automatically beautiful RTF-style Text while user type The idea is that the user should enter text in the "plain text" format, but to "beautify" it on the spot, like H1 is a quick list : * First item * second item will be used in the first line with a headlined font, followed by a bulleted list. I find so much of the possible ways of doing this, but the text system is incredibly complex (with reason) and if I already have some appropriate built-in "own cooking" Do not want to start BTW I will be happy with Snow Leopard only APIs. The first thing I thought was " data detectors ", but I could not find a public API to do this. After reaching the end of the road with it, I changed the new " Text Input Source API ". These are all kinds of things, but the "Data-Driven Input Method" section of WWDC 2006 presentation "Low C

python - Object appended to a list instance appears in a different instance of that list -

I was writing this small piece of code as an exercise in object-oriented programming. Here I am trying to define a house and every room as a list of devices (lamp, for example) as a list of rooms. At first I created all the items and added those two rooms to the house and a separate device in each room. Pretty basic The problem is that it seems that the device is being connected to both rooms. Why is it like this? Code: #! / House / room / room: house / house / room / house: deft __int __ (self, room = list): self Room = room print ('home made') class room: def __init __ (self, name = 'one room', devs = list): self.name = name self.devs = devs print ('room' + self .name + 'created') Category device: def __init __ (self, name = 'a device'): self.name = name Print ('device' + self.name + 'created') DEF main (): # 1 H = House () R1 = Room (name = 'r1') r2 = cell (name = 'r2') = 1 = device name = 'la

c# - Calling descendant virtual methods from static method -

पहले इसे स्थापित करें। मेरे पास सार्वजनिक सार क्लास फ़ू {सार्वजनिक स्टेटिक रिक्त StaticMethod () {}} पब्लिक क्लास बार: फू {} कॉल करने के लिए यह मान्य है बार.स्थिकम पद्धति () ; ??? यदि हां, तो पिछले उदाहरण का विस्तार करें: सार्वजनिक सार वर्ग Foo {सार्वजनिक स्थिर शून्य StaticMethod () {} सार्वजनिक सार शून्य वर्चुअल मेथड (); } पब्लिक क्लास बार: फू {सार्वजनिक ओवरराइड रिक्त वर्चुअलमर्थ () {ट्रेस.WriteLine ("आभासी से स्थिर !!!!"); }} मुझे बेस क्लास में StaticMethod का निर्माण कैसे करना चाहिए ताकि मैं व्युत्पन्न वर्गों से VirtualMethod का उपयोग कर सकूं? ऐसा लगता है कि आज मेरे पास बहुत कम / बहुत कैफीन था और मेरे दिमाग में कुछ भी नहीं आया। एचएम, मुझे पता है कि मैं स्थिर विधि से उदाहरण पद्धति नहीं खोल सकता। तो सवाल यह आता है: क्या मैं आधार वर्ग की स्थिर विधि से व्युत्पन्न वर्ग का उदाहरण बना सकता हूं। जैसे कुछ का उपयोग करके: सार्वजनिक स्थिर शून्य StaticMethod () {derived d = new derived (); d.VirtualMethod (); } मैंने नए कीवर्ड का आविष्कार किया, जिसे

javascript - force popup to display on the top of the page -

I have a popup that is removed by hovering over a link in the iframe embedded within the main page . Currently, this popup is rendering on the iframe and is cut. I want to display the popup at the top and not in the frame. As far as I can see, it can not be done in a reliable and simple way . You have to display the popup in the original frame, because it is the only one that can hover over your iframe. If the popup is attached to the position of the mouse, the amount of effort required to cross-compute the correct positions and move them to the original frame is huge and very complex.

database - Saving order preference in SQL -

I am trying to see what is the best way to handle the following scenarios I have a table called, the user says, and I have a table called items. Each user can have many items in his account. I have another table, which tells that the associate item, which maintains the connection between the user and the objects. (Link to ItemID for UserID) Users can have many items, so there are many relationships between users and items. The order in which these items are displayed is important, and the order changes from the user UI (like the Netflix queue). So I need to save the order in some place, say the priority table. So I can save the display order for each user. I thought about a simple XML to save the order. It is said that there are items of 1, 3 and 5 in the user's account, and the display order is 3, 5, 1. I can maintain an XML and change it when the user changes his display preference & lt command & gt; & Lt; Items & gt; 3 & lt; / Item & gt; &

c# - format string email to email-link -

I have a blank-string email, and I would like to format the string as a mail link if it is valid . Like this: & lt; A href = "mailto: foo@foo.com" & gt; Foo@foo.com< / A & gt; How is this done? / m email address (string email address) {Regex emailRegex = new Regex ("^ (?!! *.) [A-zA-Z0-9 \ w \ ._% &! * * = ^ + - ?.] * @ [One- ZA-Z0-9] [\ w \ .-] * [one-zA-Z0-9] * \ [a-zA-Z] [ZA-Z to one.] * [A-zA-Z] $ "; If (emailRegex.IsMatch (email address) {return string format (" & lt; a href = \ "mailto: {0} \" & gt; {0} & lt; / a & gt; " Email address);} return "";}

data binding - Bound gridview problem; jquery resolution in unbind? -

Good evening all. I have a puzzler for you. On my page I have a cascading DDL (DDLBear), a textbox search (TBXproduct) and a radio button list (redtape). These, once populated and a submit button is clicked, produces invented gridview with data. What I am trying to achieve is that the user can choose only the DDL, text box or the radioactivity list as a method to create gridview data. I have achieved it, Jquery 'clears' the gridview of syntax and resets different search methods, for example. & lt; Code & gt; ddlBuyer.Attributes.Add ( "onclick", "$ ( '# tbxProdAC') val ( '.'); removal ($ ( '.') val ( '# txtbxHowMany') ;. $ ( '# GridView1') ); $ ('# RadTopx input') et ('check', false); $ ('# redprode'). Et ('check', wrong);); & Lt; / Code & gt; However, because it is occurring client side, server-side events (ie ddlBuyer_SelectedIndexChanged) is still being execu

pass strings by reference in C -

I'm having trouble finding out how to pass the string back through the parameters of the function. I'm new to programming So, I think that this is probably the starting question. Any help you can give will be most appreciated. This code is a bug fault, and I am not sure why, but I am providing my code to show what I have done so far. I've made it a community wiki, so edit. PS This is not homework. This is the original version #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; String.h & gt; Zero fn (char * baz, char * foo, char * times) {char * pch; / * This is the part that I'm having trouble with * / pch = strtok (baz, ":"); Fu = Molok (Stellon (pH)); Strcpy (foo, pch); Pch = strtok (NULL, ":"); Bar = Molkok (Stellen (pH)); Strakpy (bar, pc); Return; } Int main (zero) {Charlie * Mayabaz, * Mafoo, * Mayurbar; Mybaz = "Hello: world"; FN (Maybus, Mayfu, Maybar); Fprintf (stad

Translating algorithm/code from Ruby to PHP -

डाइजेस्ट = HMAC.digest (Digest.new (SHA1), Base64.decode64 (कुंजी), HashString) वापस Base64.encode64 (digest.to_s ())। Chomp () उपरोक्त PHP में क्या होगा? इसे ऐसा करना चाहिए: $ digest = hash_hmac (" Sha1 ", $ हैश_स्ट्रिंग, बेस 64_डेकोड ($ कुंजी), सच है); वापसी base64_encode ($ डाइजेस्ट);

Equivalent function to C's "_getch()" in Java? -

I use Google Wave, and I actually imitate the ability to send messages before pressing Enter key. Want to do What is the function _getch () ? is a Java equivalent? I found a code, equivalent function of C "_getch () public static zero getCH () {last JFrame frame = new JFrame ()); synchronize (frame) { Frame.setUndecorated (true); Frame.getRootPane () setWindowDecorationStyle (JRootPane.FRAME); Frame.addKeyListener (New keyListener) {@Override Public Zero Key is pressed) Pressed (keyEvent e) {Synchronize (frame) { Frame.SsetVisible (false); frame.dispose (); frame.notify ();}} @ Override Public Zero KeyRelated (KeyEvent e) {} Override Type of Public Wide (keyEvent e) {}}; frame.setVisible (Right); Education {frame.wait ();} catch (shown Iksepshn E-1) {}}}

executorservice - What is the advantage of Executors over Threads in multithreaded application -

I have seen many comments that executors are better than threads, but if you have many threads that communicate via bound Do buffers (in the form of flow-based programming) whenever you want to use threads in any way, why would you use executors (with new catch Threadpool (?)) Also, I have isAlive () Using methods like, interrupt () - How do I get the thread handle? Does anyone have sample code that I can write? ; -> Executives are basically an abstract on thread, they allow you to differentiate your potential parallel argument Runs in a runnable / callable instance, which allows you to manually start a thread or free from the duties of building or managing a pool. You still have to handle the dependency as part of your application logic. If you want to feel comfortable / intuitively with threads for your application logic, you can skip using executors. Regarding holding the thread, you can always execute the thread. Credaththread () to capture the current thread from an e

unit testing - How can I run many test cases for a test method -

I am using JUnit. I have a method and a test method to test some test cases. I want to run all TES cases in that test method, but I can not do this. When the case of the first test fails, the examination method does not run for the second exam. This is my code Public Class ComputeServiceTest TestCase {// test add method} Add Public Zero Test () {ComputeServices Example = New ComputeServices (); // The first test case is x1 = 7; Int y1 = 5; Int expResult1 = 13; Int result1 = instance.add (x1, y1); AssertEquals ("First test case failed", expresult1, result1); // second test case in x2 = 9; Int y2 = 6; Int expResult2 = 15; Int result2 = instance.add (x2, y2); AssertEquals ("second test case failed", expResult2, result2); } How can I do this? The standard advice here is to put your second test case in a different way, even if "before the trial case "Whether successful or not, it can run. You can use a setup method to start ComputeServices, f

subtracting a percentage from a value in php -

I is typing something similar to the coupon code function, and the set amount of the amount together with the set amount My code is as follows; $ amount = "25"; // Discount amount $ percent = "yes"; // Is the coupon (yes) percent, or (any) a flat amount if ($ percent == "yes") {$ newprice = ???????; // Decrease the amount of Dollar value; from $ value; And {$ newprice = $ value - $ amount; // if not a percentage, completely subtract from value} I'm searching for you to find Google while searching for a solution, but I thought the ID was posted here In addition to helping others, there is also one problem which can be the problem. How about it? $ newprice = $ value * (($ 100- $) / 100);

oop - PHP: How to pass existing database connection to static class methods? -

I have a set of static class methods. I have an existing database connection in the object variable $ DB stored in the script. How can I call those static class methods and use them to use that Debian object every time it passed as a parameter on class method? For example, I unfortunately use a global now: square fu {public static function bar () {global $ db; Return $ DB-> DSN_STRING; }} It seems that I need to have my static class to call themselves regularly, in any way, $ DB connections without having it restored. Note: I can not inject it into static classes because it is not interactive. Of course, the problem is solved if I switch from a stable class to regular class and instantiate my $ Foo object then I can inject $ DB var as a setting on the public variable To get a $ DB var or add a public law and then set the Private World of $ Foo Object or, accept a class constructor $ DB Var and set the Private World of $ Foo Object. But all three techniques require that

php - How to cover an area using bing map? -

Is there any possible way to cover the area using Bing MAP. Visit this link. / P> I need this to see how it looks like. Any help would be appreciated. Thanks n advance You need to use it. You have to make an example of the VEMAP class centered in your interest area, and then make one or more examples of VEShape and add them to the map The following code creates a shape covering India's border: Make a map map = new VEMAP ('myMap'); // Set Center and Zoom Level Map Loadmap (New Veilatong (22.268764039073965, 79.98046875), 4); // Make size (area) with TL, TR, BR and BL Size size = new weaship (Weissip type polygon, [new vilatong (32.84267363195431, 68.02734375), new wallelet long (32.84267363195431,90.87892525), New Velette Long (4.915832801313164, 90.878 9 625), New Veilatong (4.915832801313164,68.02734375)]); // format size if necessary var fillColor = new vicholor (226, 224, 21.9.0.5); Shape.SetFillColor (fillColor); // Map to add the map map. AddShape

Reading Tables and columns in SQL SERVER using C# -

Is it possible to set the table and its column in a specific database in SQLserver using C #? Can anyone direct me to this issue? Take a look at this link

Persistent Qt Local Socket IPC -

I am developing an application that uses IPC between local server and client application. There is nothing special in it because it is structured like Qt documentation and examples. The problem is that the client often sends packets and connects to the server / disconnecting the local socket (named pipes on NT) is very slow. So what I am trying to achieve is a "continuous" connection between the two apps. (Connect ()), this, signal (connect ()); _blockSize = 0; _socket-> Abortion (); _socket-> Connect ToServer (name, QIODevice :: ReadWrite); } and also sends the request in the traditional QT manner: zero IRtsClientImpl :: SendRequest (quint8 cmd, const QVariant * const param_array, unsigned int cParam ) {// Socket Data Send via QByteArray HDR (PROTO_BLK_HEADER_PROJ); Cubic Array Data Block; QDataStream Out (& Datablocks, QIODevice :: WriteOnly); Out.setVersion (QDataStream :: Qt_4_5); Quinn 8 command = cmd; Outside & lt; & Lt; Bloc

.net - Can anyone explain to me what is the meaning of the boolean parameter of the System.Xml.XmlDictionaryWriter.WriteNode(XmlReader, bool) method? -

एमएसडीएन के अनुसार: defattr प्रकार: यदि सत्य , से डिफ़ॉल्ट विशेषताओं की प्रतिलिपि बनाएँ; अन्यथा झूठी । यदि सत्य , डिफ़ॉल्ट विशेषताओं का उपयोग करें; अन्यथा झूठी । और मेरा सवाल यह है कि इस लेखक का क्या अर्थ है? प्रत्येक XML तत्व में एक डिफ़ॉल्ट विशेषता है यहां तक ​​कि अगर कोई विशेषता नहीं है जब आप कच्चे XML का परीक्षण करते हैं, तो आप पाएंगे कि यदि आप किसी भी XML पार्सर कोड के माध्यम से कदम करते हैं, तो यह एक प्रकार की विधि का उपयोग करता है, तो MoveToNextAttribute () एक xmlns विशेषता है जिसका मान एक w3c uri है (मैं नहीं सटीक यूरी- जैसे कुछ एक्सएमएलएनएस = '' आप किसी भी तत्व के लिए रीडऑपरएक्स Xml () विधि से आउटपुट में भी देखेंगे।

flex - AS3: Game development -

I'm looking at the game framework for Flex / AS3. I want to use it to create simple 2D games, such as tower defense etc. Maybe someone can give some suggestion? view this setting It is easy to learn but very powerful.

asp.net mvc - MVC Model Binding -

I am using the MVC verification library. I chose this library because I am using NetSets, Enterprise Library generates all the assumptions using the validation blocks. It works fine that the model binding itself is validating the object and is populating the validation summary. I believe in general practice [Accept Wierbes (HTV.bybs.post)] Public Action Result Register ([Bind ()] Nettseerobase Obze (Return View); } There is also a method in the verification libraries, which is documented as follows: [AcceptVerbs (HttpVerbs.Post)] Public Action Register ([Bind ()] NetTiersObject obj {try {obj.Validate & lt; NetTiersObject & gt; (); } Hold (EntityValidationException ex) {ViewData.ModelState.PopulateWithErrors (ex); } See Return (); } It also works fine. My problem is that when using the verification library method, this error message duplicates. When using just the error message binding model weird appears errors have the property name in the message. Theref

Sorting 2D arrays in C/C++ in increasing values; knowing the original positon after sorting? -

I have already written a program which is like the 2D array to increase the values. Here is my input and output Input: array 2D [0] [0] = 99 arrays 2D [0] [1] = 10 Array 2D [0] [2] = 97 array 2D [0] [3] = 10 arrays 2D [0] [4] = 14 arrows 2D [1] [0] = 73 array 2D [1] [1] = 53 erre 2d [1] [2] = 81 array 2d [1] [3] = 22 array 2d [1] [4] = 88 Aare 2D [0 ] [0] = 10 array 2D [0] [1] = 22 array 2D [0] [2] = 53 error 2D [0] [3] = 53 arrows 2D [0] [4] = 73 Array 2D [1] [0] = 73 Array 2D [1] [1] = 81 Array 2D [1] [2] = 81 Array 2D [1] [3] = 88 Array 2D [1] [4] = 99 Now, what I want to know, is the original condition of the root. Like Array2D is included in [0] [0] 10, but I also want to know where in the input it was 10 before, for example, it was in Array2D [0] [3] in the input, so all of me I want to get the original state of the values. I do not know how to do it. Maybe use some extra straight to remember the situation or to use pointers. Note: For sorting, I changed the 2