Posts

Showing posts from February, 2012

How to retrieve unread mails using IMAP c client feeds -

Only unread mail from a specific person with email address using IPAp C client APIs, person@gmail.com Is there any way to get it? I know that this can be done using mail_search (unseen flag), but I think it would be more expensive to ask each time. Please suggest a better way to do this. If possible, please post a sample program. thanks in advance Regards Subbee itemprop = "text"> search with unseen flag after any order The best option from which you want to ignite is to list an unread mail, to scan the entire mailbox has developed an iMap server for a mailer and with my experience it is not possible but at the end of the customer Can manage the map of (as if forward Read ..)

web services - Java Axis Webservice stub throwing a NoEndPointException -

I am using a web service with axis, I am calling from any webservice method. I / O apache.axis.NoEndPointException (); } So it seems that I have not set the last point properly. Similarly I have instantiated the stub: MyService_ServiceLocator myService_ServiceLocator = New MyService_ServiceLocator (); MyService_PortType webservice = New MYServiceSOAPStub (myService_ServiceLocator); I think there is something wrong with it. Do I need to pass in the webservice address? It seems to already be integrated into stubs. It may depend on the Axis version (I'm using version 1.4) but I suggest Use the getYourPortType () method with the user. You do not have to give your webservice URL (as it is stored in generated files). Using your sample will be something like this: MyService_ServiceLocator myService_ServiceLocator = New MyService_ServiceLocator (); MyService_PortType webservice = myService_ServiceLocator.getMyService_PortType ();

iphone - Facebook Connect compile error -

There is an error and 1 error being encountered in compiling my iPhone app with FBCNact: < Pre> lexical-pointer @__ oBJC @__ cls_refs @ FBSession Any ideas about what is the problem and how to track it? This linker looks like an error, make sure that you've added all the files from FBConnect to your project (especially FBSession.m file).

windows - Memory management for intentionally memory intensive applications -

Note: I know about this question, although this question about those applications That's often memory allocation, while information about my question is intentionally designed to secure a lot of physical memory. I have a server application that uses large amounts of memory to caching and other customizable SQL Server). This application runs on a dedicated machine, and so can use as much memory as possible (and should) / it is able to speed up and increase throughput and increase response time without worrying to affect other applications in the system. The problem is that if memory usage is lowered, or if the allocation in memory becomes unsuccessful due to failure of the load mistakes - then in this situation clearly The best thing to do to freeze memory is to stop failure at the expense of performance. Some assumptions: The application is running on a dedicated machine Physical memory on the machine over the memory requirements of the application (i.e., if additi

automatically grab php extension in xampp -

xampp का उपयोग कर htdocs में सहेजी गई कोई भी परियोजना http: / / /localhost/projectname/filename.php मुझे लगता है कि ऐसा करने का कोई तरीका है जब मैं टाइप करता हूं http: // localhost / projectname / पोस्ट टेक्स्ट "itemprop =" text "> आप इसके लिए mod_rewrite का उपयोग कर सकते हैं। .htaccess में: रीवरइटइन्गइन पर रीव्रैइटकॉन्ड% {REQUEST_FILENAME}! -f पुनर्लेखन नियम (। +) $ 1.php [एल]

tsql - Modifying a function used as a column default in SQL Server -

We are having a problem with a poorly coded SQL function (which works fine in live, but our test environment Not in). This function is used to provide a default value in multiple tables, instead of a function returns a "Can not ALTER ### Because it is referencing this object" error. Is this error moving in any way the message? The only way I can think is that we are trying to write a script so that it can be removed from each table, which is in the form of default, manipulating the function and adding it again. Thanks Since the object is referenced, you can not modify it. This is what you do: Remove the default barrier from the table / column Modify the function Add the default barrier

Multple multi-line regex matches in Bash -

I am trying to parse some simple strings in the Bash script. Basically, I have a file that contains multiple multi-line fields, each field is surrounded by a known header and footer. I want to extract each field in an array or similar, like & gt; FILE = 'cat file `& gt; REGEX = "@ # @ # @ # [\ S \ S] +? @ # @ # @" & Gt; & Gt; If [[$ FILE = ~ $ REGEX]] then & gt; Now $ BASH_REMATCH & gt; Fi file: @ # @ # @ ##################### ############# This area is a @ @ # @ # @ # @ # @ # @ # # # # ################# ############### This area is two, they can be any number of rows @ # @ # @ # now complete me The problem is that with Bash "news" "." , I can match it to "pcregrep-M", but it is definitely going to match the whole file. If you have awk 'BEGIN {RS = "@ # * #"} NF {gsub} ("\ N", "") # Remove is that you want to print new lines "- & gt;"

sql server - Is there any way to make this UDF deterministic? -

I agree that this is not just determinative because DB_NAME () is not deterministic? If DB_NAME () is not deterministic, then why is not it deterministic? Optional function [TheSchema]. [Udf_IS_PRODUCTION] returns the return bit as SCHEMABINDING as DB_NAME () = 'PRODUCTION' then convert (bit, 1) ELSE convert (bit, 0) END END < P> Update: This version works, determinists, allows the use of the same code in any database and removes the hardcoding of the database name (which is about the name of the database coding Other automatic systems also allow health exceptions to be removed) Optional function [TheSchema]. [Udf_IS_PRODUCTION] (Shortcut with SCHEMABINDING as the restart) (SELECT IS_PRODUCTION from SELECT_IN_PRODUCTION) END FYI This is the code snippet in my system Health self -Reporting system that I use to monitor potential problems. SELECT 'Non-deterministic scalar UDF' AS problem, QUOT ENAME (ROUTINE_SCHEMA) + '.' + As QUOTEN

java - Eclipse-Plugin with submenu. How to handle JavaProjects and Projects? -

I want to write an Eclipse-Plugin that works with a selected project. I used the plugin template with submenu on my plugin XML looks like this: extension point = "org.eclipse.ui.popupMenus" & gt; & Lt; Object Controlling Object Class = "org.eclipse.core.internal.resources.Project" id = "testplugin2.contribution1" & gt; & Lt; Menu label = "multiplier manager" path = "extra" id = "testplugin2.menu1" & gt; & Lt; Separator name = "group 1" & gt; & Lt; / Separator & gt; & Lt; / Menu & gt; & Lt; Action labels = "list all * .properties" class = "testplugin2.popup.actions.ListPropertiesAction" menupath = "testplugin 2.menu1 / group1" enabled = "1" id = "testplugin 2.project action" & gt; & Lt; / Action & gt; & Lt; / ObjectContribution & gt; & Lt; / Extension & gt; This works fine for everyth

c# - Item groups in msbuild -

मेरे पास निम्न आइटम समूह है: & lt; itemgroup & gt; & Lt; रिलीज़ फाइल शामिल करें = "MyApp \ *। Ashx" / & gt; & Lt; रिलीज़ फाइल शामिल करें = "MyApp \ *। Config" / & gt; & Lt; रिलीज़ फाइल शामिल करें = "MyApp \ bin \ *। Dll" / & gt; & Lt; रिलीज़ फाइल शामिल करें = "MyApp \ bin \ *। Exe" / & gt; & Lt; रिलीज़ फाइल शामिल करें = "MyApp \ bin \ *। Pdb" / & gt; & Lt; रिलीज़ फाइल शामिल करें = "MyApp \ bin \ *। Config" / & gt; & Lt; / ItemGroup & gt; और निम्न प्रतिलिपि लक्ष्य: & lt; प्रतिलिपि स्रोतफ़ाइलें = "@ (रिलीज़फ़ाइलें)" गंतव्यफ़ाइलें = "@ (रिलीज़फाइलें- & gt; '\\ $ (परिनियोजनमाईचिन) \ सी $ \ प्रोग्राम फ़ाइलें \ MyApp \% (रिकर्सिव डाइर)% (फाइलनाम)% (एक्सटेंशन) ') "/ & gt; लेकिन समस्या यह है कि बिन निर्देशिका को संरक्षित नहीं किया जा रहा है (सभी फाइलें शीर्ष स्तर की निर्देशिका में समाप्त होती हैं)। कृपया ध्यान दें

Django - How to pass several arguments to the url template tag -

मेरे urls.py में मेरे पास है: (r '^ (? P & lt; ? साल & gt; \ घ {4}) / (पी एंड LT; माह & gt; \ घ {2}) / (पी एंड LT; दिन & gt; \ घ {2}) / अनुभाग / (पी एंड LT; स्लग & gt; [- \ डब्ल्यू]) / $ ',' Paper.views.issue_section_detail ', {},' paper_issue_section_detail '), और मैं इसे एक टेम्पलेट में करने का प्रयास कर रहा हूं: {% url paper_issue_section_detail issue.pub_date.year, issue.pub_date.month, issue.pub_date.day, section_li.slug%} लेकिन मुझे यह त्रुटि मिलती है: TemplateSyntaxError रेंडरिंग करते समय एक अपवाद पकड़ा गया: 'पेपर_आईस्यू_सेक्शन_ डिटेल' के साथ तर्कों ('2010, 1, 22, यू' बिजनेस ')' के लिए रिवर्स और खोजशब्द तर्क '{}' नहीं मिला। हालांकि, अगर मैं केवल एक तर्क की आवश्यकता के लिए यूआरएल पैटर्न को बदलता है तो यह ठीक काम करता है अर्थात्: (r '^ (? P & lt; year & gt; \ d {4}) / $', 'paper.views.issue_section_detail', {}, 'paper_issue_section_detail'), और:

rubygems - Rails optional gem config -

When you want to use a gem for development / testing, what do you do to other gods Do not want to use use? Currently requires 'redgreen' rescue load error and in test_helper.rb and no gem configs , But it seems like a cruel approach, although one functional one I want to do something like the following: config.gem "redgreen",: Optional = & gt; True any other suggestions? Or should I just sell those beautiful superficial gems? ... Edit To be clear, I'm only talking about specific gems such as red buck, which In fact, they are not used in functional codes, but there is no need to sell them except to avoid the conditional requirement of coding only in process . I gave the same answer ex> then bundle - together -N V = Scott

java - android:layout_gravity doesn't work as expected -

I have a simple LinearLayout with a TextView and an ImageView. I want to combine text in the TextView to the right, but the results show that the text was aligned to the left, is there something wrong in my layout xml? Thank you. & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Android: layout_heid = "wrap_content" Android: background = "# E8E3E4" "& Gt; & Lt; LinearLayout Android: Orientation = "Horizontal" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" & gt; & Lt; Android: text-style = "bold" Android: background = "# ff0000" Android: textcolor = "# 121222" Android: textView = "260dp" Android: layout_height = "wrap_content" android: text = "more comment" Android: Layout_gravity = "right" /> & Lt; Android: layout_width = "50dp" Android: layout_height

sql - Better to use a Clustered index or a Non-Clustered index with included columns? -

When I look at the execution plan for a particular query, I think 77% of my cost is in the package index Is it the fact that I am using a compiled index, does that mean that I will not be able to see the performance issues due to the columns that are outputting? Would it be better for me to include a non-clustered version of this and include all the columns that are outputting? UPDATE: The package indicator uses a composite key, not sure that it does not matter. The reasons you use include a column on a non-cluster index in the cluster data " The thing to avoid "bookmark-lookup" is that if SQL Server can theoretically use a specific non-cluster based index, but the Optimizer estimates that there are so many bookmarks-lookups The index will be ignored. However, if all the selected columns are accessible directly from the index, no bookmark-lookup will be required. In your case, the fact that you are reaching data through "looking for clustered inde

php - Quantity Conditional -

Here's the one that I got stumped. Working in PHP5 I am creating a store app for a client who uses a web service from a large agency because it is a broker for this web service that an end user needs to purchase one In a certain quantity, or the order will be considered ineligible for the purchase. I have to create a dropdown option box in which there are only eligible quantity numbers, the rules are as follows: If more than 12 quantities are available, leave any quantity If less than 12 quantities are available and have said that quantity, then only allow pairs to purchase If less than 12 quantities are available and the quantity is odd, then it is g Allow any quantity by releasing, which is left to only one object. I'm a bit confused how my conditions should be adjusted to determine dropdown content. By subscribing, how can I know that in the final quantity, the quantity of the user will be left alone to purchase from the requested quantity and will it b

Jquery hasclass not working -

I can see in Firefox that there is a hidden class in ul.ulsearch, but it does not work, why? ($ ('(Ul.') ($ ('. Ulsearch'). Haclas ("hidden") {$ ('. Lisearch'). FadeIn (100);}}); < / Pre> AFAIK is this Haclassell , not hexel

c - GStreamer plugin search path? -

Can I tell the genisteer to see the plugins in a specified directory? GST_PLUGIN_PATH environment variable to point to the directory, or programmable call only: < Div> code> GstRegistry * registry; Registry = gst_registry_get_default (); Gst_registry_add_path (registry, directory);

asp.net mvc - ActionLink<> generic version not found -

I'm a bit fed up with these HTML assistants. I have done a lot of research but nothing can end. Am I the only boy on earth that can not get HTML? The ActionLink is working ... Here's what I'm trying to do: & lt;% = html.ActionLink & lt; Catalog controller & gt; (X => x.Index (parent.Name, child.Name), child.Name)% & gt; I get ActionLink method but ActionLink can not be found ; > Generic method from injection. I got Microsoft for my project. WebMcm reference has been added and here is my page section of my web config file: & Lt; Add Namespace = "System.Web.Mvc.Html" /> & Lt; Add Namespace = "System.Web.Routing" /> & Lt; Add namespace = "System.Linq" /> & Lt; Add namespace = "System.Collections.Generic" /> & Lt; Add Namespace = "CoderForTraders.Data" /> & Lt; Add Namespace = "CoderForTraders.Web.Controllers" /> & Lt; Add namespa

Exception during multiple asynchronous calls to WCF (The message could not be processed...) -

You can not process me "message from a WCF client ..." getting error please help me Is killing I have a test win app that is brought in the number of asynchronous calls x loop to x . Each asynchronous call instructs their own instances of the WCF proxy and calls a WCF service using that proxy. If x is about 35 or less then all is well. If x > 40 or so, calls completed several fine, but a handful of the refund: System.ServiceModel.Security.MessageSecurityException: an insecure or See incorrect internal error for the fault code and extension. --- & gt; System.ServiceModel.FaultException: The message could not be processed. The reason for this is that the action 'http://tempuri.org/IMyService/MakeRequest' is incorrect or because the message contains incorrect or finished security reference token or because there is a mismatch between binding is most likely. The security reference token will be invalid if the channel has been canceled due to service

iphone - UIView & Graphics Context -

UIView class does not set a graphics reference, so when I'm going to get the current reference, it's in the form of zero Returns I'm in the closed subclassed method of UIView, how can I get graphics references to be able to pull just a line? Any help that is very new in the X-code game will be appreciated. The graphic reference is set to the drawRect: method, which you have to override, then do all In there your drawing does not call Attract as a word of caution: Directly, when UVVU needs to be displayed, it will be automatically asked. If you want to be forced by a draw, send a setNeedsDisplay message to your UIView.

Java: Expanding array size, can't seem to keep all values in original locations -

For my current homework, I'm trying to sort my array through a normal class because the user Inserts value in places when the size is fully loaded, then the array class calls in an extension method which increases the size of the array, while maintaining its values ​​in the appropriate values, which I have given to my professor Sail from the note Used. For some reason, all my values ​​except the location [0] are either fused or erased from the array. I am leaning that the problem arises from the method of expansion, but I do not know how to fix it. For example, the initial size is currently set to 5, but the extension method is said to be incremented by 3. Users can input them to 1,2,3,4,5 values ​​completely. But the extension is called when the user returns the new value 6 which produces an array of 1, 6, empty, null, empty, null. Any further error "thread in exception" will lead to the main "java.lang.NullPointerException" error: Here is my sorted arr

c++ - Any RAII template in boost or C++0x -

क्या RAII के लिए कोई टेम्पलेट उपलब्ध है? इसमें scoped_ptr , shared_ptr जैसी कक्षाएं हैं, जो मूल रूप से सूचक पर काम करती हैं। क्या उन वर्गों को पॉइंटर्स के अलावा अन्य किसी भी अन्य संसाधनों के लिए इस्तेमाल किया जा सकता है क्या कोई टेम्पलेट है जो सामान्य संसाधनों के साथ काम करता है। उदाहरण के लिए कुछ संसाधन जो एक दायरे की शुरुआत में हासिल किया गया है और किसी भी तरह से गुंजाइश के अंत में जारी किया जाना चाहिए। अधिग्रहण और रिहाई दोनों कुछ कदम उठाते हैं। हम एक टेम्पलेट लिख सकते हैं जो दो काम करता है (या शायद एक ऑब्जेक्ट) जो कि यह कार्य करते हैं मैंने इसे सोचा कि यह कैसे प्राप्त किया जा सकता है, मैं सोच रहा था कि ऐसा करने के लिए कोई भी मौजूदा तरीके हैं संपादित करें: कैसे के बारे में एक के लिए सी ++ 0x समर्थन के साथ लैम्ब्डा फ़ंक्शन shared_ptr निर्दिष्ट करने की संभावना प्रदान करता है जब पॉइंटर को नष्ट करने की आवश्यकता होती है, तो डेलीटर को लागू किया जाएगा और जो भी सफाई कार्य आवश्यक हैं वह कर सकते हैं। इस तरह से सरल पॉइंटर्स की तुलना में अधिक जटिल संसाधनों को इस स्मार्ट पॉइ

Haxe PHP vs PHP - what language is better for creating Plugins for WordPress? -

I want to create a WP plugin with the use of WP DB tables and attire, Azécs request that read and write feeds And media storage and Google Maps will be such a ridiculous plugin ... So what language is better for creating plugins for PHP PHP or PHP general? BTW Books Blog articles and docs are appreciated for your answer ... Hux can translate into pure PHP, but in this case why do you need hooks in the first place ?! Use PHP.

Can MYSQL support databases with sizes around 4 GB? Will I have any performance issues? -

I am planning a database of more than 12 million records in a table and no other is included, table Used for searching on the basis of field names, the size of approximately 4 GB in the MYSQL backend and the PHP frontend. The questions can support the MYSQL support database with the size around 4 GB, do I have a display problem when I search using php Each application has database display problems, even with very small databases by you. To understand the best use of RDBMS technology, you need to study and work. The good news is that you can do so that the database of 4 GB is not high, and the database is very large in many success stories. I recommend that you start by studying the following resources: Baron Schwartz and others. Where the top MySQL SQL Consultant Writer writes. Combination of technologies with PHP or MySQL as well as the combination of technologies is practically essential for high-effect because the fastest database query is that you do not

python - What are some Pythonic ways to share variables with objects defined in a module? -

I am creating a module where there are many different objects, which need to be controlled by multiple variables. If it was, then I would pass the objects into an indicator / variable / object, which I want to see, the variables in the application need to be changed, and the objects in the module will "see" new Values. In the module foo.py: square foo (object): def __init __ (auto, varToWatch): self.varToWatch = varToWatch def DoSomething (print): Print Self.varToWatch In the application, bar.py: import foo x = "before" y = foo.foo (x) y. This definitely does not work, because what does the original value of x (or the context of x's original value) do? ) Is stored in Y Therefore, I will try ... Pass a global name, and name the global name by foo. None, because in place of the global application, not in the module To make a global use in Fu namespace, but I do not know how to address that location by variable name, instead of importing it

user interface - How to create a hidden window in C++ -

How to create a hidden window? The purpose of this window is to get some messages. When you create a window, leave the WS_VISIBLE flag and do not call ShowWindow.

iphone - Statusbar overlaps ViewController -

When I open some other view controller with my main view controller, any other view controller is opened without problems . But when I dismiss the other view controller and come back to my view controller, the status bar overlaps with my main view controller. Our view size for the status bar is given 460 and 20 pixels. Similar questions have already been posted in the stack overflow, the answer to the question that says, "UiVUUUCL controller was to be loaded in the UIVUVAVentron, but we are not using UINavigationViewController Please tell us how we can solve this issue. If your main view Controller has been built in Interface Builder, Inspec Check the TOR window and make sure "full screen wants" is not enabled. Do this for any other view controllers. I have not had to face it personally, but if If you are flipping the scenes around you, then you probably want to do UITabViewController and UINavigationController and create a scene that container for another

c++ - Lifetime of a thrown object caught by reference -

C ++ standard, paragraph 15.1.4 psi: memory for temporary copy The exception to be thrown is allocated in an unspecified way, except that it is mentioned in 3.7.3.1. persists temporarily until a handler is executed for that exception. I wonder why this code is crashing (I know that this is not the best practice): class magic Exceptions {Private: char * m_message; Public: Magic Exception (Const. Four * Message) {m_message = New Four [Stellen (Message) + 1]; Strcpy (m_message, message); } ~ Magic Exceptions () {cout & lt; & Lt; "Destroyer called." & Lt; & Lt; Endl; Remove [] m_message; } Char * getMessage () {return m_message; }}; Some functions with zero () {magic magic exception ("bang!"); } Int main (int argc, char * argv []) {try {someFunction ()}} grip (magic exception and ex) {cout & lt; & Lt; Ex.getMessage () & lt; & Lt; Endl; } Return 0; } Specifically, the Destructor of the thrown magic exposition object is c

delphi - What regex can I use to extract URLs from a Google search? -

I am using Delphi with JCLRegEx and want to capture all the result URLs from Google Search. I looked at HackingSearch.com and one example of them is RegEx that looks right, but when I try I can not get any result I am using it just like this: / P> Re: JVCLRAJX; I: integer; Resume: = TJclRegEx.Create; Try again compile ('class ='? R ??? gt; +? Href = "(. +?)". *? & Gt; (. +?) & Lt; \ / a & gt; + Class = "(? +?) & Lt; cite & gt; Class ="? Gl "? & Gt; & lt; a href =" (. +?) "& Gt; & lt; \ / div & Gt; & lt; [Lee | \ / ol] ', false, false); if match (memo1.lines.text) starts then I: = 1 to capture = 0 - 1 mark memo 2. lines. (Capture [1]); Finish; Finally free; Finished; freeandnil (re); Finished; Available at Regex I use the Delphi JDI version I am doing this because I installed Teperail RAEGE every time I am struggling with two people ... off-tactics: Google AJAX Search You can tr

unix - single quotes not working in shell script -

I have a .bash_profile script and I have the following alias for the following: lsls = 'ls -l | Sort-n +4 ' When I type the nickname of LSL it is in a way but then posts this error message "-bash: +4: command not found" I nickname To '+4'? This works when Type LS-L | I am in OS X 10.4 Thanks for any help bash-4.0 $ ls -l | Sort -n +4 Type: Open failure: +4: Any such file or directory you have ls -l | Sort -n -k 5 , gnu sort is different from BSD sort alias lsls = 'ls -l | Edit-n -k 5 ' Edit: Update based on indexing from 1 based indexing to 1 reflecting changes, thanks to Matthew.

performance - Android ListView Refresh Single Row -

After getting the data for a line of ListView , I want to update it single tier. Currently I notifyDataSetChanged (); , but it responds very slowly to view . Is there any other solution? One option is to manipulate directly in ListView . First check whether the indicator of the updated row is between getFirstVisiblePosition () and getLastVisiblePosition () , these two give you the first and last position in the adapter that appears in the adapter. Do the screen. You can then get the view from the getChildAt (int index) and change it.

regex - Groovy: Escaping an arbitrary (unknown) regular expression -

I want to split a string through String.split (k) where k is an arbitrary string (read from the input ). The problem is that Kashmir can be a string and thus regular expression operators may be included, such as: "* [" . In such cases, the partitioned method leaves an exception because regular expression is not formed properly. What I see is a way of avoiding any Kashmir, as a result that the string can be passed safely on the partition (). Any thoughts? You can use * to avoid the regex pattern. *: 'Escapet' rather seems childish.

css - If I use XHTML transitional doctype then will it show (in my portfolio) like I'm not a professional expert? -

If I use XHTML transcriptional dot type, will it show (in my portfolio) like I am not a professional expert ? This is for a customer who is not paying much for the job, and he does not know about web standards. Site with strict XHTML but with some validation errors or If I add it, what would be good if the site in the portfolio? Use whatever you comply with. Using the "strict" theory, it will not prove that you are "professional" Professional developers do not hang on the principle method used by you, unless you have no doctype What matters is the structure of your portfolio, both visually and in your markup / css / javascript Using a "strict" principle, nothing is done with a transitional mechanism, how you are "professional", if you look at the stack overflow, you will see that they have given the HTML 4 to their functioning Also used in the form, not even XHtml, and they did it as a deliberate design choice, an

c++ - concurrent reference counter class and scoped retain: is this ok? -

This is a question about coding design, so please forgive the long code lists: Could not start and potentially damage without displaying the actual code. I am writing a concurrent reference math class and appreciate some feedback on my implementation. Sub-classes of this class will get "Release" instead of being directly deleted. There is a class: category concurrent reference math: private non-usable {public: concurrent reference math (): Ref_count_ (1) {} virtual {concurrent reference math () {} Retaining zero () {scoddock lock (mute x_); ++ ref_count_; } Zero Release () {bool should_die = false; {ScopedLock lock (mutex_); Should_die = --ref_count_ == 0; } If (should_d) delete it; } Private: size_t ref_count_; Mute x Mute x_; }; And here a scope has been maintained: class ScopedRetain {public: ScopedRetain (concurrent reference math * object): object_ (object) {retain (); } ScopedRetain (): object_ (NULL) {} ~ ScopedRetain () {Release}; } Zero hold (concurr

c# - CollectionViewSource Use Question -

I should have been trying to basically use CollectionViewSource be me missing something because it just does not work here My XML is: & lt; window. Resources & gt; & Lt; Collection chapters source = "{binding space: main voltage difference map}" x: key = "mpcv" & gt; & Lt; CollectionViewSource.GroupDescriptions & gt; & Lt; PropertyGroupDescription Property Name = "SourceProject" /> & Lt; /CollectionViewSource.GroupDescriptions> & Lt; / CollectionViewSource & gt; & Lt; /Window.Resources> ; ListBox ItemsSource = "{StaticResource MapCV}" HorizontalContentAlignment = "muscle" ScrollViewer.HorizontalScrollBarVisibility = "disabled" & gt; & Lt; ListBox.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; Grid horizontal alignment = "statch" & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; Column width = "2 *" />

java - Progam can't see file but it exist. FileNotFoundException -

Then, I am writing FTP server-client but code can not read a file. I mean. Suppose I have a file on the download / download / implant 2.pdf but I get a file not found exception. Even if there is a file and I can see it. I also created a test folder and set it privatization for 777. Still, nothing. Can netbeans be set as superuser or something? I mean. I just want to copy and paste some, but I can not copy here and paste code if you see anything wrong with it, please share. Public static zero copyfile (file, file out) throws IOException {chinal = new file in the file channel (in the input stream) .getChannel (); File channel out channel = new file output stream (outside) .getChannel (); Try {inChannel.transferTo (0, inChannel.size (), outChannel); } Hold (IOException e) {throw e; } Finally {if (chinal! = Null) in china.clos (); If (out channel! = Null) outChannel.close (); }} thanks Do you specify the right path Are the files? You can try to specify the full path or k

mysql - login form in php -

How to create a login form in php, I just need to validate the user stored in the database, please let me know how There is no idea about making. Use a search engine to search such as a tutorial: or do it for you To hire a freelancer, maybe more than just a single login, that user has to do something on your site, and it will be the programmer's work where you are less. / P>

cocoa - Core Data is using a lot of memory -

I have a data model that is like this simplified drawing: This is a bit weird, but the idea is that the app manages multiple accounts / identities that a person can have in a message system. Each account is associated with a user on the system, and each message can potentially be seen / sent to multiple accounts (but they have a unique unique ID, so Message ID property to use to bring message objects Which can be pre-downloaded and imported by a previous session). The app is used from the per-account point view - What do I mean if you choose which account you want to use, you can see the messages and the stuff your account See from the standpoint of that account, so I have messages related to the account, so that I can easily get such messages which should be shown using FEET in this way: fetch.fetchPredicate = [NSPredicate predicateWithFormat: @ "% @ IN accounts", d Acneet]; Fetch.sortDescriptors = [NSArray arrayWithObject: [[NSSortDescriptor alloc] initWithKey:

migration - Migrating Access Tables to SQL Server - Beginner -

I am working in an Access 2007 database and need help to migrate tables to SQL Server Is that only Access 2007 to buy or do I need to download a separate program for SQL? When I try to create a new SQL database or open an existing one through login, I am getting the "Create database" or "Subscriber table" error and it is not sure what the problem is Will be greatly appreciated! Take a look at Microsoft which supports Access 97 - 2007

artificial intelligence - What is the meaning of <- in AI? -

I have seen lots of AI related items in the symbol & lt; -. For example, delta & lt; - 0x & lt; - x + 1 etc. I always assumed its meaning = (Assigment), but perhaps they have a meaning that is slightly different from the segment, I think? Thank you This is an assignment. It removes ambiguity that "=" The symbol adds, because this symbol is often overloaded to test equality. It makes it very clear that the thing on the left side is being matched, corrected, integrated, or otherwise equals it.

javascript - Odd DOM Problem with Firefox -

Using a javascript, I have a strange problem while navigating through the rows and cells of a table in a time loop. Is facing. I'm using Firefox 3.5.7 on Win7 with Firebug enabled. I have this markup: & lt; Table & gt; & Lt; Tbody & gt; & Lt; Tr id = 'firstrow' & gt; & Lt; Td> A & lt; / Td> & Lt; Td> B & lt; / Td> & Lt; TD & gt; C & lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; TD & gt; B & lt; / TD & gt; & Lt; TD & gt; C & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; TD & gt; B & lt; / TD & gt; & Lt; TD & gt; C & lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; and this javascript: var line = document.getElementById ('first'); Console.log (

audio - What is the best website solution for playing specific parts of online mp3 files? -

2000 I created an educational website in which we have hundreds of audio files / audio lectures on hour-long < RealAudio server, then I have hundreds of small SMIL .ra Files e.g. lecture002part053.ra: ... & lt; Audio src = "lecture002.wav" clip-start = "554" clip-end = "612s" /> ... Then I had the link in HTML like this: And when any RealAudio clicks on the Player link, they will immediately hear small parts of that IAF. . The solution worked well, but the RealAudio server was a bit of a strong expensive and the Real Audio Player was unfortunately a adware with an ad popup. So, after ten years, I can imagine that there is a better way to do this, What is the best technique for streaming the share of audio files from the web server, i.e. With: Ability to create hyperlinks which is a large online . MP3 file Run small parts of A built-in player (like Flash or Silverlight), such as - if you have Flash -

php/regex: How to replace part of a found pattern, but leaving the rest as it is? -

How can I replace a substring in a given pattern, but how can I leave it without leaving it? (Edit: Actual case is more complicated than the example given below, I will have to face incidents within XML tags. That is why I want to use regex!) < / P> We say that I want to send "Z" letter "X" letter within one word I want aaxaa aax xa aazaa aaz za Including "x" is not a problem, Such as: [^ x \ S] ^ [^ \ s] but changed to a normal preg_match full match Where I want anything in the pattern except "X" as it is. Wich is the best way to complete it in PHP? If your regex only matches the relevant part, then it should But if you need regex to join it then there is no problem that it changes the whole match (like preg_replace ('/ x /', 'z', $ string) ). preg_replace ('/ (non-replacement) X (restofregex) / ',' $ 1Z $ 2 ', $ string);

c# - Windows Forms Control - Huge list of filenames -

Which controls would be best to show a huge (300,000 +) list of file names? I have tried DataGrid Weave, but it is very slow. What are the better options? Standard list view control is designed specifically for your situation. I have used it before with a million lines list and it works well. This is a true virtual mode. In other words, the time of memory allocation and the population of the list remains less regardless of the size of the total list. It is contrary to the large list and uses the memory. To use the virtual mode set: virtualLISMode = true virtualListSize = 300000 (or your list is currently Then handle the recovery virtual event event to populate the list on demand from your list. You can also handle cashworthy items and searchfreewitchtime events.

C++ Conversion Not Working -

#include & lt; iostream & gt; नेमस्पेस एसटीडी का उपयोग करना; / * शून्य कार्यों का प्रयोग करें, वे कुछ कार्य करते हैं लेकिन कोई मान नहीं लौटते हैं / / / फ़ंक्शन प्रोटोटाइप, इनपुट, पैर और इंच में पढ़ा है: शून्य इनपुट (डबल और amp; पैर, डबल और इंच); // समारोह प्रोटोटाइप, गणना, दिए गए सूत्रों के साथ गणना करें। शून्य गणना (डबल और amp; पैर, डबल & amp; इंच); // समारोह प्रोटोटाइप, आउटपुट, स्क्रीन पर गणना की गणना करता है। शून्य आउटपुट (डबल मीटर, डबल सेंटीमीटर); Int main () {डबल पैर; डबल इंच; चार पुनरावृत्ति; करना {// कॉल इनपुट: इनपुट (पैर, इंच); // कॉल गणना: गणना (पैर, इंच); // कॉल आउटपुट: आउटपुट (पैरों, इंच); Cout & lt; & lt; "\ N"; Cout & lt; & lt; "दोहराएं? (वाई / एन):"; Cin & gt; & gt; दोहराने; Cout & lt; & lt; "\ N"; } जबकि (दोहराएँ == 'वाई' || दोहराएँ == 'वाई'); } // इनपुट समारोह परिभाषा: शून्य इनपुट (डबल और amp; पैर, डबल & amp; इंच) {cout & lt; & lt; "कृपया पैर में लंबाई दर्ज कर

ASP.NET MVC ViewEngine ViewLocationCache.GetViewLocation returns null -

I'm following Chris Pisman. One thing I noticed is that the name of the scene is not retrieved from the ViewLocationCache on subsequent requests I asp.net MVC 2.0 RC The following code is executed when: this.ViewLocationCache.InsertViewLocation (controllerContext.HttpContext, cache, virtual path); And I have to walk on it. See the place it returns now {System.web.mvc.NullViewLocationCache} - Suggest that nothing was added? view location cache works only in release mode by default (settings & lt; compilation debug = "false" & gt; web.config ). To enable view location cache in debug mode: WebFormViewEngine in a custom view engine, like the creator of your ViewEngine ViewLocationCache Set: Public MyCustomViewEngine () {ViewLocationCache = New DefaultViewLocationCache (); } If you want, you can also override the default cache time bar value.

Is it possible to access a Facebook user's photo-gallery in Facebook Connect? -

If a user "connects" to your website For example, in PHP you will do this: try {$ facebook_albums = $ facebook-> API_client- & Gt; photos_getAlbums (post-text) $ Facebook_user_id, tap);} hold (exception $ E) {} where $ facebook_user_id user's fashion_upid (user id) / html>

count - Show Only Pings (Pingbacks+Trackbacks) Number on Wordpress -

Is there a way to display the number of pings (numbers) on WordPress? Actually there are functions but it shows total comments, pingbacks, and trackbacks. The following code works on WordPress 2.9.1 It can work on other versions, but I Tested against only 2.9.1. & lt ;? Php Global $ wpdb; $ Post_id = get_the_ID (); $ Total_ping_count = $ wpdb-> Get_var ("wpdb-> Comments from" Select Count (comment_id) "where comment_type = 'pingback'"); $ Total_approved_pings = $ wpdb- & gt; Get_var ("wpdb-> where is comment_type = 'pingback' and comment_approved = 1" from select count (comment_id)); $ Post_ping_count = $ wpdb- & gt; Get_var ("Selection Number (comment_id) from $ wpdb-> in comments where comment_type = 'pingback' and comment_approved = 1 and comment_post_id = $ post_id"); Repeat "The total number of pings on this site is $ total_ping_count. \ N"; "The total number of pin

Java stack overflow error - how to increase the stack size in Eclipse? -

I am running a program that I have written in Eclipse in Java. There is a very deep level of recurrence in the program for very large inputs, the program runs fine for small input, but when large input is given, I get the following error: in thread Exception "main" java.lang.StackOverflowError It can be solved by increasing the Java stack size and if so, how do I do it in Eclipse? Update: @John Skeet The code to make a datasractor is running a parse tree again. Therefore, for example, the code will do some work using the node in the parse tree and call itself two children of the node, combining their results to give the overall results for the tree. Repeat pars depends on the size of the tree, but the code fails (without a big stack) when the number of recursive calls becomes in 1000s. I'm pretty sure that the code is failing because of the bug because it works for small input. Run the configuration for your application (run / run configuratio

search&replace array key using PHP and CakePHP Set Class -

I need to type a function that is used for search & amp; Offers the following ways to change the key for multi-dimensional array: input array: [0] = & gt; Array ([Fu] = & gt; sometext [foo2] = & gt; Array ([lorem] = & gt; 1 [Avatar2] = & gt; Array ([meta_key] = & gt; avatar2 [meta_value] = & gt ; Array ([small] => 65606449bb5b6d10c2dfce9ecb88fdbd-24-small.jpeg [middle] => 65606449bb5b6d10c2dfce9ecb88fdbd-45-medium.jpeg [large] => 65606449bb5b6d10c2dfce9ecb88fdbd-75-large.jpeg [source] = & gt; 65606449bb5b6d10c2dfce9ecb88fdbd.jpg))) [menu] = & Gt; Arre ([Meta_kii] = & gt; menu [Meta_vlu] = & gt; Array ([small] = & gt; 65606449bb5b6d10c2dfce9ecb88fdbd-24-small.jpeg [Medium ] = & Gt; 65606449bb5b6d10c2dfce9ecb88fdbd-45.jpeg [LARGE] => 65606449bb5b6d10c2dfce9ecb88fdbd-75-large.jpeg [source] => 65606449bb5b6d10c2dfce9ecb88fdbd.jpg))) [1] = & gt; Array ([Wallpaper] = & gt; Array ([Meta_kiy] = & gt; wa

javascript - duplicate html element -

Is aware of any jquery plugin that handles duplication of some random HTML elements? I'm looking for a way to dynamically add similar rows in some form. I know that this is not difficult, but I do not really want to change the wheel again here. .. The clone () method, when used with any of the insertion methods, is a convenient way to duplicate the elements on a page. $ ('original selector'). () .appendTo ('selectorToPlaceClone')

java - magnetism simulation -

I say that I have kept P nodes on an M pixel 2D surface, I want the nodes to be attracted to each other. They are different from the stronger attraction, but if the distance between the two nodes is said, D ( A, B) is less than a few boundaries, then Kashmir again starts to retreat. Did anyone start me some code to update the co-ordination of nodes on time? I have some code, which is to start the highlight of the code below but is looking for some advice (PSI can not use existing library to do this). public square node {float posX; Float pause; } Public category mySimulator {ArrayList & lt; Node & gt; MyNodes = New Arrestist & lt; Node & gt; (); // Imagine that I add one of the nodes of my nodes to my nodes in my nodes.add (............................. .................................................. .................................................. ............................................... I & lt ; = MyNodes.size (); i ++) {for (int i = 0; i & lt

Can anyone nicely explain what "em" is (a sizing unit of CSS)? -

Can someone really explain that em Is the CSS as the unit? And when we use the em shape as a unit for a website, why use% for the body? Why not use em for body? The best way to find here you can see that in question Element is defined as the font-size, i.e. it is related to the height of the font element is not a font-size measurement for a particular letter. The actual height of individual characters may be more or less than the font-size, although generally they will decrease: In digital type, the height of specific letters is related to them in an orientation Typeface is determined by the designer. However, as a very strict guideline, the "average" font can have a cap height of 70%, and 48% of them may have an X-height. Note in another CSS standard: The only exception to this rule is 'font-size' property where 'em' and 'ex' values View parent element size element This exception is understandable, otherwise you will

Confused about why PowerShell treats a function different from a childitem, even if same type -

I'm confused about the difference between these two things: $ env : Path and function path {$ env: path} path Both return strings, Member. Nevertheless - the match does not do the same thing on both sides. If I use the path on $ env: path, it works as I expected, is returning true / false but if I meet the path (new function), then it Always returns the path, ignoring matches I am confused because both are return strings and therefore they should do the same thing. Does the function need to do something special to get the same result? The difference is that Dawn is being treated as a parameter in the path function is. Then, $ (path) -mail "foo" or (path) -mail "foo " Works equally well, formerly a subdivision, later nested pipeline (usually there is a similar effect in such cases, but there is a subtle difference between them. ) Verify: ps & gt; Function path {$ env: path; Writing host "Parameters: $ Algues"

c# - How to insert XML comments in XML Serialization? -

I want to add some notes to the user who reads it at the top of my XML file, I'm not sure that XML How to do this with cariculiation. I was looking at this post XDocument document = new XDocument (); Document.Add (New XComment ("Product XY Version 1.0.0.0")); (Var Author = Document. Cater ()) using {serializer.WriteObject (author, article); } Document.Save (Console.Out); But I'm not sure what's going on and how it can be added to my code. Basically I have some classes which I serialize in XML and one memory Paste in the stream. So I'm not sure which point I should add comments to. Thanks Code using the system; Using System.Collections.Generic; Using System.Linq; Using System.Text; Using System.Xml.Serialization; Namespace Console Application 1 {[XmlRoot ("Course")] Public Category MyWrapper {Public MyWrapper () {TaskList = New List & amp; Work; Work & gt; (); } [XmlElement ("courseName")] public string strin

sql server - How to use SQL conditional statements -

When executing an update query, I must delete a row based on values ​​in the column. Here's the code: UPDATE tag SET tag_count = tag_count - 1 WHERE tag_ID = 1 if the tag is counted & lt; Remove 1 from tag where tag_ id = 1 this query gives me an error. Edit I am using Inline SQL with C # sql server In general, the best option updates and a transaction in these cases: BEGIN transfer; Tag tag tag with tag ccc_count = tag_count - 1 WHERE tag_id = 1 with DELETE tag where tag_ id = 1 and tag_account & lt; 1; Committed transactions;

JavaScript issue in IE when using the back button -

I have a form where users can inquire about two different areas. Form elements are shown by default for a field when the page is first loaded, while the form elements are hidden for field two. I have a select box where users can choose what the area is about to inquire about , And a bit of javascript to show and hide different parts depending on this area. It works fine in Firefox and IE when the user clicks the browser back button in the user, often happens when users want to query a bit differently if the user inquired about the area two, Then pressed the back button in IE, the field selector still says "field two" but it is shown as elements of an area. I hope the field elements for the field two I still look like Firefox, but how? The following is a brief example of my code: & lt; Script language = "javascript" type = "text / javascript" & gt; & Lt ;! - // Switch between fields function changeRegionType (form) {// we get differen

javascript - How to get the class names using jquery? -

Hey, I'm wondering how can I use jquery to script dynamically under script. The HTML output looks like this: & lt; Div id = "main-info-1" class = "maini" & gt; & Lt; P & gt; This is a paragraph. & Lt; / P & gt; & Lt; / Div & gt; So, I'm trying to get the class name dynamically rather than hard coded like above. There are two parts where I name the class in Jquery script: 1.) Pc.children ('div.maini'). Remove (); 2.) Main_s = $ ('div.maini'). Remove (); As you can see, Class 'Menny' is hard coded and I am sure how to get the name of the class dynamically and put it properly in the script. File: & lt; Script type = "text / javascript" & gt; // Make them global to reach them from the console and handle them in // PaginationClick var maini_s; Var num_of_arts; Wise ipp; Click Function Handle Speed ​​(new_page_index, pagyn_container) {var pc = $ (pagination_container);

c# - Exporting Data To Excel, with Jagged Columns due to dynamic data? -

I have an interesting problem where I need to create an Excel data dump with some data in the database, but it will be something simple Compared to I have some complex data to merge, below is an example of the data that I have to deal with. TblGeneralInfo RecordId | Record name | Date | Cost 1 | Examination Entry | | 1/1/2010 | 2.0 2 Test Entry 2 | 1/1/2010 | 20.25 TblRandomInfo Record ID | Questionnaire | Answer 1 | your name? | Bob 1 Your title? | Builder 2 | Favorite movie | Matrix 2 | Favorite car | Mustang The end I need is the following record id | Record name Date | Cost | | | | 1 | Examination Entry | 1/1/2010 | 2.0 | your name? | Bob | Your title? | Builder 2 | Examination Entry 2 | 1/1/2010 | 20.25 | Favorite move | Matrix | Favorite car | Mustang I am now using SQL Server 2005 for reporting and application for ASP.NET 3.5 (C #). I'm looking for the best way to do this. The number of objects in "TblRandomInfo" is variable, and can be in t

How to use the scala dispatch library to send a post request to the server in the Lift? -

I want to use Sky Dispatch Library to send a request for post to the server in Lilla. I want to send a post request to the external server and get some information and then use this information in my web app. How can I do this? The lift (which is being replaced by), is on the lines you want.

osx - How do you create a .XPI package on a mac -

आप एक मैक पर एक्सपीआई पैकेज कैसे बनाते हैं इसका एक्सटेंशन एक्सपैशन एक्सपीआई के साथ बदल दिया गया है आप फ़ायरडर UI के माध्यम से उपलब्ध फ़ाइल संपीड़न का उपयोग कर सकते हैं या टर्मिनल में कमांड का उपयोग कर सकते हैं या मेकफाइल या समान का उपयोग कर स्वचालित प्रक्रिया का उपयोग कर सकते हैं।

c - using #defines and passing functions to them -

gcc 4.4.2 c89 I re-engineer some code in c89. However, I am completely confused with the code which defines the following #. So I have created a small application, maybe I understand how it is working. What I can collect MODULE_API will pass the function name and the macro will call MODULE_SOURCE_API and open the name and function. So I created a simple function called print_name and ran the code. I have received the following error message: The underlying declaration of the function 'print_name' is the undefined reference to 'print_name' What would be the main reason for doing this? #include & lt; Stdio.h & gt; #define MODULE_SOURCE_API (name, func) name ## _ ## func #define MODULE_API (func) MODULE_SOURCE_API (mod_print, func) ZERO MODULE_API (print_name) (CONSTORE FOUR CONST * name); Int main (zero) {printf ("=== Start the program === \ n"); Print_name ("Blogs"); Printf ("== Program End === \ n"); Return 0; } Zer

How can I put a Silverlight 3 DataGridCell into edit mode in code? -

I want to take a specific cell in a Silverlight 3.0 datagreat and in edit mode. I can use VisualTreeManager to locate the cell. How do I switch to editing mode? Every DataGridSell looks like this in VisualTreeManager: System.Windows.Controls.DataGridCell System.Windows.Controls.Grid System.Shapes.Rectangle System.Windows. Controls.ContentPresenter System.Windows.Controls.TextBlock System.Windows.Shapes.Rectangle System.Windows.Shapes.Rectangle I want to edit the text block containing the text. Update @ Follow Anthony Wygens's suggestion, here's what I'm trying to get started (BeginEdit). I wanted to keep it simple so I thought I wanted to select a column in the first line. Even proven beyond my SL knowledge! Finally, I get the first line by creating a field called the first row, to catch it: Private datagraders are already used; and Private Zero ComputerDataGrid_loadingRow (Object Sender, DataGridRoEventErgus E) {If (this: firstly == emp