Posts

Showing posts from July, 2011

java - packaging jruby script into jar with all dependencies? -

Is there any way to create my existing Vertex script in a single single executable such as Jar or XE? You can do this, and also create OSX .app packages .

objective c++ - Include Obj-C++ header from C++ source file -

अनुवर्ती स्थिति पर विचार करें: MacFont.h struct मैकफॉन्ट: फ़ॉन्ट {// ... NSFont * font; }; मैकफॉन्ट मैकफॉन्ट.एम में कार्यान्वित किया जाएगा फोंटएन्जीन सीपीपी: #if परिभाषित (ओएसआईएमएसी) # "मैकफॉन्ट .h "#elif // ... #endif // ... इसे संकलित करने के लिए, मुझे FontEngine.cpp का नाम बदलकर FontEngine.mm करना चाहिए, लेकिन मैं नहीं हूँ को अनुमति दी। तो अब क्या? यदि आप फ़ाइल नाम बदल नहीं सकते हैं, तो चिंता। फ़ाइल प्रकार को बल देने के विकल्प के लिए अपने कंपाइलर मैनुअल से परामर्श करें, और कंपाइलर को बताएं कि एक्सटेंशन की परवाह किए बिना, यह फ़ाइल उद्देश्य-सी ++ फ़ाइल है।

How do I build two different installers from the same script in inno? -

I want to set a "standard" for external use, but I will use the same script and tell it Probably with a Command Line Ultimate?) To include the second set of files (PDB files for debugging) for our laboratory installations. (And fully install EXE) How can I do this? Is this possible? I do not know how to set it in [File] section. (Add files based on some conditional / absolute value) Note - This user is not allowed to give an option during installation. I want a build-time option to set up my Hudson creation or batch file. I think I can only make a separate installer for PDB, but I have only one file to do everything You can just use #ifdef DebugVersion file: *. Pdb ... #endif and then call this kind of compiler: iscc.exe -DebugVersion ... I will add something like this so that you get different output filenames: #ifdef DebugVersion OutputBaseFileName = mysetup-dbg #else OutputBaseFileName = mysetup #endif Note that you will need an InnoSetup

jquery - How to access child element out of children()? -

I want to get an element of children instantly, and then want to get a particular class of a child index . Something like this: var index = 25; Var children = $ ("# myListElement"). Children (); If (index; lt; children.length) {if (children [index] .hasClass ("testclass")) {Warning ("Hello!"); I think that. Syntax () is fine, but how do I get them into indexed elements in jQuery style? Thanks children method one Array-like object that includes plain dome nodes, you can wrap it to an inherent element with jQuery, or by using the eq (index) method on it hasClass < / Code> should be able to use jQuery methods. If ($ (children [index]). Haclas ("Test class")) jQuery does not wrap them by default for obvious performance reasons Does If you are using a firebug or Chrome / WebKit developer tool, you will get an exception when you try to call an undefined method on an object. See . Make sure you are viewing the conso

c# - Update query for Access Database for certain Parameters -

I am using MS Access as a database and to update some records in it, c #, .net I am using But this is making a mistake in saying: "No value has been given for one or more essential standards." The table has 5 columns and I want to update only 2, I have it for "User_DRL set user_role_id = '" + _UserRole + "', Auth_id = '"+ _authId +"' "+" WHERE id = '"+ _Id +"' "; Where _UserRole, _authId, _Id is the string What could be the error. Do I need to give every parameter in the update parameter or any other way. Thanks Whenever you get such an error, be a breakpoint and Test your query to ensure that you expect. For example, a useror actually exists in the _authId and _Id query. You can add some defensive code before preparing the statement - this example checks to ensure that _UserRole is empty or empty. if (string! I.e.n.l.l.a. (_UserRole)) {...

elisp - In Emacs can you evaluate an Emacs Lisp expression and replace it with the result? -

For example if I have the text: Sum of items (+ 1 2 3) I want to move at the end of the line, evaluate the expression and replace it with the result, so that it can read: Cu Cx Ce In the / kbd> buffer, the preceding parentheses will include the value of the expression. You can do this, then manually back up and delete the original expression. If this is a lot of work, then here is a command that evaluates the preceding expression and changes it with its value: (defun replace-last-sexp () (interactive) (Two (value (eval (predecessor-sexp)) (kill-sex-1) (insert (format "% S" value)))

mercurial - Why TortoiseHg not show the "merge conflict"? -

Brief version of the question: Since I already have TortoiseHg, I clicked on the file on the right to see the merge paradox Was trying for, but there is no way to see it? Description: To make a simple case of merge controversy, I will send a report on hg init win 7 After that clone it to another folder. Now, in a work directory, I added the code "123 is" line, committed. And in another folder, I have done a "hg bridge" and "hg update" Now, I go back to the first folder, and "123" to "123abc" , And then a "hg committed" and then I go to another folder and edit "123" on "123xyz" there, and "commit HG" and when " HG push ", then it says that it can not do. So I try to see any visual tool that is struggling, but ... Is there no alternative to Tortoise HG to do this? There is no conflict yet as SVN or CVS you can back beforehand Before you need to make changes in th

Connect to a site using proxy code in java -

I want to connect in proxy through Java as a site. This is the code that I have written: public class ConnectThroughProxy {proxy proxy = new proxy (proxy .type.http, new inset socket address ("proxy IP", 8080)); Public static zero main (string [] args) {try url URL = new URL ("http://www.rgagnon.com/javadetails/java-0085.html"); URL Connection Connection = url.openConnection (); String encoded = new string (base 64.exode (new string ("user_name: pass_word"). GetBytes ())); Connection.setDoOutput (true); Connection.setRequestProperty ("proxy-authorization", "basic" + encoded); String page = ""; String line; Stringbuffer tmp = new stringbuffer (); BufferedReader = new in BufferedReader (new InputStreamReader (connection.getInputStream ())); While ((line = in. Robil ()) = null) {page.concat (line + "\ n"); } System.out.println (page); } Hold (Exception pre) {ex.printStackTrace (); }} This throws the following

what are all the web application present which is similar to jquery? -

मुझे कुछ वेब अनुप्रयोग की तलाश है जो कि jquery के समान है jQuery कोई वेब अनुप्रयोग नहीं है यह एक कॉम्पैक्ट जावास्क्रिप्ट लाइब्रेरी है जिसमें बहुत सारे नियमित रूप से इस्तेमाल किए जाने वाले फ़ंक्शंस और गुणों के साथ जावास्क्रिप्ट डेवलपमेंट को आसान बना दिया जाता है। यहां कुछ ऐसे लोग हैं जिनके आप में रुचि हो सकती है: < Li>

c# - StreamWriter appends random data -

I am seeing strangely behavior using the code by writing additional data to the StreamWriter class using this code: Public Zero WriteToCSV (string filename) {StreamWriter streamWriter = null; {StreamWriter = Try new streamer (filename); Log InEfO ("Writing CSV Report Header Information ..."); StreamWriter.WriteLine ("\" {0} \ ", \" {1} \ ", \" {2} \ ", \" {3} \ "", ((int) CSVRecordType.Header) .toString (" D2 ", Culture Info. Contentculture), M_InputFilename, M_LoadStartDate, M_load and Date); Int recordCount = 0; If (summary summary) {log info ("writing CSV report summary section ..."); ("\" {0}, \ "{1} {\"}, \ "\" {\ "{0} "{2} \", \ "{3} \", ((int) CSVRecordType.Summary) .toString ("D2", CultureInfo.CurrentCulture), categoryResult.Value.StatusString, categoryResult.Value.Count.ToString (CultureInfo.CurrentCulture), categoryResult.Valu

java - importing project in Eclipse -

Hi I'm new to Eclipse (and I'm a newbie in java): I'm building a project that should be used. Some classes from any other project, do I have to export this as last project jar file and add to my project? What are the other options? There are several options: If Project A relies on Project B , And both projects are in the same eclipse workspace, you can only project to project A's construction path (project properties / build path / project). Its good advantage is that it will (optional) automatically pull in the Jar of Project B, as well as the updates of B will be automatically used by A, and you can debug in the code of B (Even so That by changing the hot code too). If A and B are quite different, then just make B in a jar (or many people), then add them to the construction path of A.

php - IMagic object creation shows error? -

I just try to integrate ImageMagic into my PHP project. I have installed and executed only the sample files, which they provided with the imagery-3.0.0 RC1 zip file. But this shows Fatal error: Class 'imagic' C: \ wamp \ www \ imagick-3.0.0RC1 \ imagick-3.0.0RC1 \ examples \ watermark.php not found on row 9 This type of error How can I avoid it? I can not see any section including section on that page. How to Include Class Files You have to install the ImageMagic PHP extension. There is no pre-built extension for Windows, so you probably have to configure and compile yourself.

web services - What is the state of adoption for WSDL 2.0 and WSDL HTTP Binding? -

1) Do anyone know anything about the adoption rate of WSDL 2.0? I have always read that it is not widely deployed in comparison to WSDL 1.1 but I am not getting any number or survey on this. 2) and HTTP binding in the WSDL? How many real-world projects really use it? This has improved significantly in the WSDL 2.0 space, but I think the adoption rate of WSDL 2.0 is still low. I really appreciate it if someone can tell me about a trusted source that has some solid numbers on it. Thank you in advance, Max UPDATE : Only numbers can be searched for specific Google queries so far ... File type: wsdl Description Interface endpoint -> 29 results File type: wsdl definitions PortType -> About 9, 100 results EDIT: The title has been changed to make the question more clear. It seems that there is no solid number because all still "talking about it "Even in the SDKs there is a" disputed "statement about poor WSDL 2.0 support.

c# - Free WinForms image editor control -

There are lots of image editors in C #, but I only need control, which encapsulates the editing and that I can keep in place. On my own host form Does anyone know of such controls? I got the answer This article Describes the program that allows someone to draw a graphic object on a WPF window using the mouse and some drawing tools. The program supports the following tools: rectangle, oval, line, pencil and text. My first Draw Tools article shows how this is using a Windows form. In the WPF version, I have implemented several additional features requested by readers of the previous article: Text tool XML serialization Background image printing Overlay on zoom Print zoom Most of the requirements have been completed From this context, Edit: The linked article was deleted from 08/09/2015 to

javascript - define border width(not thickness) -

Can I define border widths like .box {width: 200px ; Height: 100px; Border bottom: 1px solid # 000; } The box width is 200px but I want the width of the border just below 100px . It seems as if you want a half-range odd, but possible, I think this is working in Firefox, Chrome and Safari MSIE I do not have the hand at this time, and can cause problems The way it works, it has a background color Is half width, and 1 pixel tall compared to div.box . I have put a brown background on the body so that you can work it out. & lt; Html & gt; & Lt; Style type = "text / css" & gt; Body {background-color: # ccc; Color: # 000; } .box-border {width: 100px; / * Half wide. Box! * / Height: 101px; A little longer than / * .box! * / Background color: # 000; Overflow: visible; / * .box, inside it, can go outside * /} .box {width: 200px; Height: 100 pixels; Background color: #fff; } & Lt; / Style & gt; & Lt; Body & gt; & Lt; Div class

cocoa - How to save a NSImage as a new file -

How can I save an NSImage in a certain directory as a new directory (png, jpg, ...) Can i Do something like this: NSBitmapImageRep * imgRep = [[image Representing] ObjectAtIndex: 0]; NSDT * Data = [IMGRAP Presentation User Type: NSPNG FileType Properties: Zero]; [Write data file: @ "/ path / to / file page" atomic: no];

coding style - What is the best way to use whitespace while programming? -

I am quite new to programming and learning; I have seen different methods of drafting code, comments, etc.; And it has been recommended on various techniques. I'm mostly in C #, C ++, and Java programs so I want to know what is the best way to layout code so that other people from where to go, how simple and easy it is Understand, it is affected. The best rule is to follow: (and possibly only the rules will agree) / Em> Be consistent! Choose a style and stick with it always put your braces in one place. Do not use similar naming conventions tabs and spaces, etc. ... Being told. Working on a team with people , make sure that you are already trying conventions for any language. All agree on a style and stick with it if you do not, then a developer will again reformat a file with its auto-format, and then you may have hundreds of small conflicts that are just white space. Reasons are there.

java - Integration of System Tests in the build process -

I continue the development of a serial layer generator, entering user type description (currently at XSD or WSDL) , And the software produces code in a specific target language (currently, Java and ANC C89), which is capable of representing the types described and whatever can serial (a byte is changed in sequence) And in these Do Disrailaijh to Lyon. Since the generated code is difficult (I mean, writing code is hard. Write code, writing code is hard to write code, which is a whole new country of hardness :)) Thus, in the project before my Master thesis, we decided that we should replace some system tests. These systems know a type of trial and several pairs of values ​​and byte sequences. To execute system tests in a particular language, the type is run through syste, resulting in the code described above. This code is then attached to some handwritten host-code, which is a combination of these pairs of a byte sequence Is able to read and there is a value and function to read

List in C# - passing multiple entries as a single object -

मेरे पास एक विधि है (सी #) सार्वजनिक शून्य MethodName (सूची & lt; आदेश & gt; आदेश , आईआईडी आईडी) मुझे इसे एक मुख्य पृष्ठ पर पास करना होगा, जिसमें मुझे आईडी में पूर्णांक मान देना है, मैं एक ही सूची में एक से अधिक आइटम्स को पारित नहीं कर पा रहा हूं। सूची क्रम में दो नंबर प्रविष्टियां होनी चाहिए, (यानी आदेश। संख्या 1 और ऑर्डर। Number2) कैसे मैं एक सूची को पैरामीटर के रूप में पास करूँगा जिसमें इस नंबर की संख्या 1 और 2, ताकि मैं पाश के माध्यम से इसे पा सकता हूं और इसे ढूंढ सकता हूं। धन्यवाद। < P> अगर मैं यह सही ढंग से समझता हूं, तो आपके पास: वर्ग आदेश {सार्वजनिक int number1 {get; सेट; } सार्वजनिक पूर्णांक संख्या 2 {प्राप्त करें; सेट; } ...} सूची & lt; आदेश & gt; आदेश = नई सूची & lt; आदेश & gt; {{संख्या 1 = 123, संख्या 2 = 234}, {संख्या 1 = 321, संख्या 2 = 432}}; आप एक को खोजने के लिए आदेश खोज करने में सक्षम होना चाहते हैं जहां number1 == आईडी || संख्या 2 == आईडी मान लें कि दिए गए आईडी के साथ केवल एक ही ऑर्डर है या आप पहले से एक का

html - javascript and div ids -

अगर मेरे पास html फ़ाइल में निम्नलिखित कोड है & lt; div id = div1 & gt ; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; externalFunction (); & Lt; / स्क्रिप्ट & gt; Div> आप आईडी का मतलब है? नाम अलग है संक्षिप्त जवाब नहीं है, लंबे समय तक उत्तर आप कर सकते हैं यदि आप उस div के बारे में कुछ जानते हैं जिसे आप देख रहे हैं (जैसे कक्षा या जहां यह स्थित है या कुछ और।)

c# - How to notify a Windows .net service from PHP on Linux? -

I am writing a service in C # on Windows that is triggered by the PHP based web frontend, which is Linux Runs on Both processes share the same SQL Server 2005 database. AMM is not available on any messaging medium. The PHP process inserts a line into a SQL Server table. Windows processing should read this entry and process it. If I have no experience with PHP, then what would you suggest to notify the Windows process? Hosted in the service of windows and. Type Write = "Text" Subscribe in PHP with the events occurring in the database and using them.

design patterns - Is MVVM killing silverlight development? -

It is a question that I was roaming in my head for some time. I had a chat with a boy with one night who told me that he would not use the shipping infrastructure because he could not understand how it works with MVVM. The more I tried to understand that the pattern should be taken with salt, it does not listen. My point is, when some problems are resolved then the patterns are very good. Sometimes only a part of the pattern solves a particular problem, while it has various problems in its other parts. The goal of any developer is to create a solid application using a combination of pattern patterns and know-how. I think MVVM is becoming a pattern that governs them all. As it is not directly supported. Net needs some fancy business to work on it. I think people are remembering the point of pattern, which is a loose coupled, tested code and instead jumps through the hoops and is trying to write MVVM in the letter. MVVM is great, but I want it to come with a warning or disclaim

oop - Does Scheme work with Microsoft COM? -

I'm new to the plan and I like it for its first class / high-order job. However, my data comes from a COM source with object-oriented APIs. I know that planning and COM are related to different programming parameters, but I am thinking that there is an interface or a way to connect to a com-source? In MIT-scheme, it seems that there are some low-level Win32 primitives but for COM / ActiveX There is nothing to support. It looks like you also see "" schemewiki.org, which claims that COM / ActiveX is binding.

How can I test Windows Error Reporting? -

My company is connected through Windows Error Reporting We add some extra data to our crash reports using WERRegisterMemoryBlock Obviously we want to make sure that it is working before sending our next version. How can we test it? Is there a way to properly preview it that is being sent? Does it really reproduce that we're going to be able to get from Winqual? Alternatively, can we generate a real report from the developer machine, can get the report again from Winqual? How do we differentiate this test case from all our vinkal data? [...] Can we generate a real report from the developer machine, Can you get reports again? Winqual? Prepare a special trial version of your application Upload WER for this trial version with error reporting Crash test version on the machine Check Winqual, should display a report after a few days If the report does not already come with CAB data, additional data Enable the request (in the queue) Error reporting enabled Che

Assigning ID to a Row in an Android ListView -

I have a ListView when an item on the ListView is tapped, so it loads a SubView I can list each of the ListView I want to specify an ID for the line, so I can pass that ID with SubView. How do I specify a specific ID for each row in the ListView? Here's what I'm currently loading ListView: setListAdapter (New ArrayEptter (This, R.Lay Out .list_list, merchant)); Here's how I solved the problem: I've got Employee Associates and Employees' names Meet with the local SQL Database, then I made an array list of the names and created an array list of employee Idri at the same time. In this way, the employee identifier [0] employee names will match with [0], the employee will match the IRAA [1] employee name Ore [1], etc. Etc. Once the ArrayLists were created, I fed the names of the nameserver in ListView. Later, onListItemClick, I will leave behind the selected ListView row's position. This 'position' array will be corrospond for the position in

vb.net - Getting the data out of the data Formview -

I have an ASP PG, which has a form view inventory control which hooks up to a SQL database client table I want to use the customer name outside the form. How do I: a) Use the bound text box in the form view template? Text1.text = formview1.customname.text (like does not work but this is a bit of a thing) B) Access the database field in the table that sqlsource adds to the firewire feed Really appreciate the help, I'm sure it's easy to do but I'm not going there. You want to use that. For example: & lt; Asp: formview id = "formViewContainer" ... other code & gt; ..... the formula code ..... <# Eval ("Customer Name")% & gt; ..... More FormView Code ..... Then use the following type to access "CutomerName" outside the form view: & lt; Asp: textbox id = "customername" runt = "server" text = '& lt;% # DataBinder.GetPropertyValue (formViewContainer.DataItem, "username&quo

c++ - Having trouble storing a CRTP based class in a vector -

I'm not sure that it can be done, just im delving into templates, maybe my understanding is a little wrong. I have a Platoon of soldiers, inherited from a formation to take the property of Platoon, but because I can have many structures, as I can think I CRTP is used to make structures, hopefully I can make Platon a vector to store platoon, but obviously when I make a platon, then it is vect In is not stored, "are unrelated" Is there any way around this? I read about "Weinier" who are similar and they work with arrays, but I can not make it difficult to work, maybe I'm missing something here's some code : (Sorry about formatting, this code is in my post but is not showing for some reason) template Then I use the platin class to use these structures so that Plato can get the relevant SetupFormat () function: template & Lt; Class structure & gt; Class Platoon: Public Structure {Public: **** Platoon code here}; Everything is gr

c# - Creating a webservice client having SoapParameterStyle as Bare as opposed to wrapped -

I am trying to create a soap web service client using Visual C # 2008 Express IDE. I do this through a claim-click project (name-> Service Reference-> Advanced-> Add Web Reference (This is because we have to support NIT 2.0 and VS2005 for our development). Everything is working well, and the customer is being created as follows [System.Web.Services.Protocols.SoapDocumentMethodAttribute ("operationInfo", RequestElementName = "mainInfoTag", RequestNamespace = "http: //www.example.com/test", ResponseElementName = "Answer", ResponseNamespace = "http://www.example.com/test", = System.Web.Services.Description.SoapBindingUse.Literal Use, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped) [Return: System.Xml.Serialization.XmlElementAttribute ("somenewID")] Public string storeWarrantyInformation (tagBelowMainInfoTag tag, string out somenewID, string out someotherID) you can see Area, the metho

sql - Does the order of conditions in a WHERE clause affect MySQL performance? -

Say I have a long, expensive query, which is searching for a large number of rows, packed with conditions has been done. I have a special situation, such as a company id, which will limit the number of rows that should be searched very well, it limits it from hundreds to thousands to dozens. Is this a MySQL demonstration that I do this: Select customers from WHERE (First name as: Foo or last name like: foo or like phone: foo ) And (like the first name: like bar or last name: bar or phone such as: bar) and company =: ug or this: SELECT * From customers WHERE company =: UG and (as the first name: foo or lastname such as: foo or phone: foo) and (like the first name: like bar or last name: like bar or phone: bar) No, order should not make big difference. When these lines are found, then it should be found which lines correspond to the position, the entire position (all the sub-positions connected through boolean logic) is examined for each row. Some intelligent DB en

perl + export param in to perl syntax in shell script -

मेरे पास निम्न स्क्रिप्ट है जो a param को b param पर प्रतिस्थापित करता है और केवल c पैरामीटर में मिलान करें, पेरल सिंटैक्स को बदलने के लिए: if / $ c / सी चरम को निर्यात करने के लिए follwoing perl वाक्यविन्यास < पूर्व> #! / Bin / bash निर्यात करें a = '@ d & amp;' निर्यात बी = 'नया पाठ' निर्यात c = 'bla bla' echo $ LINE | Perl -pe 'अगला if / ^ # /; S / (^ | \ s) \ Q $ ENV {a} \ E (\ s | $) / $ 1 $ ईएनवी {b} $ 2 / if / $ c / ' उदाहरण लाइन का पैरामीटर = @ डी एंड amp; जब c है पैरामीटर आपको क्या चाहिए if / $ env {c} / और कृपया अपना कोड ठीक से फ़ॉर्मेट करें

Problem with Command Pattern under Visual Studio 2008 (C++) -

I ++ under this pattern VS 2008, the same code has been tested in GCC with a problem (MinGW for Linux, Mac and widnows) and it works I copy / paste the code here: < Pre> class MyCommand {public: execution on virtual zero () = 0; Virtual ~ myCommand () {}; }; Class MyOperation {Public: Virtual Zero DoIt () {}; // I do not even write it inline}; Class MyOperationDerived: Public MyOperation {Public: Virtual Zero DoIt () {}; // I do not even write it inline}; Class MyUndoStackCommand: Public MyCommand {Public: typedef zero (MyOperation :: * action); MyUndostac Commands (My Operation * REC, Action Action); / * Virtual * / zero executed (); / * Virtual * / ~ myundostaccommand (); Private: My Operation * My Receiver; Action mynection; }; The CPP: {#include "MyUndoStackCommand.h" #include "MyOperation.h" MyUndoStackCommand :: ~ MyUndoStackCommand ()} MyUndoStackCommand :: MyUndoStackCommand (myOperation * Rec action): myReceiver (REC), myAction (action)

php - Lowering script memory usage in a "big" file creation -

It seems that I am facing a normal memory outage problem while using a PHP script. The script is originally developed by another person, acts as an XML Sitemap Creator, and uses large amounts of memory on large websites. I thought the problem was kept working in memory due to a method algorithm, but digging in code I found that the script works like this: < Li> Open file in Output (XML Sitemap entries will be included) In Loop: ---- To add each entry in Sitemap, Fillit Close file Termination Although there is no huge arrays or variables Being kept in the heart, this technique uses a lot of memory. I thought that maybe PHP was buffering under the hood at the end of the script and had "flushing" data, so I have the code modified code to close and open every ND record, But memory usage is still the same .... I'm debugging script on my computer and watching memory usage: While the script executes, memory allocation increases. Is PHP allowed free f

utf 8 - charsets in MySQL replication -

What can I do to make sure replication will use latin1 instead of utf-8? I am migrating between a MySQL 5.1.22 server (Master) and a FreeBSD system on a Linux system between a MySQL 5.1.42 server (slave). My replica works well, but when non-ASCY characters are in my boards, they become "weird" Linux / MySQL-5.1.22 shows the following character set variables: character_set_client = latin1 character_set_connection = latin1 character_set_database = latin1 character_set_filesystem = binary character_set_results = latin1 character_set_server = latin1 character_set_system = UTF8 character_sets_dir = / usr freebad shows that character_set_client = utf8 character_set_connection = Utf8 character_set_database = utf8 / share / mysql / charsets / collation_connection = latin1_swedish_ci collation_database = latin1_swedish_ci collat Ion_server = Character_set_filesystem = binary character_set_results = utf8 character_set_server = utf8 character_set_system = utf8 character_s

c# - Search in a List<DataRow>? -

I have a list that I am composed of a datatabah with only one column assume that column MyColumn < / Em> Each element in the list is an object orange with my column, in this case, only one (MyColumn). Is there any definite value in that object array, what is the best way to check it? Thanks var search value = SOME_VALUE; Var results = list. Where (line = & gt; line ["MyColumn"]. SearchValue); // Returns the collection of DOSR with expected value Results Results = List. Any (line = & gt; line ["MyColumn"]. Par (search value)); // check, if the required value is present in DosTar, then

a question about closing a stream/socket in java -

विधियों को सॉकेट.कोज () और someStream.close () IOException फेंकता है? जांच नहीं कर रहा है वापसी का मूल्य () एक सामान्य लेकिन फिर भी गंभीर प्रोग्रामिंग त्रुटि है। यह काफी संभव है कि पिछले लिखित (2) ऑपरेशन की त्रुटियां पहली बार अंतिम समाप्ति पर रिपोर्ट की गईं ()। फ़ाइल को बंद करने पर रिटर्न मान की जांच न होने पर डेटा के चुप नुकसान हो सकता है। यह खासकर एनएफएस के साथ और डिस्क कोटा के साथ मनाया जा सकता है। जबकि एक पठनीय धारा को बंद नहीं किया जा सकता है, जावा की आईओ फ्रेमवर्क उस की जांच नहीं कर सकता क्योंकि उसमें स्थिर रूप से पढ़ा हुआ बनाम लिखना नहीं है। धाराएं

asp.net - .NET "Timer" would block other method calls? -

In ASP.Net 3.5, we suspect that a representative triggering by a "timer" will stop another method call . From the log, some function calls will wait for the representative to finish and will continue to work. Is this true? If so, what can I do? PS: Representative includes code for using WCF to obtain data and the following code Change private zeros & lt; T & gt; (Referee LIIL & lt; T & gt; src, IList & lt; T & gt; des) {lock (src) {while (src.Count> 0) {GC.SuppressFinalize (src.ElementAt (0)) ; Src.RemoveAt (0); } GC.SuppressFinalize (src); Src = des; }} Thanks a lot It depends on the timer implementation you are using - There are at least three if you use the timer , which sets a fire on a pool bridge without any synchronization object, then it should not be a problem. The fact is that for the period you are locking, the call will stop locking on the same object, of course.

c# - Way to implementing Search functinality on a Window -

Image
I am working on a (WPF + C #) application. I want to implement the search functionality It will allow all versions of a specific string to be found on specific part of the window. What can be the best way to do this? wiki, I hope I found exactly what you can see Are:

get contact info from android contact picker -

I am trying to call the contact picker, get people name, phone and e-mail in the wire and Another activity, using an intention to send them, is yet to work: intended intent = new intent (Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI); StartActivityForResult (intent, 1); // ... @Override Public Zero onActivityResult (integer reqCode, integer resultCode, intent data) {super.onActivityResult (reqCode, resultCode, data); If (resultCode == activity. RESULT_OK) {Ure contact data = data .getData (); Cursor c = managed query (contact data, empty, null, empty, zero); If (c.moveToFirst ()) {string name = c.getstring (c.getColumnIndexOrThrow (contactContract.Contacts.DISPLAY_NAME)); Intent intention = new intent (current activity. This, new activity class); Intent.putExtra ("name", name); StartActivityForResult (intent, 0); }}} But if I add to: string number = c.getString (c.getColumnIndexOrThrow (ContactsContract.CommonDataKinds.Phone.NUMBER)) ; This force c

beanstalkd interface/GUI -

Do anyone have an interface address to handle beanstock? Am I obscurely looking for things like PhpMyAdmin for MySQL? There is no need to be PHP or Web based, it can be an interface, GUI .. Just got another looks more functional and slightly beautiful.

asp.net - Display Friendly Date, Numbers -

संभव डुप्लिकेट: मैं asp.net के लिए एक कस्टम नियंत्रण की खोज कर रहा हूं, जो लेख की तारीख के बजाय उपयोगकर्ता के अनुकूल तिथियों को प्रदर्शित करने में मदद करता है: (2-अप्रैल-2010) यह प्रदर्शित करता है < / P> (2 महीने की उम्र) मैं इसे Google पर ढूंढने में असमर्थ हूं, कृपया कोई भी लिंक, कस्टम नियंत्रण, उसी के लिए लेख का सुझाव दे सकता है। धन्यवाद आप। यह प्रयास करें (यह एक datetime एक्सटेंशन है)। तो उपयोग है: var date = new dateTime.Now; स्ट्रिंग फ़ॉर्मेटेडडेट = तारीख। रीडर करने योग्य टाइम्सन्ना (); सार्वजनिक स्थैतिक स्ट्रिंग ToReadableTimespan (यह दिनांक समय) {// 1. // तारीख से समय बीतने का समय मिलता है। टाइमस्पेन = दिनांकटाइम.अब सब्ट्रैक्ट (डी); // 2. // बीत चुके दिनों की कुल संख्या प्राप्त करें। इंट डेडफ = (इंट) एस कुछ फील्ड्स; // 3. // बीत चुके सेकंड की कुल संख्या प्राप्त करें Int secDiff = (int) sSHSSeconds; // 4. // सीमा मानों से बाहर की अनुमति नहीं देते यदि (डेडिफ & lt; 0 | dayDiff & gt; = 31) {वापसी नल; } // 5. // उसी दिन का समय संभालना। If (da

pthreads - Permanent mutex locking causing deadlock? -

itemprop = "text"> I'm having a problem with mutex (pthread_mutex on Linux), where a thread re-muted it after unlocking it Locks X, the second thread is not very successful in getting a lock. I have attached a test code where a mute x has been made, with two threads, which locks the mute x in the endless loop, for a while Sleeps and unlocks it for Land. The output which I expect to see is "alive" messages from both threads, one for each (for example 121212121212). But what do I get that threads get most of the locks (for example 111111222222222111111111 or just 1111111111111 ...). If I add a sleep 1) After opening the lock, everything works as expected. Apparently when the thread goes to sleep then the other thread gets its lock - though this is not the way I was hoping, as the second thread has already said pthread_mutex_lock. I suspect this is the way it is implemented, that is the priority of thread, but some problems arise in this special test. Is

c# - Proper way to use Linq with WPF -

I am looking for a good guide in the correct method of using Linq to Sql with WPF. Most of the guides go barefoot only, such as how data is displayed from the database, but how can I save it back into the database? Can you answer this question or tell me Can you? I have a separate data project because only one data will be used in the web page so that I have a repository method. This means that I have a different class that uses datacentext and has methods like GetAllCompanies () and GetCompanyById (int id). 1) Where is the collection is best to go back as IQueryable or should I 2) Why should I use the Observe Collection and also use it with Linux / Linux should do. IQueryable Some properties of linq units should be editable in the app so that I can set them in two-way mode. That could turn the object into an objective collection. 3) Whether the object in Observeable Collination is an example of the original linux unit and thus changes in the database (when called sub

Convert a GTK python script to C -

The following script will take a screenshot on a gnome desktop. gtk.gdk w = gtk.gdk.get_default_root_window () SZ = w.get_size () Punjab = gtk.gdk.Pixbuf (gtk.gdk.COLORSPACE_RGB, false, 8, SZ [ 0], SZ [1]) Punjab = pb.get_from_drawable (w, w.get_colormap (), 0, 0, 0, 0, SZ [0], SZ [1]) if (PB = none): pb. Save ("screenshot.png", "png") Print "screenshot saved on screenshot." Else: Print "Unable to get screenshot." Now, I'm trying to convert it and I'm using one of those apps that I'm writing but I've been unsuccessful yet. Is there anybody to do in C (on Linux)? Thank you! Jess "itemprop =" text "> I have tested this and it works, but be an easy way to go from GdkPixbuf Could this be the first one I found to a png. (There is no gdk_pixbuf_save () ) #include & lt; Unistd.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; Gdk / gdk.h & gt; # Include & lt; Cairo.h &

WPF: Binding to ObservableCollection in ControlTemplate is not updated -

मैंने अपने कस्टम नियंत्रण MyControl के लिए एक ControlTemplate बनाया है। MyControl से प्राप्त System.Windows.Controls.Control और निम्न गुण को परिभाषित करता है सार्वजनिक पर्यवेक्षणसंपादित करें & lt; MyControl & gt; बच्चे {प्राप्त करें; संरक्षित सेट; } । नेस्टेड बाल नियंत्रण को प्रदर्शित करने के लिए मैं एक ItemsControl ( StackPanel ) का उपयोग कर रहा हूं जो कि GroupBox । यदि कोई बाल नियंत्रण नहीं है, तो मैं समूह बॉक्स को छिपाना चाहता हूं। एप्लिकेशन स्टार्टअप पर सबकुछ ठीक काम करता है: समूह बॉक्स और बाल नियंत्रण दिखाए जाते हैं, अगर बच्चा संपत्ति शुरू में कम से कम एक तत्व अन्य मामले में यह छिपा हुआ है। समस्या तब शुरू होती है जब कोई उपयोगकर्ता एक बच्चे के नियंत्रण को एक खाली संग्रह में जोड़ता है। समूह बॉक्स की दृश्यता अभी भी ढह गई है। वही समस्या तब होती है जब संग्रह से अंतिम बाल नियंत्रण हटा दिया जाता है। समूहबॉक्स अभी भी दृश्यमान है एक अन्य लक्षण यह है कि HideEmptyEnumerationConverter कनवर्टर को कॉल नहीं किया जाता है। बिना रिक्त संग्रह को बाल नियंत्रण

c# - Loading a video file using emgucv 2.1.0.0 -

मुझे लोड एक वीडियो फ़ाइल कैसे < मजबूत> emgucv 2.1.0.0 में सी #। मुझे कुछ मार्गदर्शन की आवश्यकता है मुझे एग्यूकव एपीआई (मेरे पास एक दस्तावेज है जो एक इंस्टॉलेशन के साथ आया था) का उपयोग करने के लिए कुछ मार्गदर्शन की आवश्यकता है, इसलिए मुझे तब प्रश्न पूछना पड़ता है जब मैं इसे पहले से ही एपीआई ( नोट: उदाहरण के लिए, मैं जावा एपीआई का उपयोग करने के तरीके के बारे में जानने के लिए आप ट्यूब पर एक वीडियो के माध्यम से गया था और अब इसका उपयोग करने में बहुत ही आरामदायक है, एएमजीयूसीवी के लिए एक नहीं मिला) उदाहरण के लिए, मैं अलग अलग चीजों के तरीकों को खोजता हूं लेकिन मुझे उन्हें कोड में लागू करने की कोई सुराग नहीं है। शायद एक तरीका और इसका उपयोग कैसे किया जा सकता है। बहुत बहुत धन्यवाद < यह मानते हुए कि आप एमु डीएलएल को सही तरीके से आयात कर चुके हैं, का उपयोग करके अपनी वीडियो फाइल को लोड करें। कैप्चर कैप्चर = नया कैप्चर ("फाइलनाम"); तब आप छवि & lt; Bgr, byte & gt; Img = capture.QueryFrame (); आप छवि को देखने के साथ ImageViewer- वर्ग: Imag

c# - Accessing "current class" from WPF custom MarkupExtension -

Trying to write a custom markup extension to make my life easier by writing me a better The way to specify the binding in XAML, though I would like to know that there is any method, I can use the object that represents the file used in markup extension . In other words, suppose that I have UserControl which defines a particular model of my program's data model. This control has many visual content such as grids, borders, and normal layout if I use my markup extension on a particular property of an element in this UserControl It is typed using the example of UserControl without knowing it (I am planning to use the reflection). Is this possible? In .NET 4.0, they added capability, but unfortunately, this is not possible in previous versions . If you are in .NET 4.0, you can do the following: Public override object ProvideValue (IServiceProvider ServiceProvider) {var rootObjectProvider = serviceProvider.GetService (typeof (IRootObjectProvider)) as IRootObjec

multithreading - Can I set a breakpoint in Visual Studio (c++) to break on a thread context switch? -

We just want to break into a certain thread. How to do any idea? I can not find any way to break that situation. I should have been more specific in the text. As the title suggests, I want to break the reference switch in the thread. I want to wonder if there was a way to do this in user-mode debugger. Imagine: When the switch is switched to 42 then you set a breakpoint. Breakpoint hit debugger is active now a separate thread is active, and thread 42 is no longer active! I suggest you try (now part of Microsoft). You thread only processes can be limited to the limit and process events, such as production: 20: 43: 51.9162409 lsass.exe 440 thread success Create thread ID: 5420 20 : 43: 51.9166730 lsass .exe create 440 threads success Thread ID: 7916 20: 43: Create 53.2 99 0544 svchost.exe 736 Thread success Thread ID: 5540 20: 43: Create 53.7664146 svchost.exe 736 Thread success thread ID: 7384 20: 43: Create 53.7 9, 85,662 svchost.exe 736 Thread success Thread ID: 188

audio - Record sound as part of a C# program on windows -

How do I go about writing a C # program for Windows, which records MP3 files with my microphone input Does it? Is there a library that deals with recording sound? Many thanks, Patrick This article may be helpful.

php - What would this regex match? -

नमस्कार किसी भी विचार से यह मेल खाने वाला धन्यवाद preg_match ('/ ^ [1- 8] (0 | 5) $ / ', $ myValue) 1 और 8 के बीच अंक या तो अंक 0 या 5 स्ट्रिंग का अंत

ios - Define click event for UISegmentedControl -

I have added a UISegmentedControl to my application, no button is selected in normal position is. I want to apply a button click event when the first section is selected, and another event occurs when clicking on the second button. If I understand your question correctly, then you should continuously UIControlEventValueChanged UISegmentedControl ), in the example given in the example of UISegmentControl properly. i.e. [fractal control addTarget: auto operation: @selector (control :) for control control: UIControlEventValueChanged]; Used for the following signature message: - (zero) verb: (id sender) or [Interrupted control connecting: self-action: @Selector (Action: forEvent :) Control events: UI ControlWriteViews]; - (zero) action: (id) sender for event: (UIEvent *) event For or [fractal control addTarget: self-action: control event for @Silver (action): UI ControlAventWalls]; for the simplest method: - (zero) verb which are the s

asp.net - Design decisions -

I have been asked to choose between a web form and MVC for a small internal company project. I do not know how MVC is MVC, I know how to be able to make any decisions? Note: 1. I have read to an extent on MVC that I have high level design options which I have to do, though, as a developer, as long as I do not feel in the code. . There will be another question, how do I want to know how MVC is capable? For example, I have been told that datagrid control can not be used in the way web forms are used). I'm sure there is a way to go about spanking it - by Jeff, Stakeoverflow was made because he was learning MVC.) EDIT: I have been working with ASP.NET since 2002. I am here. If this is a minor project, then I can not find almost any negative glance in finding MVC, And too much upside down. When I started learning MVC, I used it for a test project, on which I was working, a Silverlight app, as well as a small choice of service. I found that I was actually productive in

c# - Entity Framework .. partial constructor -

I intend to expand the creators of some entities in my unit framework (4). However, how do I ensure that my constructor is being run after the model is running. That is, I want to make sure that the object holds data before data in my database. There is no manufacturer other than the default manufacturer; The objects are made through a factory method, and are only started after the construction. You can write your own default constructor, and the generated code will call all generated properties before initiating it. If you write your own non-default constructor, you will also have to write your own default constructor, otherwise the designer file will not be compiled because it assumes that a default constructor is present.

Is it possible to not use { } in PHP? -

I do not use PHP {} instead of indents instead of using {} fall in love with Python syntax Is it possible to configure? You can not use indents, but it is there. It is used: if (cond): endif; While (Condom): Finally; etc. This is not not important white space

vb.net - import hotmail contacts using asp.net -

मुझे asp.net का उपयोग करके live / hotmail संपर्क आयात करना होगा । मैंने जीमेल और याहू किया है। मैंने opencontactsnet.dll पर देखा और यह लाइव के लिए काम नहीं करता उस डेल से कोई भी संपर्क पुनर्प्राप्त नहीं किया गया है। क्या कोई भी हॉटमेल संपर्कों के लिए विशेष रूप से कुछ भी जानता है? ऐसा लगता है कि लोग यहां आपको जवाब देने में भूल गए हैं ...: ) कृपया इस Windows Live एसडीके का पालन करने का प्रयास करें: मुझे लगता है कि आपके पास संपर्कों को लाने का एक तरीका है। शायद यह सही दृष्टिकोण है!

Summer Camp TextMate theme -

On the theme-submitted theme wiki page, there was a link on the theme "summer camp" shortly before the TextMate site, Still, but the link does not work anymore. I am thinking that anyone has this theme and is ready to share? Thanks in advance. / div> I have a copy here, I have posted my derivative topic, which includes comprehensive support (I came to know that whatever I used in the summer camp, there was no definition for all scope).

Riak link-walking like a join? -

I am looking to store images in a NoSQL database (& lt; 5MB) and have them in a separate bucket I am linking to articles. What type of speed does the Riaq link provide? Is it included like an RDBMS at all? links are not similar to JOINS (including cartesian products), but in some senses similar to them Can be used for the purposes of. They are similar to links in an HTML document. With the linking you start with either a key, or you create a map - which starts with several keys (link-walking / traversal actually to map-less Is a special case.) Those values ​​are obtained, their links are filtered against your specification (bucket, tag) and then the matched link is the next step (or back client). Of course, all this is done in parallel (with a JOIN) with high data-area. In addition, the map-deficiency is not slow in itself, you do not have just a sophisticated query planner to work hard for you; You have to think about how to query and organize your data as needed.

c# - Linq2SQL InfoMessage -

Is it possible to access InfoMessage event handlers in the Linq2SQL data reference? All of our codes use these messages to display useful information to the end user and after going to Linq2SQL, I can not figure out how these messages will be displayed. I have not seen any fate of the properties of the classes as well as the connection objects of the data reference, so I am thinking that this is possible. Thanks in advance. You only need to enter the reference code in SqlConnection and then your Interesting to regulate the information message: yourdataContax ctx = new yourdatacontact (); SqlConnection con = (SqlConnection as cufe.Connection); If (con! = Null) {con.InfoMessage + = New SqlInfoMessageEventHandler (con_InfoMessage); } and then apply SqlInfoMessageEventHandler to your code.

javascript - reorder list elements - jQuery? -

क्या जावास्क्रिप्ट या शुद्ध jQuery वाले तत्वों को & lt; li & gt; पुनर्क्रमित करना संभव है इसलिए यदि मेरे पास निम्न की तरह एक मूर्ख सूची है: & lt; ul & gt; & Lt; li & gt; फू & lt; / li & gt; & Lt; li & gt; बार और lt; / li & gt; & Lt; li & gt; पनीर & lt; / li & gt; & Lt; / ul & gt; मैं सूची तत्वों को कैसे चारों ओर ले जाऊं? जैसे पनीर के साथ सूची तत्व को Foo के साथ सूची तत्व से पहले या Foo को बार के बाद स्थानांतरित करें। क्या यह संभव है? यदि हां, तो कैसे? var उल = $ ("उल"); Var li = ul.children ("li"); li.detach () प्रकार ()।; ul.append (ली); यह एक सरल उदाहरण है जहां & lt; li & gt; नोड्स को कुछ डिफ़ॉल्ट ऑर्डर में क्रमबद्ध किया जाता है मैं लीड नोड्स से जुड़े किसी भी डेटा / इवेंट को निकालने से बचने के लिए अलग कह रहा हूं। आप सॉर्ट करने के लिए एक फ़ंक्शन पास कर सकते हैं, और सॉर्टिंग करने के लिए कस्टम तुलनित्र का उपयोग भी कर सकते हैं। < Pre> li.detach ()। सॉ

javascript event e.which? -

What is the functionality of javascript event e? Collapse with example. e Which is not an event, which is a property of the event object, which most people call their event handler as e It contains the key code of the key that was pressed to trigger the event (like: keydown, key). document.onkeypress = function (myEvent) {// does not have to be "e" console.log (myEvent.which); }; With that code, the console will print the code of the key pressed on your keyboard.

.net - How to draw an unfilled square on top of a stream video using a mouse and track the object enclosed in the square automatically in C#? -

I am creating Object Tracking App I have used an easel emgucv 2.1.0.0 to load the video file. I have also streamed the video from a webcam Now, I use Mouse and then using the track on the Video stream (1) - but this is for: C ++ users, the consultant has Said that there are NAT wrappers, but I had a hard time finding it at any time. (2) DxLogo - A sample application is showing how to unify a logo on the data stream. This video uses a capture device for the source, and outputs the output to the file. Unfortunately, it does not use a mouse. (3) GDI + and mouse handling - I have no clue this area. To track the object in the class, I would appreciate if someone gives me some research paper link to read. Any help to draw a mouse over a video is greatly appreciated Thanks to taking the time to read it. Many thanks It looks as if you can locate the image and / or Want to do tracking. The EmguCV () library provides a good foundation for this type of thing. m

c# - SSL certificate for LAN enviornment -

I have created a Silverlight 3.0 application, which communicates with an XML RPC server on https. The whole application will run in a LAN environment where the server can be installed on different machines and the client will be on the same machine. I am using a self-signed certificate which is generated against the IP server and I have to enter the Trusted Route Certification Authority on the client machine. But if I want to communicate with another server then I will have to install another certificate on the client machine against that particular server's IP, in short, I have to install N certificates on the client if I want to communicate different servers , Which is impossible for me, how can I do it with a certificate above the LAN environment? Certificates are generated against the IP or server's host name, is there no way to validate the SSL certificate? Like ServicePoint Manager. Server validation validity callback = MyCertHandler; Fixed bow micrithahandler (o

How do I replace the "node view" screen in Drupal 6? -

I do not need node "view" screen / tab for certain types of content. Instead, when I go to a user / node / NID I want to show the node editing form. How do I do this? Thank you, Omer. One way to do this, use hook_menu_alter > Node / [nid] menu item and you call your function. In that function you can check the node type and call the function used to display the node or the function used to display the node form.

security - XSS as attack vector even if XSS data not stored? -

I have a question about XSS What forms for XSS as a vector Can be used even if the data is not stored in the database and used later? i.e. Php will contain the code: A alert box with the above code (displays that JS can be run) is trivial on your browser. But is it also useful in browsers? The only scenario I am looking for, where you trick someone to go to a certain page, i.e. a combination of CSRF and XSS. "Stored and used later in a database": The scenario that I understand about CSS is the place where you can post data to a site that runs Javascript and Shown on a page in a browser that is more of your own privileges. But, it is clear that it is not wat I'm talking about above. Yes, it's still an attack vector. What do you need to consider: Can a certified user deceive in viewing this page with malicious data created? Answer This is the case yes (assuming you are a certified user). Because it is possible to send someone to your site