Posts

Showing posts from June, 2013

winforms - How do I run a Flash exe file within a Window/Form in a VB.Net Project? -

How do I run Flash XI file within a window / form in the VB.Net project? I do not have an SWF file, so I have to use an XI file that is available. Perhaps you can extract SVF files from XE Flash Projector? There are so many FTs that can do this.

ruby - Variables magic and read from file -

मान लें, मुझे निम्न फ़ाइल मिली ( input.txt ): नाम = "पीटर" उम्र = 26 परिवार_स्टैट = विवाहित उल्लेख रेखाओं को यादृच्छिक क्रम में संग्रहीत किया जा सकता है: family_status = मेरे कार्यक्रम में मेरे पास चर family_status , उम्र और नाम । मैं एक एकल चक्र में कैसे फ़ाइल से उन पंक्तियों को पढ़ सकता हूं और मूल्यों के साथ अक्षरों को आवंटित कर सकता हूं? सेटिंग आप किस प्रकार के चर (स्थानीय चर, उदाहरण चर, वर्ग चर, या वैश्विक चर) Li> किस प्रकार का प्रकार है परिवार_स्टैटस ( स्ट्रिंग, प्रतीक , जो भी हो) मुझे लगता है कि आप इसके लिए उदाहरण चर का उपयोग कर रहे हैं: def read_vars (IO, vars) io.each do | लाइन | # सुनिश्चित करें कि रेखा में सही प्रारूप (नाम = var) है, "गलत स्वरूप" को तब तक बढ़ाएं जब तक कि लाइन = ~ /^\s* नहीं;) + \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ / Var =: "@ # {$ 1}" # डेटा मूल्य का प्रकार चुनें = केस वार्स [var] जब स्ट्रिंग $ 2 जब पूर्णांक $ 2.to_i जब प्रतीक $ 2.to_sym और "अवैध var" अंत उदाहरण _ varariable_se...

java - If I'm making a mail system that manages large amounts of email would I be better off using james or Javamail -

I'm trying to decide whether to use James () or Javail () to create an e- To create a mail system that does email and email. It will send and receive emails with processing, processing, spam, etc. What are the advantages / disadvantages of each and what you suggest that I should use should be compatible with either Java or Closer. Please do not hesitate to create a case for an email system which I have not told here that Java / Closer is compatible. The Java Mail is a low level Java Mail API that allows you to create mail applications and send mails. James, on the other hand) is an extensible mail server that allows you to manage mail folders, and permits custom Java plugins to process them. So I suspect that James is a good starting point (you may actually need to send send email to Gmail).

c# - In a knot with Generics -

मेरे पास निम्न डोमेन ऑब्जेक्ट है: सार्वजनिक वर्ग डोमेनऑब्जेक्ट & lt; T, TRepo & gt; जहां टी: डोमेनऑब्जेक्ट & lt; T & gt; जहां TRepo: आईआरएपीसॉजिटरी & lt; T & gt; {सार्वजनिक स्थैतिक TRepo रिपॉजिटरी {प्राप्त; निजी सेट; }} एक रिपॉज़िटरी इंटरफ़ेस: सार्वजनिक इंटरफ़ेस आईआरएपीसॉजिटरी & lt; T & gt; // जहां टी: डोमेनऑब्जेक्ट & lt; T & gt; // पकड़ 22 {शून्य सेव (टी डोमेन ओब्जेक्ट); } 2 का एक कार्यान्वयन: पब्लिक क्लास उपयोगकर्ता: डोमेनऑब्जेक्ट & lt; उपयोगकर्ता, MyRepository & gt; {सार्वजनिक स्ट्रिंग का नाम {निजी;; निजी};}} सार्वजनिक वर्ग के मायरािपॉजिटरी: आईआरएपीसॉजिटरी & लेफ्टिनेंट; उपयोगकर्ता & gt; {सार्वजनिक सूची & lt; उपयोगकर्ता & gt; इसलिए उपयोगकर्ताओं को साथ में () () {}} एक ऐसी विधि जोड़ने के लिए जो आईआरिपॉजिटरी के अंदर नहीं है। मैं रिपॉजिटरी को एक आईआरएपोजिटरी के रूप में लागू करना चाहता हूं जबकि इसके ऊपर कोई भी हो सकता है टाइप करें। एक छोटा sidenote: मैं बहुत कम डोमेन ऑब्जेक्ट्स के साथ छोटी प्रणालि...

jboss - Is it good idea to Sun's implementation of JAXP(jaxp-ri-1.4.2.jar) to AIX? -

हम सूर्य से saaj-impl-1.3.2.jar का उपयोग करते हैं। इसकी आवश्यकता है jaxp-ri सूर्य से -1.4.2.जर। क्या यह सूर्य के पुस्तकालयों को वेब अनुप्रयोग में लगाया जा सकता है जो एबीसी पर जेबीस के तहत काम करेगा? अच्छा, यह अच्छा विचार क्यों नहीं होगा? एन्क्रिप्शन के साथ एक समस्या का उल्लेख किया गया है क्योंकि आईबीएम जेडीके सभी एल्गोरिदम को लागू नहीं करता है, लेकिन एक वैकल्पिक हल (एईएस जैसे अन्य एल्गोरिथ्म का उपयोग कर) है। इसके अलावा, क्या आप कुछ विशेष समस्याओं की अपेक्षा कर रहे हैं?

where does "Generate Flow Chart..." Come from under Visual Studio 2008 -

When I right-click the source code of the aspx.cs code under Visual Studio 2008, I saw that " Generate flow chart ... ". It produces very good flow charts under a method. I wonder where it comes from. Is it an underlying or other add-ins? I have many add-ins and are just confused. Thanks in advance. Microsoft Visual Studio Learning Pack 2.0 Visual Studio Learning Pack 2.0 is a software package Is designed by Microsoft to learn about computer programming. More information on this:

java - What is the purpose of using a distinct class for each tab in Wicket? -

The wicket example page for TabbedPanel () uses separate, separate squares for each tab (TabPanel1, TabPanel2 and TabPanel3) is. Is there any reason not to use three instances of the same class? If yes, what is it? I am still quite new to the wicket, but these classes look like me. Edit: I gave a simple example, using all three tabs, all the square tab panels were set to use each separate label, and they displayed properly. EDIT: After using more and reading the answers posted later, I realized that my first example was very easy. Using a class, the tab title may be different but the argument will still be the same. It will not work unless a person does not mention it, it became a "swiss army knife" class, which is a bad design and will still not address the markup file. The wicket is designed to encourage the development of reusable components. See the three different sections as separate components with different behaviors and content, which you want to use in ...

winforms - Invoke after async call changes two controls -

I can not find a solution to this problem, here is a simple example: on a windows form I have 2 text boxes (InvokeText1, InvokeText2) and two buttons (invokeButton1, invokeButton2). Both button clicks are: Private Zero InvokeButton1_Click (Object Sender, EventArgs E) {Form1.GetVersionCompleted + = (Object Sender1, AsyncCompletedEventArgs e1) = & gt; {This.Invoke ((MethodInvoker) (() => {invokeText1.Text = DateTime.Now.ToString ();})); }; Form1.GetVersionAsync (); } Private Zero InvokeButton2_Click (Object Sender, EventArgs e) {Form1.GetVersionCompleted + = (Object Sender1, AsyncCompletedEventArgs e1) = & gt; {This.Invoke ((MethodInvoker) (() => {invokeText2.Text = DateTime.Now.ToString ();})); }; Form1.GetVersionAsync (); } Call both async method: Public stable event EventHandler & lt; AsyncCompletedEventArgs & gt; GetVersionCompleted; Public Static Zero GetVersionAsync () {ThreadPool.QueueUserWorkItem (o = & gt; {{string result = dateTime.Now.ToS...

java - Apache HSSF POI excel doc to tab delimted file -

Gone and found a file that already "works" from here: Note, I need a tab seam format, so I just went and changed to "", "\ t" and then removed a group of additional formatting, such as naming a workbook, the problem is that this code gives me some excel lines 2 + Divides into lines. These are the lines where I have many columns, so many columns are empty, after more data, there is basically a line which is the difference between entries. Everything is still properly aligned, but I do not know how correctly matches the records. It is important that my tabs are delimited files that keep the rows as they were in Excel. Suggestions? Are you sure about splitting up into two things? Not sure that your editor is showing a line in 2 parts because the line is too long? And are you sure that you did not introduce some crappy new misconceptions while "cleaning" the code? Do you try to process with the base version, that is, with a comma? ...

c# - SubSonic 2.2 Class Generation -

I am using SubSonic with several tables on one source which were created by a source code generator. I saw that some classes created by subsonic were generated without code and the message has been sent class ... was not generated ... because the primary key is not Is there a way to get the code without adding the key to all the tables? Thank you Add primary key to the table as an primary key : Increase increment can create int field. This happens with almost every database layer code generator, because without the primary key it can not delete the editing / functionality.

html - Overflow hidden and Flash content in IE 8 -

I am creating a Flash Banner ad appearing on a client's site. When the user reaches the ad, the expansion of the flash movie increases the height and width of the flash object. The problem is that the client is using overflow: is hidden on your site, and my banner ad is contained within a div which is styled with overflow: hidden. When Flash Movie Extends, it is cut. This is only in IE 8, all other browsers (at least IE 7 and FF) do not clip the flash movie. I tried to explicitly try using wmode = window, but nothing seems like IE 8 standards and is doing the right thing, but I need it to work! Any ideas on the way to extend flash content from the device without changing the styles (what will happen if I change the overflow: hidden style on the customer's site). Thank you! To distinguish the style of the banner from the rest of the site, you can use it in an iframe of a 0 pixel range The trick is that the iframe is large enough to accommodate the expanding fla...

Is there a jQuery-like CSS/HTML selector that can be used in C#? -

I'm wondering if there is a CSS selector like jQuery that can be used in C #. Currently, I am parsing some HTML strings using regex and thought it would be a bit like a CSS selector in jQuery to match the elements I want. You will definitely see @Jamitre. See the answer to this question! Provide similar functionality, but projects seem to be abandoned.

dojo file upload using zend framework problem -

I am struggling with some dojo which is necessary to upload a file Now file upload form a dojo dialog box , So long as the user selects the 'upload file' button, it is hidden. This button can be clicked anywhere on the site, so I have to handle a controller upload. I am currently trying to work on it, and I have the following in my head script: & lt; Php $ this- & gt; HeadScript () - & gt; CaptureStart (); ? & Gt; Hide the sendForm () {// file input field dojo.style ('inputfilled', "display", "none"); // show progress bar dojo.style ('progress field', 'display', 'inline'); Dojo.byId ('Preface'). InnerHTML = "Uploading ..."; Dojo.io.iframe.send ({url: "& lt ;? php echo $ this-> base URL () ;? & gt; / fileprocssing / loadfile /", method: "post", handle: "text" , Form: dojo.byId ('StartFrm'), handle: function (data, ioArgs) {var fileData...

How to add a ContextMenu depending on which WPF DataGrid row is right-clicked? -

I need to display various options in a context menu, on which the right-click row of WPF DataGrid has gone. My initial idea was to complete it through handling the binding or mouse click event, but I have not had success with the strategy till now. You can control the context of the data grid menuuping and based on the original source of the root event that your contact menus have been able to adjust. Below is a sample where I show the context menu if the reference of the data is the source list of the source source otherwise I do not show context menu by handling the event. Private sub inventoryDragrid tagging menuUninstalling (_Wired as the Word sender object, in the form of a Word e system.windows.contactcontent.menuvent.org) handles_inventureDataGrid. Contains menu Opening diamond contact = DirectCast (E.Orizal Source, System.info Framework Element). Data Context If the reference to typeoff is an inventory, Inventory Data Grid. Context Menu = Inventory Data Grid....

sql - eliminating unnecessary database hits in django -

I want to minimize the actual database hit while working in the deogeity, so I decided to skip this problem for this artificial example is constructed. The model looks like this: class car (models.Model): name = models.CharField (max_length = 10) user = models.ForeignKey (user) In my opinion, I want to do something like this: def cartest (requests): cars = car._default_manager.filter (user__username__exact = 'michael') [: 5] first_car_name = cars [0] .name another_car = car [1] Httppacement (lane (connection.unces)) back Then I want to select 5 entries from the database, do something already, then Do something with the other (remember this is an artificial Example). Ah, understood this ... it achieves the desired effect Instead of being duplicated (or on the calling list (queries), the query was subscribing to the client. Once only hits the database: def cartest (requested): cars = list (Car) ._default_manager.filter (user__username__exact = 'michae...

How do I fully-justify latex code on EMACS -

I want to justify the latex code on EMACs so that my latex code looks better, for example, remember me That my advisors send me latex in a completely proper way: in ~ \ cite {Hummel2004}, the authors have an approach to harvesting software components from the Web Have described. The basic idea is to use the web as a built-in repository, and use standard search engines such as Google as a means of detecting suitable software assets. Other researchers have crawled through the internet in the publicly available CVS repository to create their own source code search engines (e.g., Sparse-Jay) ~ \ cite {Matsushita2005}. I think its column width is set to 70 columns, can someone give me an indication? standard fill.el package includes command justify- Current-line is a part of what you need. With the help of the function: Make any kind of assessment on this line is usually a complete justification: it adds spaces to the line to finish on the column given by 'current-f...

Paging and routing in ASP.Net MVC -

I am following the following and when I was helpful I raised some issues which I do not understand. Martian says: Internally, using the pathTab.Rout.GetVidualPath () to use pager, URL's so much that routing the page URL Can be configured via '/ paging / viewbc category? Instead of 'name = shoes and page = 1', the good looking URL can be prepared for '/ categories / shoes / page / 1'. This is what he is talking about: Private string GeneratePageLink (string link text, int page number) {var pageLinkValueDictionary = New Root Voltage (this.linkWithoutPageValuesDictionary); PageLinkValueDictionary.Add ("Page", page number); // var virtual pathadata = this.viewContext.RouteData.Route.GetVirtualPath (this.viewContext, pageLinkValueDictionary); Var Virtual Pathadata = RootTable.Rout GetVirtualPath (this.viewContext.RequestContext, pageLinkValueDictionary); If (virtualPathData! = Null) {string linkFormat = "& lt; a href = \" {0} \ ...

java - Converting an input word number (like seven) into a character (like @) -

Thus if the user types down seven with the scanner, then @@@@@@ (7) will output . I have to use for a Loop statement but I can at least understand that figure Need help in finding a way to convert word numbers into numerical numbers and finally convert them to a random character. The first thing you need to do is a valid number string in the number "ten", " Twenty-five "etc., then passes that number into the loop. So, you need to write a token parser to basically convert the word to a number. By defining the tokens, you can easily convert an int. (I'm only dealing with the insights in this example). Clear token: One, two, three, etc. (1 to nineteen). (Call this number). Twenty, thirty, forty, etc. (twenty to ninety). (Call this tens) hundred, thousand, etc. (call this power) "", "and" and "-" the form of delimiter (Normal method in one hundred and six or twenty-five) Then you can parse your string in tokens, and ...

iphone - UITableViewCell superscripts & subscripts -

Is it possible to display a subtitle or superscript text in a UTable electricity table without creating a custom cell? If you only need numbers, for Unicode characters 2070..2079 for superScript and for subscript Use 2080..2089. If you need more then I suggest using a UIWebView. With HTML tags & lt; Sup> And & lt; Sub & gt; You can format your text and add style with bold, italic, underline ... Good luck!

c# - Multiple Saves in NHibernate (2.1) -

How can the collection of objects in NHibernate? I'm a migration from Subsonic (I do not like the SubSonic version 3 and SubSonic 2 is dead ...) and it was used for a simple operation ... One of the mapping of the collection The way (without association) to complete this task? My actual code is: use of (Asynchronous session = NHibernateHelper.GetCurrentSession ()) {{ITRansaction transaction = session Start transaction ()) {foreach (in player Diverse player) {session. Save (player); Transaction.Commit (); thank you in advanced! You need it Transaction outside your loop Target of a transaction is essentially In 1 call, databases have to batch multiple operations. Here is the edited version: Use of (session session = NHibernateHelper.GetCurrentSession ()) {{Transfer transactions = session.BeginTransaction ()) {foreach (different players in players) {session.Save (Player); } Transactions. Communication (); }}

javascript - Prototype Selection Help -

Hey guys, I'm trying to make a little extra for any web app using. Right now I am trying to check all the checkboxes on the page, in which the class .checkbox ( is required to select / select the case ). Checkboxes are the descendants of the class .someClass , it's just that there are many divs that are classes. & lt ;! - Check this box - & gt; & Lt; Div class = "some class" & gt; [...] & lt; Input type = "checkbox" class = "check box" /> gt; & Lt; / Div & gt; & Lt ;! - But this one is not - & gt; & Lt; Div class = "some class other class lolvat" & gt; [...] & lt; Input type = "checkbox" class = "check box" /> gt; & Lt; / Div & gt; Remember, checkboxes are not direct children, but lineage Thank you, I appreciate any help. Here you can Can go: & lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Transcriptional // EN...

ruby - why can't i wrap <span> around the rfollowing nokogiri xpath? -

डॉक्टर = नोकोगीरी :: HTML (खुले (url))। Xpath ("// *") .xpath ("/ * [Br] / पाठ () [स्ट्रिंग-लम्बाई (सामान्य-स्थान ())! = 0]"। Wrap ("& lt; span & gt; & lt; / span & gt;") डॉक्टर कहते हैं यह अभी पाठ लौटाता है ... मैं अब पूर्ण एचटीएमएल स्रोत की उम्मीद कर रहा था जो अब निर्दिष्ट एक्सपेथ तत्वों के चारों ओर लपेटता है। कोशिश करें doc = Nokogiri :: HTML (खुला (url))। Xpath (" // * ") .xpath (" // * [ Br] और पाठ () [स्ट्रिंग-लम्बाई (सामान्य-स्थान ())! = 0]] ")। लपेटें (" & lt; span & gt; & lt; / span & gt; ") डॉक आपका XPath क्या करता है, वह गैर रिक्त पाठ नोड्स को फैलता है उनकी परिभाषा के अनुसार कोई भी मार्कअप नहीं होता है इसके विपरीत, मेरे XPath में कम से कम एक & lt; br & gt; और कम से कम एक गैर-खाली पाठ नोड वाले कोई भी नोड प्राप्त होता है।

Sanitize input XSS and HTML input in rails -

I know that in my thoughts to clear the output to the ActionView helper strip_tags method Can I use, but is the best way to safeguard user input before I continue it in my DB? Can I find a way to add visual assistant to my controller and reuse the method of strip_tag? I thought that something like this would be available to the world on the railways to do something like this. What about the plugin?

.net - DataTable.AsEnumerable().Distinct() doesn't work because of primary key column -

I want to remove the duplicate from my DataTable , so I DataTable.AsEnumerable ( ) .Distinct (DataRowComparer.Default) But what I do not think it is necessary for me is because this is the unique primary key column in each duplicate line. What can I do according to my requirement? Write your own DataRowComparer ? I do not want to - because the default should work. You can use from project basically to launch those data from a data line into those columns For example, which you are interested in, and it will use it for example: var rows = datatable.assenameremable (). Undoubtedly (line = & gt; new {name = line ["name"], age = line ["age"]}); When you say "the default should work", if it is not originally, if you have a normal primary key column with two different primary key values, not two rows are duplicates of each other, because they are different in that data. Another option would be to project data rows without the prima...

sqlite - Can I get the table names from an SQL query with Perl's DBI? -

I'm writing short snippets in Perl and DBI (SQL Yay!) I log in Want to put some specific questions in the name of the same filename after the name of the table name (s)? Here is the code that I use to dump results into a text file: sub dump reflections file {my ($ query) = @_; # Query prepare and execute my $ sth = $ dbh- & gt; Ready ($ query); $ Sth- & gt; Executed (); # Open the output file Open the file, "& gt; results.txt" or die "Result output file can not be opened: $!"; #Formatted results file $ sth- & gt; Dump into dump_reets (80, "\ n", ",", \ * FILE); # Close the output file FILE or die "Error result result file: $! \ N"; } Here's how I can call it: dumpResultsToFile (& lt; & lt; "END_SQL"); What I want effectively, instead of content that goes to "results.txt" (which is hard over), it should now go "TADTPTP". If these tables have been added be...

prototypejs - Jquery + Prototype in noConflict() mode, Array.prototype.indexOf broken -

I'm trying this jquery plugin This works fine but with prototype + Jquery noConflict mode breaks other scripts in this function array.protipip.indexoff = function (for obje, start) {var i = (start || 0); i & Lt; this.length; i ++) {if (this [i] == obg] {come back; }}}; Any help? see Array already has a native index. Changing in a manner that does not produce similar results, things will break things, even trying to change an original method can also cause problems for such methods. If you really want that function, rename it to myIndexOf or to avoid conflict.

tfs2008 - Why is the SqlCmd MSBuild Task throwing an error when run with TFS team build? -

I asked about this, but I thought I would try some more eye on it, if anyone else Be a similar experience: I have a very simple task, which should execute a series of SQL script files in a folder. (This work is in the file called Operational DB.MMSBield) The job looks like this: & lt; MSBuild.ExtensionPack.SqlServer.SqlCmd Function = "Execute" server = "$ (SqlServerName)" database = "$ (SqlCatalogName)" InputFiles = "@ (Operational static data files)" /> This fails while running as part of the TFS 2008 Team Build. Log error says: C: \ b \ 56 \ s \ main \ build s \ OperationalDB.msbuild: Warning: exit code 1. Failure: Sqlcmd: Error: Internal Error on ReadTextLine (Reason: unspecified error ). Worse, (from a debugging perspective), if I log in to my build server with the same account that is running the Team Build service, and OperationalDB.msbuild from the Command Line via MSBuild Runs from, it works beautifully, no error, e...

events - How do I know when a file has been modified in a VBA Macro? -

Is there a way to view the file in VBA (which is essentially VB6), so that I know the file When has it been modified? - Only when I do not want to know about its modified , a file is unused . I have recommended using the "FileSystemWorld" and the Win32 API "FindFirstChangeNotification". I can not understand how to use them, however, any thoughts? OK, I work together to find out which file system changes in VBA (VB6) Enabled. The public objWMIService, colmonitoredEvents, objEventObject 'every 1 second call for changes' sub clock (error) timed out on GoTo if objWMIService is nothing then once again initWatch 'Once init' right Set the objEventObject = colmonitoredEvents.NextEvent (1) '1 msec timeout if no events' messagebox' event found "Select episode objEventObject.Path_.Class case" __InstanceCreationEvent "MsgBox" A new file was just created: "& Amp; _ ObjEventObject.TargetInstance.PartComponent c...

javascript - A confusing problem with IE7 and styles being applied -

For my life, I do not understand why some styles are not being implemented in a noodle list is. If you look at this site: In Firefox, you will see that the circles are below the text below, which click to move to different panels content can be done. Now, when you go to the same site in IE7, no styles are being applied to the stylesheet (well, not least for me). I know a fair bit about selector support, but I if a code is opened and follows the code, then it is happening Creates an anonymous list below the panel and text of jQuery count. / Li> CSS style to see this list (see Firefox for desired layout). This is probably something simple, but it is very sad to me. Thank you Firefox likes to close your unstoppable tags for you. IE takes a bad rap several times.

installer - ruby 1.9 ri on Windows knows nothing about any classes -

I am using Windows XP SP2, and am installing Ruby via Ruby 1.9 one click installer. Then when I try to use Ri, I get the following response, can someone help me with my problem? C: \ Documents and Settings \ AWAY & gt; Ruby - Version Ruby 1.9.1p243 (2009-07-16 Amendment 24175) [i386-mingw32] C: \ Documents and Settings \ Eight & gt; Re-version version 2.2.2 C: \ Documents and Settings \ Ining> Re-string class updating the cache with 0 classes ... Nothing is known about string c: \ Documents and Settings \ Re reading with class cache 0 classes. No data was found if you have installed Ruby yourself, then you need to create documents using the document: Install-dock from the same place that you have been able to make Ruby to make `` If you install Ruby with packaging system, you may need to install an additional package, or ask the packager to enable the re-generation. C: \ Documents and Settings \ Eight & gt; By the way, when I try to use gem, I also get the foll...

c# - Use Variable of a function in another function without parameters? -

I want to insert more dynamically with my database function. Like it: Private Zero Set Value () {string test = "foo"; String test2 = "bar"; } Private Zero WriteToDB () {DC dcOfMyDatabase = new DC (); DBTable myTable = DbTable () {field1 = test; // Other function field2 = test2; // other function values}} private zero () {setValues ​​(); WriteToDB (); } Of course I can do it with parameters in WriteToDB () ... but I have so many fields and hope it works in a cleaner way. Im Thanks and best wishes. You can promote them in class members or properties: string test; Private Zero Set Value () {test = "foo"; } or: string test {get; Setting;} You should read about object-oriented design and programming - it will help you organize your code more logically.

sql - Naming Database Tables and Views -

I recently asked a colleague why he had included _TABLE at the end of all his database table names, he said It has been a standard on another traffic for which he worked. Other colleagues used V_ at the beginning of ideas. Is this a good practice? Integration best approach Adding an _TABLE or _VIEW at the end of the object name is overkill in my book, but If the database is designed in such a way, then I will not break the conference. Your naming convention for your colleague is a bad practice in a new one without checking the 'local' standards from the previous organization.

javascript - When get the swf address, how to show the flash with the flashplayer again? -

I used Mac's coco to develop a plugin with Safari, I have used this method: Plugin The MIM type has changed the application / X-Shockwave-Flash and Extensions are SWF, so when Safari is targeted, it will add to my plugin, but now there is a problem: when Safari is showing the page, SWF embeds Does not look because I do not know how to show the SDF with the ADB Flash Player again and after the SWF files after the Safari page, how to implement SWF mode with Flashplayer? Thanks a lot! This SDF is not embedded, because I do not show the SWF again with Adobe Flash Player Find out the method. There is no way to do this except for application / futuresplash (no one uses the type), then the element is application Switch to / x-shockwave-flash so that the flash player can handle it. This is the same click to tolash, which means that there is no way for you. Correct your plug-ins with ClickToFlash. In fact, it seems that you do the same thing as clickToolFlash Trying to do ...

javascript - Accessing the <img> tag data -

I want to access the tag data so that I can use the JavaScript image processing to manipulate the server Can send to This is the & lt; Canvas & gt; can be done with: For canvas support in IE: / P> Create a canvas: var canvas = document.createElement ('canvas'); Canvas.setAttribute ('width', 150); canvas.SetAuthorBetter ('height', 150); Get 2D references: var context = canvas.getContext ('2d'); Copy the image to the canvas: context.drawImage (document.getElementById ('your_image_id'), 0,0); Modify you as you want: Get the data URL with: canvas.toDataURL () That's it. Also, see here:

c++ - Changing RGB values -

I am trying to replace one part of an image with another image, so I can not find the merge function , So I just if " change to Change , you can use the directly . A rectangular area of ​​your original image can be viewed by another image A rectangle with very efficiently Change from the field. Let's assume that your original image is A and you make a part of it (a rectangular area) with an image of B Update: Here the code is / **** C **** / // image Get A and B (for example, I'm reading from the disk) IplImage * A = cvL oadImage ("image_A.jpg"); IplImage * B = cVLoadImage ("image_B.jpg"); // Set the interest of the area (ROI) to / as the RO of A and B. Saitiaimjiaraiai (A, Siviarakt (200,200,128,128)) will be handled; CvSetImageROI (b, cvRect (0,0,128,128)); // Copy ROI to RO in a CVCCP (B, A) BO; // Reset ROI (now full picture will be handled) cvResetImageROI (A); CvResetImageROI (b); // Display a cvNamedWindow (...

c# - Reuse imagemagick process instance in asp.net app -

Well, making thumbnail images in the asp.net app makes me more painful. I had used the system before. Dragging stuff but then I'm not satisfied with the amount of code to write for a few simple resizing on a fixed canvas, then I've read about the warning of controversial discussion by Microsoft. System Asp.net did not work in web context and ultimately performance of bitmap operations was bad. That's why I switched to Imagemagick (IM) to generate thumbnails. It actually works very well because I have experience working with IM in IP and creating a new system it happens. Diagnostics The process is a simple operation. However, when I need to generate several thumbs in a request (30 or more), the CPU goes through the roof (100%) and until the last thumb is drawn Lives there. Of course the images are cached after being written once, but still - it worries me because there are other applications on the server, which should always be hung to remain without any pending t...

objective c - Is it possible to save the state of a timer in the User Defaults? -

I have a label on which I am showing the countdown timer Now if I have my app If I close, the timer will be shut down and the label will be the text too. I know that we can save the label's text value. But when the app starts again, we show the correct countdown. Suppose I'm close. After 3 minutes when the app is launched the label should be shown. 00:02:35 And the timer should be for the remaining countdown Yes, just store that time On which your app closes and the time left in the NSUserDefaults to calculate when the app starts again, you get the time when it was closed NSUserDefaults and time remaining. Using the present time is the simple math to calculate the right time on your math. Something like this can happen, definitely not ignored: // save state NSUserDefaults * userDefaults = [NSUserDefaults standard user default]; NSDT * now = [NSDT date]; Double count = 45.0; In // seconds, get it from your counter [userDefaults set object: for now that: @ ...

Facebook Fan Box on Fan Page -

Is there a way to add a fan box widget to the application tab on a Fax fan page? Of course, I just did it! Here's the recipe: Add an FB iframe to your app page by setting up src for a URL on the domain that is running on your app. Your URL should look at the xfbml page (read this page carefully). In this page, insert inside the body: "name =" "stream =" 0 "connection =" 0 "width =" 250 "height =" 120 "> And wola! It works for me. Now, I have to figure out how to find out when the user clicks on the button.

inversion of control - Manage autofac container setup -

One of our team members has decided to use autofac on one of our services and we will try it Because we get stuck with it. Now the time has passed and the container setup method has increased! It is so big that we have problems with it We have not seen the results of splitting it. Maybe we're using it incorrectly So my question is: How can we manage the container setup? Can we dump into XML or are there any other best practices? There are several ways to manage container setup with AutoFac The most common By using a module in the manner and registering it with the builder, you can break down many groups of registrations in this way: Public class dalmud: Module {Secure Override Zero Load (Containerbuilder Builder) {Builder. Registrar & lt; SomeDataSomething & gt; (). & Lt; IDataSomething & gt; ); Builder. Registration and lieutenant; Some other sishing (c = & some; OtherOtherSomething.Create ()); // and so on}} Then register these breakdo...

html - Why does Amazon put their CSS in the Head tag? -

OK, what does Amazon do? They have & lt; Head & gt; Put all your CSS definitions into the tag? Itemprop = "text"> It is not very difficult to coded It's probably more dynamic than you think. I do not know what set up Amazon is, but I'm guessing they are using any type of templateing language to dynamically add those styles.

How to force user to not click until javascript has loaded (lightbox) -

I have a large JS lightbox gallery and in a hurry, users can click thumb before loading on the page, The result of opening the actual image without this "cool" JS popup effect. Do users have good ways to "force" the user to finish loading before clicking? Thank you very much The best way to get it is transparent or slightly brown Filling the color box will fit the entire page with a very high-order value so it sits above all other elements. The move with this is that you want to put it in the original HTML so that it is any other processing and the user has a chance to react. After that, just remove it by JS, once all other loading pages have been done.

comparison - Differences between Silverlight 2.0 and 3.0 -

I am migrating a graphics intensive silverlight application from 2.0 to 3.0 and at the same time evaluate whether Silverlight What are the new features that can be highlighted? Will you give the most important new suggestions in Silverlight 3.0? I went to the person who has suggested the most important new features in the following 3.0: New controls New audio and video decoding ( element-to-element binding limited file system access installation for offline use / li> Are there other changes / new features as an application developer? A lot of new features here good , Is a fairly comprehensive summary:

vb.net - Informing the user that a DataGridView is being populated -

I am writing a program in VB.Net to send a text message through an API. This allows you to view messages in the Detroit Wiver, and filter by date, sent / inappropriate etc ... I am performing a SQL statement to load the messages and revert the datatale Which is then set in the form of datasource for my datagrid view control. The problem is that many records may be selected based on the filter selected by the user and it will take some time to update the data source. I want to inform the user about this load time by providing some kind of progress bar or label. I used the progress bar while looping during data but it is loading all at one go. I thought about displaying a label when the user clicks to load the data and then hides it when the data is loaded. But this happens instantly even when the data is still loading. Is there an incident on the DataGrid view that I might use? as some. DatasourceLoadStart and .DataSourceLoadFinished I know that I am just making those even...

c# - Problem with Rhino-Etl and MySQL -

I have been using Rhino-ETL for a while and it is running very smooth although I have a mysql db There is a problem connecting. Rhino.etl.ro.Rinotlix: Hornalen.Migration failed to execute operation. Processing ReadMessagesFromDb: Type name 'MySql.Data.MySqlClient' could not be found for connection string: testConnectionString --- & gt; System.InvalidOperationE xception: The type name 'MySql.Data.MySqlClient' could not be found on the string for connectivity: testConnectionString at Rhino.Etl.Core.Infrastructure.Use.Connect (string name) in rhino.et.l.core.example. NAFACUIT in Rhino.Atl.Core & gt; DD 0. MeVixt () Rhino.ETL.Core.Airam. Cores. SingerViventRevisioning Animator.mainext () Rhino.Etl.Core.Enumerables.EventRaisingEnumerator.MoveNext () in Rhino.et.l.core.pipeline. ThreadPullPlineIn the XQ & Lt; & Gt; C__DisplayClass1. & Lt; De corateEnumerableForExecution & gt; B__0 (object) --- The end of the internal exception stack trace --- ...

libtool vs ar for creating a static library (xcode linker) -

By creating a static library on Mac 10.5, generate xcode libtool and a libMainProject.a file via AR through the command line When a xcode is trying to use one of the libtool generated by the link in the application, then I end up with multiple messages like "referenced from" Vtable for Project 1: _ZTV27project1 $ non _lazy _ ptr libMainProject.a (project1 .o) " The use of AR is completely accurate and correct By the way is the link. I tried to add libtool to the -c option during the link, but it does not seem to have any effect. So I think I have 2 options 1) Creating a distinction between the symbols between the virtual and the Libtool version and see Liboot to generate similar information. 2) Make Any ideas or suggestions will be appreciated. In advance thanks I have the constant code ar I suggest unforced with. You *. O will end with the files. Then *. What's inside the files and gobjdump (you may have to install yourself from MacPorts...

Escaping a block of text in MikTeX? -

I am trying to insert a block of code in MikTex that contains several reserved characters. Can I avoid the entire block of code so that the conversion engine does not try to evaluate it? I think this will work only if the code has a balanced bracket. Is there any way that I can convert blocks of text so that all the individual reserved characters will be saved? Unfortunately, when I have a Windows environment, my options have to be a bit limited, but if you can know in some way, I would appreciate it very much. Block it any listlisting ?

Validating XML with multiple XSD using relative paths in .NET -

मैं एक XSD के विरुद्ध XML दस्तावेज़ को मान्य करने के लिए एक सामान्य VB.NET (VS2005) फ़ंक्शन लिखने की कोशिश कर रहा हूं। जब तक मैं किसी रिश्तेदार पथ के साथ XSD का उपयोग नहीं करता तब तक यह ठीक काम करता है जैसे: & lt; xs: include schemaLocation = "test.02.xsd" / & gt; यह किसी भी माध्यमिक दस्तावेज़ों में शामिल है जो कभी नहीं लग सकता है। यहां मेरा मूल कार्य नीचे दिया गया है मैं XmlUrlResolver () के साथ खेल रहा हूं लेकिन मुझे लगता है कि इसका उपयोग करते हुए कोई भी प्रगति नहीं कर पा रहा है। कोई भी मदद यहां बहुत सराहना की जाएगी। निजी उप सत्यापन प्रक्रिया (स्ट्रिंग के रूप में, XV के रूप में स्ट्रिंग के रूप में, IX XMLPath स्ट्रिंग के लिए) मुझे कोशिश करो। रीडर = नया एक्सएमएलटेक्स्टरेडर (XMLPath) डीएम एसआर नई स्ट्रीम रीडर (एक्सएसडीएपी) नई XmlSchema के रूप में मंद स्कीमा () स्कीमा = XmlSchema.Read (SR, नया सत्यापनएवेंटहैंडलर (AddressOf ReaderSettings_ValidationEventHandler)) डायम रीडर सेटिंग्स नई XmlReaderSettings () के रूप में रीडर सेटिंग्स। ValidationType = Validatio...

linux - Running a command in shell script -

मेरे पास एक शेल स्क्रिप्ट फाइल है (run.sh) जिसमें निम्न है: #! / Bin / bash% JAVA_HOME% / bin / java -jar umar.jar जब मैं इसे चलाने की कोशिश करता हूँ (./run.sh), यह मुझे निम्नलिखित देता है: umar / bin / run.sh: रेखा 1: fg: no जॉब कंट्रोल हालांकि अगर मैं शेल पर सीधे ही कमांड चलाता हूं, तो यह पूरी तरह से काम करता है। क्या है स्क्रिप्ट फ़ाइल में गलत है? धन्यवाद % foo% नहीं है कि आप कैसे एक बॉर्न / बाश खोल स्क्रिप्ट में कमांड प्रतिस्थापन करें मुझे लगता है कि आप इसे एक Windows कमांड लाइन से चला रहे हैं, यही कारण है कि जब आप इसे सीधे चलाते हैं तो यह काम करता है। उचित बोर्न सिंटैक्स का प्रयोग करके देखें: $ {java_home} / bin / java -jar umar.jar

seo - Web Crawler Application -

Can any website crawler recommend that can show all the links in my site? Xenu is the best link checker tool I found. I will check all the links and then you can see them or Will give them the option of exporting them. It's free, you can download it from your site.

ruby - Cucumber/Webrat: follow link by CSS class? -

Is it possible to follow the link in the name of its class instead of ID, text or title? Given to me (Haha, Cucumber Insider?) Is the following HTML code: I do not want to match the text because I have to care about translation values ​​in my tests I have to see my buttons all the same style , Then I will use the CSS class. I do not want to specify an ID for every single link, because some of them are fully identified through the container and the link class Has anything remembered in the cucumber / Vibrat? Or do you have some advice to solve it better? Thank you for your help and best regards, who edit: Getting an interesting discussion - is an open issue for now. Do you have any other ideas for this? How did I do with cucumber here, hope it helps. What is the help of understanding #css in step definition? ID ("[^ \"] "] *)" $ / Do | text, selector | must be viewed within a div ([^ \ "] *). # # {{Selector} "to c...

html - List item bullets disappearing in IE6 and IE7 -

I received the & lt; Ul & gt; and & lt; Created a list of items using li & gt; . It works fine in Firefox but in Internet Explorer 6 and 7 I can not see the list bullet. Here's what I did: I have a global ul, li reset value. After that I got two & lt; Ul & gt; The two column lists are created using the block ul li in the CSS to list the genre as disk by any overwriting value I am here. When I do this I can see the bulleted list item, but when I set the width of ul to some specific value then li bullet disappears in IE goes. Even if I use the list style as list-style-image: url (bullet.gif) , that too in IE 6 and 7 does not appear. HTML code here. Please take a look at this and tell me how I can store the bulleted list in all browsers. & lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Transcription / / n" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html xmlns = "http:/...

linux - Use sed to delete all leading/following blank spaces in a text file -

फ़ाइल 1: हैलो दुनिया कैसे > sed -e 's / ^ [\ t] * //' a & gt; बी प्रमुख स्थानों के लिए। sed 's / * $ //' b & gt; C और यह पीछे के स्थान के लिए है। आप लगभग मिल गए इसे: sed -e 's / ^ [\ t] * //; s / [\ t] * $ //' ए & gt; इसके अलावा sed के कुछ स्वादों पर, इनलाइन संपादन के लिए एक विकल्प भी है: sed -i -e 'S / ^ [\ t] * //; s / [\ t] * $ //' a

c# - Generic method with unspecified type possible? -

I need a solution to load a list of objects - lookup where only one property is referenced from the existing object . class LookupObjectAddress {[...] public string city {get; Set; } [...]} class working object {// lookup object ederation refers to property from public string {city} {get; Set; }} For the lookup, I need a list to be loaded from the database, to know what attribute I use, to load it class working object {// lookup object eder [lookup (type = typeoff (lookup object attender), staticloaderclass = "lookup obz loader", staticloader method = "lookup oblige pagepad") refers to property String City To obtain; Set; }} After reading PropertyInfo for WorkObject.City property, I know the type of lookup object, and from which class it has the method to load it. A bridge is required to get a list to work with. type loaderClass = Type.GetType (classname); MethodInfo Loader Method = Loader Class.GetMath (LoadMap); Object objList = loaderMethod.Inv...

Visual Studio 2010 beta 2 fonts & colors dialog -

Image
क्या पूर्वावलोकन बॉक्स में अक्षर कुछ भी मतलब है? मेरे दिमाग को बिगाड़ दिया है और संभवत: शायद याद किया जाता है, या मैं थोड़ा सा मूर्ख हूँ और इसके कुछ मुझे पहले से ही पता होना चाहिए! ये अक्षर हैं जो अक्सर भ्रमित होते हैं। उदाहरण के लिए, कुछ टाइपफ़ेस I में l या 1 के समान दिखता है। यह बी और 8 , 0 , और ओ के लिए है। यह संवाद आपको यह देखने की अनुमति देता है कि ये ग्लिफ़ कैसे "अलग" हैं। विभिन्न निश्चित चौड़ाई वाले फ़ॉन्ट्स की व्यापक तुलना के लिए जेफ अटवुड द्वारा देखें मूल रूप से एक ही है, लेकिन यह पूर्व-विस्टा युग से है।

javascript - jQuery script doesn't work in safari when button is disabled -

I've written to prevent this form from accumulating more than once. jQuery.fn.preventDoubleSubmit = function () {this.find (": submit"). Each (function () {$ (this) .click (function () {this.originalValue = this.value; this.disabled = true; this.beenClicked = true;});}); // [...] back submit this (function () (if (this.been submit) {return false;} and {this.beenSubmitted = true;}});}; // [...] Unfortunately, this does not work with Safari when I click on the form, the button is disabled and does not submit the safari form. Someone Also consider? You know that there is no need to click the button for the form, okay I think that you get a new perspective about this To prevent accounting double submissions, simply: $ (". Selector"). Submit (window.mySubmitHandler); function mySubmitHandler (evt) {$ (" # SubmitButton ") atr (" disabled ", true); // if you want, give other stuff here // refine the function in the window in the ...

.net - How to convert Video to byte Array in C# ( c sharp )? -

I am using c # .com compact framework 3.5 and I want to convert a video file to byte array So that I can upload it to the server In the same way, I am uploading an image which is achieving success results .... HttpWebRequest request; Request.ContentType = "Image / JPEG"; Request.ContentLength = byteArray.Length; request. Method = "put"; ImageToByteArray (img) .CopyTo (Bytere, 0); (Stream request stream = request. Gaterequesteststream ()) using {requestStream.Write (Bytes, 0, (Int. Fs.Length); RequestStream.Flush (); RequestStream.Close (); } Byte [] imageToByteArray (image image) {MemoryStream ms = New MemoryStream (); ImageInSave (MS, System.Drawing.Imaging.ImageFormat.Jpeg); Return to MS. ToArray (); } How did someone do this for video files? You should stream the entire file in one array instead of one block at one time. Otherwise, you will potentially use large amounts of memory because video files can be quite large. For example: HttpWebRe...

jquery - Remove visability on <li> tags except (this) on hover in a menu -

According to the topic, I can call each & lt; Li & gt; It should be very easy for me, but I can not understand it. This is my markup: And here jQuery (which does not work): $ (document) .ready (function () {$ ("li"). Hover (function () ($ ("li a") No. (this). CSS ("Visibility", "hidden");});}); Something's wrong ... Thanks! Your .not (this) will not work because this is a li element but you are selecting an element. You can do it like this (added code to monitor hover): $ (document) .ready (function () css ("visibility "," Hidden ");}, function () ($ (" li "). Hover (function () {$ (" li a "). ($ ('A', this) {$ (" li a "CSS" ("Visibility", "Visible");});}); In addition, you have a typo in your HTML - a ; should be .

java - Different approaches to dynamic typing in the CLR and JVM -

.NET 4.0 गतिशील टाइप ऑब्जेक्ट पर invocations भेजने के लिए नया समर्थन प्रस्तुत करता है। जहाँ तक मैं बाहर कर सकता हूं, इसमें शामिल है: सीएलआर में कोई बदलाव नहीं बीसीएल में नए प्रकार नए कंपाइलर जो कि नया कन्वर्ट करते हैं नए प्रकार के उपयोग में सिंटैक्स जावा स्पेस में लोग इस बात पर चर्चा कर रहे हैं कि मध्यस्थ भाषा के अमूर्त के पीछे जेएटी द्वारा प्रेषण संभाला जाता है। जावा दृष्टिकोण से समर्थन है। ये दो मौलिक अलग दृष्टिकोण की तरह लग रहे हैं प्रत्येक के गुण क्या हैं, और दोनों शिविर ने अलग-अलग रास्तों का चयन क्यों किया? मैं विशेष रूप से दोनों समाधानों के लचीलेपन और रनटाइम प्रदर्शन में दिलचस्पी रहा हूँ दोनों वीएम अंततः एक ही बात हासिल करने की कोशिश कर रहे हैं? प्रबंधित करने के लिए मध्यवर्ती भाषा निर्देश सेट बहुत महत्वपूर्ण है सिस्टम, क्योंकि यह इंस्टॉल किए गए रनटाइम के साथ नए एप्स असंगत बना सकता है उदा। जेनरिक की शुरुआत करते समय सूर्य को बदलने से बचा जाता है, इसलिए जावा में जेनेरिक का कार्यान्वयन अर्ध-पका हुआ है उसी समय एमएस ने जेनेटिक्स के लिए नए निर्देश पेश किए। सैद...

What features should Java 7 onwards have to encourage switching from C#? -

C # There is a good speed at this time. What features do you have to switch (or return) Java? This will also be useful if people are able to add existing Java versions, such as custom The sections are wrapping around, to make it more interesting wiki. A .net / C # developer here is missing features that are disturbing me in no particular order This is not a list - as soon as ideas get noticed: The Java Library is very small For normal things, I have to choose between 5 competing open source products because there are many types of deficiencies in the base library. is. Is this an object-oriented programming language? Why not the primitive types arising out of "objects" in heck? Symbols Closer Partial Classes and One Low Partial Methods Real for Generics Support Using and Setting Out Answers - It was a real WTF for me You really have to close the connections in the effort / catching block explicitly poor Java friends! Good Unusual Integer -...

java - what is the right way to use log4j within jsp pages -

I mean, I want to mirror the logger name to the source.jsp file, no matter if it's any other File is included or a class or whatever is compiled. What's wrong with this: logger logger = logger Tag ("source.jsp"); You can predeve it with a better non-ambiguous prefix, of course. Indeed, with some lines, some code is better than JSPS.source.jsp because you can set up logging rules for JSPS logger, which will be later on all sub-loggers Will be applicable After saying this, why do you need to log in directly with JSP?

encryption - iPhone: How to create a SecKeyRef from a public key file (PEM) -

To send and receive encrypted messages from the iPhone, please file a public key (public key of the server) and a second Make Carefiff (I could later put it on a keychain to make it again). This is my current workflow: On the server: Create a P12 file with the user's certificate and private key Store the user's public key on the server's keychain. On the iPhone: Recover the P12 file from the server, open the password and store the private key on the keychain. On iPhone: Recover a PEM file with the server's public key from the server Create a SecureFrance and place it on a bunch of keys On iPhones: Encrypted messages from / from the server Use both keys to send / receive. Live with happiness ever. I'm having problems with 3 because I can not make the sec file with the PEM file data. I can not find any documentation on how to do this, would anyone have the same problem was? Any sign? As I do not find any code examples or documentation on it, it see...

memcached - memcache and wildcards -

I'm thinking that there is a way to clear memcache to use wildcards for key values. Say that I have a cache with the key "1234 ~ fu" and the second "1234 ~ foo ~ bar". Is there any way that I have clarified both ("1234 *") and above it? I hope that makes sense. Thank you. No, there is no easy way to do this. This address, and provides a type of solution: Removal by Nameshorn While Memcached does not support the removal or removal of wildcard of any type by namespace ( Since there are no namespaces) there are some tips that can be used to emulate them require additional trips on the memcached server. Example, to use a named location called PHP: $ ns_key = $ memcache-> Get ("foo_namespace_key"); // If not set, start it ($ ns_key === incorrect) {$ ns_key = rand (1, 10000); $ Memcache- & gt; Set ("foo_namespace_key", $ ns_key); } // Cleverly use ns_key $ my_key = "foo_". $ Ns_key "_ 12345...

performance - Looking for a multidimensional optimization algorithm -

समस्या का विवरण भिन्न श्रेणियां हैं जिसमें तत्वों की एक मनमाना राशि होती है। तीन भिन्न विशेषताओं ए, बी और सी हैं। प्रत्येक तत्व के पास एक अन्य इन विशेषताओं का वितरण यह वितरण एक सकारात्मक पूर्णांक मान के माध्यम से व्यक्त किया जाता है। उदाहरण के लिए, तत्व 1 में गुण हैं ए: 42 बी: 1337 सी: 18 । इन विशेषताओं का योग तत्वों के अनुरूप नहीं है अब समस्या: हम प्रत्येक श्रेणी से बिल्कुल एक तत्व चुनना चाहते हैं ताकि हम ए और बी पर एक निश्चित सीमा तक हिट (यह खत्म हो जाना भी संभव है, लेकिन आवश्यक नहीं है) सी की अधिकतम राशि प्राप्त करते समय। उदाहरण: हम सभी चयनित तत्वों पर कम से कम 80 ए और 150 बी को हिट करना चाहते हैं और जितना संभव हो उतना सी चाहते हैं। मैंने इस समस्या के बारे में सोचा है और एक कुशल समाधान की कल्पना नहीं कर सकते नमूना आकार लगभग 15 श्रेणियां हैं जिनमें से प्रत्येक में ~ 30 तत्व होते हैं, इसलिए ब्रूटोफोर्सिंग बहुत प्रभावी नहीं लगता क्योंकि संभावित रूप से 30 ^ 15 संभावनाएं हैं। मेरा मॉडल यह है कि मुझे लगता है कि यह गहराई के साथ एक पेड़ के रूप में श्र...

css - Big Gap between Header and Text in IE7 -

This is a very lame question, but I've struggled with it for a long time and accepting the truth and helping Have decided to go. I have a series of pages on a new site that is proving problematic with the text hanging below the header. It only happens in IE7, it works well in FF, Safari and IE8 - I do not even want to talk about IE6. Some are "pushing" or "holding it" and I can not get it to come back. You can see the page How do I appreciate some guidance You will need to add something like this to your CSS: # contact #nav {float: right; Width: 415px; } I have compared two pages, and there is some css in the cataract page that floats #catteracts #nav to the right. After downloading pages and making changes, I tested it in IE7, and it works fine.

c# - Best Type to set as return type for methods that return a collection? -

Which is the best type for returning collections? Did I call IList & lt; T & gt; , IEnumerable & lt; T & gt; , IQueryable & lt; T & gt; , something else? Which is the best and why ? I am trying to decide how specifically to use the interface and some sections to implement. / P> Edit Let me close it a bit further, I'm using SQL from LINQ to return data to a WCF service. It seems that there is a change in the best type to use? I'm shooting the minimal interface to expose the default in IEnumerable IList & Lt; T & gt; and IQueryable & lt; T & gt; Applicable IEnumerable & lt; T & gt; As long as you do not need other specific requirements for the methods, I go for minimalism and use the least derivative type. If your calling code has other requirements, such as the number of items in the display or archive of indexed lookup, you are getting other types like ICollection & lt; T & gt; You may want to...

.net - ASP.Net Ajax PageMethod - retain reference to DOM object -

When an ASP.Net pagemouth is called, we call this as: Function doSomething (HtmlElement) {PageMethods.GetText (onSuccess, onFailure); } What is the best way to maintain the context of HTMLElement in the above example, so that we can continue to work on the onsite success method with it? Thanks for any help in advance Due to the fact that Javascript Supports, you will not have to worry about retaining the context of the element; Since it has been fundamentally brought into success (assuming that you have written an unknown function in place of success). Simply put, whatever function you put for you The success can already be used in the context of the element, passed as a parameter. doSomething (htmlElement) {PageMethods.GetText (function (x, y) {var v = htmlElement / * will not be empty}, failure on); }

java - WSContext.getUserPrincipal() returns null for password digest authentication -

In my webserver I need to enter the caller ID, but wsContext.getUserPrincipal () returns zero even if User authenticated using WS-Security with password authentication. JADS-WS 2.1 WSCXXT. The user has not been authenticated according to the Java Doc for Guest UserPrincipal (). Do I have to do something in the security handler to set the principal in WSContext? Docks indicate that it is done automatically. I am using the Metro 1.1 stack (1.1.5 I think), Jack-W 2.1.3 on Storm Tomcat. Try again on wsContext.getMessageContext (). Display EntrySet () and values, sometimes they are there but are not recoverable due to some reasons by GetUserPrincipal () method. In this case you take Prince directly from there and leave a comment in the future that it is not very portable.

svn - How do I adjust the Wordpress URL handling to ignore certain directories? -

I am using Dreamhost's WordPress, Subversion and Track Installation. My Subversion treasures are all / repos / [projectname] and my Trac installation is in all / trac / [projectname]. I also have a few other directories, such as webapps / webapps / [appname] that I am working for. However, if I go to / trac / [projectname] in my browser, Wordpress works up to 404 - which makes sense, there is no WordPress page on that URL. I wonder if it can be related to something I'm running plugins I will start by disabling all my plugins and changing them one by one. However, I disabled them all (and even reset my theme by default) and the same behavior was experienced. I'm not sure whether this is something I programmatically or through the administration console, and it really does not make any difference, but I do not see anything in the console, I'm guessing (and this is why I'm asking here). I just need to identify the directories I do not want to handle WordPress. ...