Posts

Showing posts from July, 2013

regex - Does a regular expression exist for enzymatic cleavage? -

There is a regular expression for the (theoretical) cleavage of the sequences? There is a crack rule for trypsin: after r or after, but not before p. Example: Sequence of fragmentation VGTKCCTKPESERMPCTEDYLSLILNR The result should be in the sequence (s): VGTK CCTKPCI YLSLILR Note that there is no deviation after the second peptide (because PK comes after Kashmir). / P> In Perl (this can be just in C #, Python or Ruby): My $ seq = 'VGTRCCTKPESERMPCTEDYLSLILNR'; My @peptides = Split / Some Regular Expressions, $ seq; I have used around this work (where a cut marker, = inserted into the first sequence and then removed, if immediately after the p cut maker): < / P> my $ seq = 'VGTRCCTKPESERMPCTEDYLSLILNR'; $ Seq = ~ s / ([RK]) / $ 1 = / g; # Main deduction rules $ Seq = ~ s / = P / P / g; #exception. My @peptides = split (/ = /, $ seq); But this requires modification of a string which can be very long and can have millions of views. Is t

iphone - Converting between unique NSIndexPath and unique NSUInteger (or int) -

What is a better way than creating a one-by-one mapping between the NSIndexPath of the table view cell? and a unique NSUInteger or int , a specific tag cell (a UIProgressView ) link UIKit classifies methods by means of class extension, which is NSIndexPath and int , but They work less than just certain lines That's right, I can not walk in that range, but I am thinking that there is a mapping with which nobody has come, it should be guaranteed to work for any line May be. No, in fact, there is no guarantee of working for any kind of rows if you have 2 squares. With a table, with 3 billion rows in each, there is no way to map those 6 billion potential NSINXPath into 4 billion 32-bit NSINTGARS. (If you were creating a 64-bit version, bit app, this is true, but in the examples the number would be 4 billion times higher.) They added 10,000 rows in per section Use the range of; If you are seriously worried that you may have more rows than that, then you can use

Is it possible to recursively require all files in a directory in Ruby? -

I am working on an API for which all .rb files must be loaded in their current directory and all subdirectories. Currently, I am entering a new requirement for every file I add, but I want to create it where I only have to put one of the sub-directories and it will be automatically added. . Is there a standard order to do this? In this case, all the files are being loaded under the lib directory: < Pre> Dir ["# {File.dirname (__ file __)} / lib / ** / *. Rb"]. Each {| F | Load (F)}

orm - How to query a date in HQL (Hibernate) with Joda Time? -

I'm sure anyone is familiar with HQL (I'm a newbie myself) can easily answer this question . In my Grails application, I have the following domain class. class book {org.joda.time.DateTime releaseDate // I use PersistentDateTime to continue through hibernate (which is a DATETIME type in my HQL query, I I want to retrieve the books which are included in the date range of the release date1 .. date2 Date Book date 1, Date 2 ... def queryStr = "Book with 'b * where b.releaseDate & gt; $ date1 and B.releaseDate & lt; $ date2" def res = Book.executeQuery (queryS Tr) but I have exceptions ... due to: org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: error token digits in date format ( For example 2009-11-27T21: 57: 18.010 + 01: 00 or no thank you V 27 22:01:20 CET 2009 ) I also tried to convert date 1 to a date range without success So what is the correct HQL code? Do I use a pattern format method to specify

Code review tool for Aptana and Tortoise? -

I have seen some links on this subject, but none of our status: We use apatata for coding and deployment, and the turtle is put back in the SVN hosted by Unfuded. I would like a simple way of reviewing the remote, asynchronous code - going through the check in code and commenting, asking questions, etc. Suggestions? Users either code strikers or trac with the CodeReview plugin / Html>

php - extreme ajax implementation in web service? -

If someone wants to create a website that works like a desktop software, it is not better if you are a page Use and use AJAX Recover all other php-files and update the contents of the current page with examples. Jquery? I mean, just one page, you get the idea of ​​my question which I think ... Is this a recommendation? Similarly, Meebo, Gmail, etc. do so, so obviously there are cases of legitimate use. Note that they have versions that work without JavaScript, to avoid loosing the audience ...

How do I move and scale properly in ActionScript? -

फ़ंक्शन स्केल (ई: इवेंट): शून्य {plane1_mc.scaleX + = .1; Plane1_mc.scaleY + = 1; Plane1_mc.x - = 5; Plane1_mc.y - = 3; } फ़ंक्शन प्रोप (ईवीटी: इवेंट): शून्य {plane1_mc.prop_mc.rotation + = 100; } Plane1_mc.prop_mc.addEventListener (इवेंट .ENTER_FRAME, prop); Plane1_mc.addEventListener (इवेंट .ENTER_FRAME, पैमाने); ऐसा करने के लिए विमान 1_ एमसी को स्केल और स्थानांतरित करने का प्रयास करने के लिए यह क्या है I यह दोनों से पहले कर रहा था, लेकिन अब यह केवल पैमाने पर कर रहा है कोई भी मुझे बताने में संकोच नहीं करता आपका कोड सही है उस राशि को बढ़ाने की कोशिश करें, जिसे आप ले जाएं और क्या होता है उसे पोस्ट करें। ऐसा कुछ: plane1_mc.x - = 50; Plane1_mc.y - = 30; यह भी सुनिश्चित करें कि आप कहीं भी 1_mc को स्केल नहीं कर रहे हैं। यह संभव है कि इस के बजाय एक और घटना को निकाल दिया जा रहा है, इसलिए यह scaleX और scaleY मानों की तरह दिखता है इस समारोह से संशोधित किया जा रहा है, जब वे वास्तव में नहीं हैं। मैं इस फ़ंक्शन में कुछ ट्रेस स्टेटमेंट डालकर सुझाव देता हूं और देख रहा हूं कि अग

asp.net - Gridview DataSourceID with Multiple Datasources? -

I would like to display clickable news headlines but I'm having trouble pulling data from two data sources for a single gridview is. I'm trying to do this DataSourceID = "SqlDataSource1, SqlDataSource2" but that's not working Thanks in advance. & asp: gridview id = "gridview1" run = "server" automatically generated column = "incorrect" datasource id = "SqlDataSource1, SqlDataSource2" & gt; & Lt; Columns & gt; & Lt; ASP: Hyperlinkfield datatffield = "NewsHeadline" dataNavigateAurilfield = "NewsRule" /> & Lt; / Column & gt; & Lt; / ASP: GridView & gt; & Lt; Asp: SqlDataSource id = "SqlDataSource1" runat = "server" connectionstring = "& lt;% $ connectionSettings: connectionServing1%>" Provider name = "& lt;%% connection accepted: connection estring 1. provider name% & gt;" SelectCommand = "Select [Ne

De-Duplication API in Java -

Is there a D-dupplication API in Java? I want to eliminate unnecessary items from the database (for example, fake fingerprints), how is this possible through Java programming? Without further information, I would recommend using only one. There are different types of sets of different professional and cons, but they have a fundamental principle. Each one is: A collection that has no duplicate element. If you add your elements to a set and then read them back, then each unique element will only appear once.

Which version of MSDN subscription / cheapest source -

I searched here for various MSDN membership questions, but what I found is either strong or MVP centered , Or their answer is old with links. I'm mostly Delphi developer, which is no current requirement for Visual Studio. I need all Windows OS versions, for testing, and for office, some integration requirements I have some apps for this and the version is very supportive of the informal access project. I do not need betas, sales support or likes, and I'm not interested in coming back to MS Hoop-Jumping (I was a company that was an MSPP, the way back - when they tired me!) I have A few years ago there was a company, whose empowerment was a subscription (which was great, but so far does not really apply to my current situation). I am thinking that MSDN Premium is the only one which covers my requirement of the office Is it right, and if so, what is the best (cheapest) source to achieve it? is? Thank you in advance ... MS packet for only $ 350USD download For the on

Usage of 'short' in C++ -

Why is it that for any numerical input we prefer an int instead of a small number, even if the input is too much Integer The size of at least 2 bytes for int on my x86 and 4 bytes should not be better and faster to allocate to int? Or am I confused to say that less is not used? The CPU is usually the fastest while working with its "basic" integer shape, even if small is smaller than a int , int is probably close to the original size of a register in your CPU, and therefore the two being the most efficient is likely to. In 32-bit CPU architecture, a bus cycle is required to load all bits to load 32-bit values. To load 16-bit values, a bus cycle is required to load bits, throwing plus out of half of them (this operation can still be within a bus cycle) .

iPhone Development -CGPoint & NSTimer help -

I want to see the ball in a particular area, the problem is that I do not know how the field area and movement The situation here is also this code that I use to move the ball to the whole scene (there is an uiimageview on the ball object view). Thank you. - {zero} on the timer {ball.center = CGPointMake (ball.center.x + pos.x, ball.center.y + pos.y); if (ball.center.x> 320 || ball.center.x <0) pos.x = -pos.x; If (ball.center.y> 460 || ball.center.y & lt; 0) pos.y = -pos.y; } // Apply viewDidload to additional setup after loading the view. - (zero) viewDidLoad {pos = CGPointMake (14.07.0); [NSTimer Scheduled Timer with Time Interface: 0.03 Goal: Self Selector: @Selector (On-Timer) userInfo: Zero repeats: Yes]; Instead of 320 and 460 codecoding, } You can use the boundaries of your balls to look forward. Check the property of bound UIView .

web setup project - Visual Studio MSI Installers -

I have a web setup project installer and I would like to default to the site and app pool which was selected during the installation process is . Apart from this, I want to add the existing version number to the product name during the installer's manufacturing process. Any help would be greatly appreciated! The Visual Studio Web Setup project is not quite a simple (and very flexible) tool. I Modify MSI after building One You can add properties such as: < P> Add a property named TARGETSITE and set it to the metabase path of the site that you need to be the default, for example, / LM / W3SVC / 2 . Add TARGETAPPOOL to the named asset and set it to its name Application Pool You need to be the default For example, MyAppPool < / Code>. You can also set the product name by editing the existing ProductName property. > Changes to MSI files can be achieved manually with devices such as ORCA (which is part of that). Alternatively, you can

regex - Javascript "Invalid Date" error in Safari -

I'm trying to debug one of my scripts and I can not find my head about what's wrong with it Can be: <(\ D \ d) (\ d \ d) (\ d \ d) (\ "\") (\ d \ d) d \ d) (\ d \ d) $ /, '$ 4 : $ 5: $ 6 $ 2 / $ 3 / $ 1 ')); Warning (date); It works in Firefox, IE, Chrome but safari gives me an "invalid date" error Any ideas? time and date are in the wrong order (Just for Safari I think :): I tested it in Safari and it works (I just changed the date and time position in the last string): (\ D \ d) (\ d \ d) (\ d \ d) (\ D \ d) $ /, '$ 2 / $ 3 / $ 1 $ 4: $ 5: $ 6')); Warning (date); It will also work in other browsers as it is expected.

blurring a web page in silverlight -

I have a web page that should be slow on page load and some boxes end. There is a text box, this box takes some input from the user and the text button information on the Submit button on the click button is checked on the server and accordingly the dim web page can be normal (useful) Or may be slow. is very much like, what happens when we open the home page of www.sulekha.com Please guide me on this. thankQ You have tried to use child windows in the Silverlight Toolkit Here's the sample "<" -

c# - ASP:Button don't works in a jquery dialog -

हाय एक jquery संवाद है: जेएस स्रोत है: < कोड ($) (दस्तावेज़) .ready (function () {$ ("# DialogConfirmationDiv")। संवाद ({bgiframe: true, autoOpen: false, ऊंचाई: 140, शीर्षक: "कन्फर्मि l 'invio?", मॉडल: सच} );} html स्रोत है: & lt; div id = "डायलॉग कन्फर्मेशन डिव" शीर्षक = "कन्फर्म नोटा स्पेसी" & gt; & lt; asp: बटन ID = "ConfermaSi" runat = "server" text = "Si" OnClick = "ButtonSalva_Click" OnClientClick = "$ ('# DialogConfirmationDiv')। संवाद ('बंद'); वापस सत्य;" / & gt; & lt; asp: बटन ID = "ConfermaNo" runat = "server" text = "नहीं" OnClientClick = "$ ('# DialogConfirmationDiv')। संवाद ('बंद'); वापसी लौटा" / & gt; & lt; / div & gt; < / पूर्व> बटन कन्फर्म न्न काम करता है। क्लिक ईवेंट पर ConfermaSi स्वयं को बंद कर देते हैं लेकिन बटनएसल A_Click विधि मैंने इस विधि पर

pitch - what is a good programming language for music software? -

I want to write a music software that can play music, detect the pitch of the computer's microphone (An algorithm which uses sound filters to filter the frequencies), and enables a good user interface. Something similar to Smartmuse: What can be the most appropriate language for writing such software? Does anyone know what Smartmuse was coded in? thanks use the language music and Not special for DSP , otherwise you will modify the wheel again. SuperCollider - Pure Data - Paste -

actionscript 3 - OOP: trouble notifying other objects in hierarchy -

I consider the hierarchy of objects I always struggle quiz with sending messages between objects: < ul> Quiz Prsnsuchi question North list Answer it: a quiz question list - multiple questions in a question list - no question a Answer list is there There are many answers in a reply list When someone Answer is clicked (We are talking Flash AS3 here): Answer indicates the answer. Answers the question answers. The question indicates question listing. The quiz indicates the quiz. In other words, the message bubbles up. This is possible because I pass each 'parent' object through the creator of its 'collector' but I think I read somewhere that the objects should not be aware of their parents. Thank you Yes, you do not want children to their parents Let object link I think you have to expand the position, he has a performance hierarchy that case, you can do it better by using the event system. You can create custom events that are

javascript - Check if object is a jQuery object -

क्या कोई ऑब्जेक्ट एक jQuery ऑब्जेक्ट या एक नेटवर्जिक जावास्क्रिप्ट ऑब्जेक्ट है यह जाँचने का एक तेज़ तरीका है? उदाहरण: var o = {}; Var ई = $ ('# तत्व'); फ़ंक्शन doStuff (ओ) {if (o.selector) {console.log ('ऑब्जेक्ट है jQuery'); }} डस्टफॉम (ओ); doStuff (ई); जाहिर है, कोड ऊपर काम करता है लेकिन यह सुरक्षित नहीं है। आप संभावित रूप से o ऑब्जेक्ट के लिए एक चयनकर्ता कुंजी जोड़ सकते हैं और उसी परिणाम प्राप्त कर सकते हैं। (typeof obj == 'jquery') के साथ लाइन में कुछ आप ऑपरेटर का उपयोग कर सकते हैं: obj instance of jQuery स्पष्टीकरण : jQuery फ़ंक्शन (उर्फ $ ) एक के रूप में कार्यान्वित किया जाता है $ (foo) को कॉल करते समय, आंतरिक रूप से jQuery इसका नया jQuery में अनुवाद करते हैं; नया उपसर्ग। (foo) 1 । jQuery की एक नई घटना को इंगित करने के लिए, यह अंदर यह आरंभ करने के लिए जावास्क्रिप्ट प्राप्ति, jQuery.prototype उर्फ jQuery.fn )। है true । 1 यह वास्तव में नया jQuery.prototype.init (foo) है: कन्स्ट्रक्टर लॉजिक को ini

Javascript showing the function text instead of printing value on screen -

फ़ंक्शन हेक्स (x, y, side, isLast, color) {// हेक्स ऑब्जेक्ट कन्स्ट्रक्टर This.x = x; यह। Y = y; This.side = पक्ष; This.isLast = isLast; This.color = color; फ़ंक्शन गुणा () {return.x * this.y; } This.multiply = गुणा; } Var हेक्सागन = नया हेक्स (22,22,20,0,1); document.write (hexagon.multiply); जब index.htm लोड हो रहा है, परिणाम जो स्क्रीन पर लिखते हैं, वापस लौटने वाले मान के फ़ंक्शन: फ़ंक्शन गुणा () {return.x * this.y; } : ( आप भूल गए (): < यदि आप () का उपयोग नहीं करते हैं, तो जावास्क्रिप्ट एक कोड के रूप में multiply का इलाज करेगा; । और इसे सामग्री लिखें- इस मामले में, फ़ंक्शन का कोड।

Linking flash to OOP javascript using ExternalInterface? -

I'm looking at a method to call a flash method in JavaScript and get results: Example: Flash - External Interface AddClallback ("getprogress", getprogress) // getprogress to flash javascript public function: zero {ExternalInterface.call ("getprogress", progress); // Send progress from Flash to Javascript} Javascript - Object.prototype = {... getprogress: function () {$ ("#movie") GetProgress (); Progress of return; } ...} Anyone have any idea how to hook it all ??? Do you want JavaScript to flash or flash the value of progress Trying to pass JavaScript? From the words of the question it seems that you want to call the Flash method from javascript and get the return value. But then why are you calling ExternalInterface.call via javascript method getprogress method and return progress change flash Part of: External Interface AddClallback ("getprogress", getprogress) public function getprogress (): zero

How do I keep Emacs org-mode from splitting windows? -

I am a new emacs user using emacs for awesome organization-mode. All my pages have links to all of my ORG files, but every time I click on a link that divides my window, so I only have more than half the screen estate available how can I set it up Do not split the Imax window horizontally, but a new window opens for my link? I'm assuming that you mean that you want to open the link in a new frame. (AMABC's terminology is slightly different from other GUI applications, because MACX has predicted X11. In the other app called "window" which is called "frame" in the amax because the "window" is already in iMax There was a special meaning, and was used in the names of many functions.) Now what is happening is that you have a frame with a window, and AMACS has two windows. A window is split. You need to customize the org of search-file-other-frame instead of the default search-file-other-window To use-link-frame-setup . You can type it

c++ - Is assert evil? -

जाओ भाषा के निर्माता: जाओ अभियुक्त नहीं प्रदान करता है। वे निश्चित रूप से सुविधाजनक नहीं हैं, लेकिन हमारा अनुभव यह है कि प्रोग्रामर उन्हें उचित त्रुटि से निपटने और रिपोर्टिंग के बारे में सोचने से बचने के लिए एक बैसाखी के रूप में उपयोग करते हैं। उचित त्रुटि हैंडलिंग का अर्थ है कि क्रैश होने के बजाय सर्वर गैर-घातक त्रुटियों के बाद ऑपरेशन जारी रखता है। उचित त्रुटि रिपोर्टिंग का अर्थ है कि त्रुटियों को प्रत्यक्ष और बिंदु के रूप में, प्रोग्रामर को एक बड़ी क्रैश ट्रेस व्याख्या करने से बचाते हुए। सटीक त्रुटियां खासकर महत्वपूर्ण होती हैं, जब त्रुटियों को देखते हुए प्रोग्रामर कोड से परिचित नहीं होता है। इस बारे में आपकी राय क्या है? नहीं, जब तक आप इसका उपयोग करना चाहते हैं तब तक जोर देकर में कुछ भी गलत नहीं है। यही है, यह माना जाता है आश्वस्त: प्रोग्राम के तर्क में स्वयं असफलता। इस तरह के मामलों को पकड़ने के लिए, "त्रुटि" त्रुटि हैंडलिंग: प्रोग्राम में किसी बग के कारण गलत इनपुट या सिस्टम स्थिति नहीं।

javascript - Shopping days till christmas counter jQuery -

How to calculate shopping days in jQuery from Christmas counter Need to add to the website requires quick and dirty any part No date whose date should be consistent with - the weekend of course is to be ignored - or not for the website after "lesson"> You are easy to get the number of days remaining till date You can create a function from: to function days (year, month, day) {var now = new date (date), dates = new date (year, month - 1, Day), // month zero-based day = (date-now) / 1000/60/60/24; // Change milliseconds for day (math) field; } To the day (2009, 12, 25); // 1 9 days !!

c# - How to define stroke around background rectangle of textblock in WPF? -

I have to do some text inside a rectangle with strokes around this rectangle (like the "stroke" of the property " Rectangle itself ") but I did not manage to find the property of" text block "which defined such stroke. You enter TextBlock within a border And you can set the properties of border to draw rectangles around your text.

encoding - Problem with LaTeX hyperref -

मेरे पास cyrilic वर्णों के साथ एक यूआरएल है: http: //www.pravoslavie Bg / Възпитание / Духовно-и-светско-образование जब मैं दस्तावेज़ को संकलित करता हूं, तो मुझे यूआरएल के रूप में मिलता है: http: // www pravoslavie.bg/%5CT2A%5CCYRV%20%5CT2A%5Ccyrhrdsn%20%5CT2A%5Ccyrz%20%5CT2A%5Ccyrp%20%5CT2A%5Ccyri%20%5CT2A%5Ccyrt%20%5CT2A%5Ccyra%20%5CT2A%5Ccyrn % 20% 5CT2A% 5Ccyri% 20% 5CT2A% 5Ccyre% 20 /% 5CT2A% 5CCYRD% 20% 5CT2A% 5Ccyru% 20% 5CT2A% 5Ccyrh% 20% 5CT2A% 5Ccyro% 20% 5CT2A% 5Ccyrv% 20% 5CT2A% 5Ccyrn% 20% 5CT2A% 5Ccyro% 20% 5CT2A% 5Ccyri% 20% 5CT2A% 5Ccyrs% 20% 5CT2A% 5Ccyrv% 20% 5CT2A% 5Ccyre% 20% 5CT2A% 5Ccyrt% 20% 5CT2A% 5Ccyrs% 20% 5CT2A% 5Ccyrk% 20% 5CT2A% 5Ccyro% 20% 5CT2A% 5Ccyro% 20% 5CT2A% 5Ccyrb% 20% 5CT2A% 5Ccyrr% 20% 5CT2A% 5Ccyra% 20% 5CT2A% 5Ccyrz% 20% 5CT2A% 5Ccyro% 20% 5CT2A% 5Ccyrv 20% % 5CT2A% 5Ccyra% 20% 5CT2A% 5Ccyrn% 20% 5CT2A% 5Ccyri% 20% 5CT2A% 5Ccyre और वह समान नहीं है I मैं hyperref के लिए utf8 करने के लिए एन्कोडिंग सेट कर सकते हैं? या मैं कैसे इस

How to use relative path for assets in Flash library? -

When I drag and drop the image in the Flash Library, the path is sometimes relative (./somefolder/someimage .png), and sometimes it's full (D: \ blah \ somefolder \ someimage.png). How can I use only relative paths in the Flash Library to be able to update all the images from any computer and / or from any folder? Thank you in advance. I have found CS5, uncompressed project *. XFL has been saved as my project directory structure: The main project in the root project directory (i.e. c: \ MyApp) * The Xfl project file and other system folders / bin / meta-INF and so on / images < / Strong> - All art there, PNGs, JPG and so on I go to IDE, File-> Import-> Import on the platform, then I will Select images (use of shift The by) / images folder They appear in the library. In addition, they are automatically copied to the system / library folder In the main project XML file (DOMDocument.xml), there are such lines (clear): Lt; DOMBitmapItem n

javascript - Using functions from inside a plugin -

I wrote a little jQuery button plugin - it contains a method to apply the onclick function - here is the code (function ($) {$ .fn.tbutton = function () {this.setFN = function (fn) {alert ("function set.");}};}) (JQuery); I'm using this code (on a div) to start it: var button = $ ("# myButton") . TButton (); Issue now: When trying to implement the setFN function: button .setFN (function () {dosomething ();}); I am getting an error: button.setFN is not a function I have tried before but have not changed. help. Anyone knows what is wrong? You are not returning anything from the Tubutan function so that the value of Tubutan is' do you think it To get it back to the jQuery object, try returning to this tButton (). Besides, I do not think this is a good way to do this because you are basically expanding jQuery in a non-standard way. One better way would be that Tibbons take a callback function as an argument and apply it to match

c# - Find href attribute values that do not contain “javascript:” -

I have a RegEx that finds a href well in a URL: & Lt; [Aa] [^ & gt;] *? Href = [\ "'] (? & Lt; url & gt; [^ \"] +?) [\ "'] [^ & Gt;] *? & Gt; However, I want it to not get any ARR that contains the text, 'javascript:'. The reason for this is that sometimes I have to improve the href and sometimes it does not When there is a Javascript: Text in the ARF I want it not found by regex. (ASP.NET, C #) I really do not recommend using a regexp for this Because HTML is not regular and there is no end to completing the side cases. If possible, please use the HTML parser, it seems that you will get very little sorrow.

php - Twitter API: Get Followers +99 -

If I call for user followers (status / followers), then Twitter APIs (and Oaths) will be used. Return only 99 results Is there any way that I can return 99, then the follower is calling through 100 again through this style of calling till the total number of followers is not returned? Or just return all followers? You must specify the cursor parameter as described. Like to request the first page, specify the cursor = -1 and then use the next blank value returned in the first reaction: http://twitter.com/statuses/followers/ Barackobama.xml? cursor = -1 http://twitter.com/statuses/followers/barackobama.xml?cursor=1300794057949944903

c# - Getting the result from an Expression -

I have created a lambda expression on runtime, and to evaluate it - how can I do this? I just want to express not against any collection or other values. At this level, once it has been created, I can see that this type of expression & lt; Func & lt; Bool & gt; & Gt; , with the value of {() = & gt; "MyValue" .StartsWith ("MyV")} . I thought that at that point I just got the var result = expression. Invoke (expr, null); / Code> Against this, and I will have my Boolean results but it only gives a invitation expression , which looks like (= =) => MyValue. StartsWith ("MyV"))} . I'm pretty sure I am close, but do not know how to get my results! Thank you. Try compiling the expression with the method, then apply the returned rep: using the system; Using System.Linq.Expressions; Class example {static zero} (expression & lt; funk & lt; boolean & gt; & gt; expression = () = & gt; "myVa

javascript - Change Menu Styling on fly or pass a param inside jQuery .each iterator -

I have a bunch of menu links and want to change my style on click - say "about you" Click and make it bold and red. I select the item and click them Add event: $ ("# nav_menu> gt; *") Tie ("click", function () {doTrigger (this.id);}); In this way I pass the ID of the clicked item to doTrigger . Okay. Now in doTrigger I am trying to iterate through the items and change their styles: style1 for example style2 The problem is that: $ ("# nav_menu> gt; *") Each (function () {;}); I will not give the ID of the clicked item. I think that there must be a less complex way of achieving what I need. Besides, I think I'm also losing. Try something like this: This resets all children to class1 when an item is clicked, and then only that item was class2 is.

c++ - Interrupt boost::asio synchronous read? -

I am using asio synchronous sockets to read data from TCP on background thread, explained in a "server" class has gone. However, I want to get the thread out when the destroyer of this class is called. The problem is that the call blocks any read function, so the thread can not be easily exhausted. Win32 has an API for this: WaitForMultipleObjects what I really want How do I get the same effect with promotion? In our application, we set the "Termination" status, and then on the port a self-connection Use the thread on which the thread is listening, it arises, notes the ending condition and ends. You can also see the Improved Implementation - if they are just reading a simple on the socket (i.e., by any means WaitforMultipleObjects are not using their own internal use) you might conclude that It is possible that there is nothing to just and completely unblock the thread if they are waiting on multiple objects (or perfection port), then you can see th

if statement - Matching up Curly Brackets -

I have a hard time matching curly brackets in this code. This indicates an "other" error without an "if" error, but it is not certain how to read the syntax. If someone can help, it would be most appreciated here: Private Zero Collection Factor () {Boolean its_a_variable = theInfo.isVar (); If (iDent (token)) {string identity = token; TheToken = t.token (); // var and const handle matters! IdentInfo theInfo = symTable.lookup (identity); } Boolean its_a_variable = theInfo.isVar (); Int theAddr = theInfo.getAddr (); Boolean isGlobal = theInfo.getIsGlobal (); Int constValue = theInfo.getValue (); If (its_A_V) {// pld12: Make this change !! Int theAddr = theInfo.getAddr (); Boolean isGlobal = theInfo.getIsGlobal (); If (theAddr == -1) T. Terror ("unannounced identifier is used in expr:" + similar); If (isGlobal) cs.emit (Machine.LOAD, theAddr); Else cs.emit (machine.load, AadR); } And {int constValue = theInfo.getValue (); If (costvalue = empty) t. Terr

java - Image not displaying in simple applet -

I am working with Java images for the first time and when the applet loads, they are having trouble viewing it. The code I have posted below is actually a dramatically down-down version of the code, hopefully I do not see an image with this code, will show me as long as I have to resize the window All help of picture is greatly appreciated and thanks is extended in advance :) import java.applet. *; Import java.awt. *; Import java.awt.event. *; Import java.awt.image. *; Import javax.swing *; Import java.util. *; Import java.awt.Graphics; Examples of public class implement japplets runanble {boolean update; Thread thread; Private mill width, height; Test image drawboard; // Used for creating and storing values ​​Private audio clip [] Sound = New audio clip [4]; // private key counter to capture the array audio clip = 0; // counter private image game image for audio clip array; Personal Graphics Game Graphics; Public Example () // Up Uplet Guinea {this.resize (new dimension (600, 5

Best way to unselect a <select> in jQuery? -

& lt; आकार चुनें = "2" & gt; & Lt; विकल्प चयनित = "चयनित" & gt; आपके विकल्प का इनपुट & lt; / option & gt; & Lt; विकल्प & gt; आपके विकल्प का इनपुट & lt; / विकल्प & gt; & Lt; / चयन & gt; विकल्प का चयन करने के लिए सबसे अच्छा तरीका क्या है, jQuery का उपयोग करके? का प्रयोग करें ... $ (" विकल्प: चयनित ")। RemoveAttr (" चयनित "); या $ ("विकल्प: चयनित")। Prop ("चयनित", गलत)

database - How do I migrate data from one model to another using South in Django? -

I created a new app that made it my own internal voting system, and to track it, a model named after the vote Was placed. I want to re-apply the voting system to my own app so that I can reuse it. However, the original app is in production and I need to create a data migration that will take all the votes and transplant them in a different app. How can I get two apps to participate in migration? Do I have access to both models? Unfortunately, in the original and isolated apps, a model name is now voted, so I should be aware of any confrontation. Have you tried? I will start by creating migration in either new or old apps which looks something like this. Class migration: def forward (self, orm): db.amename_table ('old_viet', 'new_witz') def backwards (auto, orm): db.rename_table ('new_vote' , 'Old_vote') If that does not work, you can move each item in a loop with these lines: def Forward (self, orm): [Old 'vote'] for the old. A

postgresql - Unique model field in Django and case sensitivity (postgres) -

Consider the following situation: - Suppose that my app users should state / Country. Just for clarity, we are only considering ASCII characters here. In the US, a user can create a state called "Texas". If this app is being used internally, then assume that the user is not spelled "Texas" or "Texas" or "Texans", but it is important that the system be "Texas" in the "Texas" database Is already there. If the model is like the following: class state (models.Model): name = models.CharField (max_length = 50, exclusive = true) Specification cases in postgres will be sensitive; That is, Postgrey will allow the user to create both "Texas" and "Texas" because they are considered unique. What can be done in this situation to prevent such behavior. How is known about providing insensitive exclusivity with the degego and postgrid Right now I am doing the following to prevent the creation of case-

php - Techniques to speed up Magento on a shared host -

I have a magenta site installed that is only starting to receive complaints about its performance on the shared server < / P> Many HTTP requests No minimization of CSS or JavaScript. No CSS sprites The shared server has not been recommended for Magento, or I have read Unfortunately, I Dedicated hosts and I do not want to hack the codebase to reduce all JS / CSS. Is there any plugins that reduce CSS / JS? Do you have any experience with accelerating Magento performance? Try this extension to shorten CSS / JS files I have made a similar topic on Magnaço's performance improvements, which comments can help you.

Attach commands to TreeView in wpf using prism -

मैं एक प्रतिनिधि सूची में एक TreeView में कैसे प्राप्त करूं विस्तारित इवेंट? क्या मुझे डेलिटेक कॉमांड का उपयोग करना चाहिए या कोई अन्य तरीका है? धन्यवाद चूंकि आप प्रिज्म का उल्लेख कर रहे हैं, मुझे लगता है कि आपके नियंत्रक या ViewModel को आपके TreeView वाले दृश्य से जुड़ा है ... यह मामला है, एक बूलियन संपत्ति बेनकाब करना निजी बूल _isExpanded; सार्वजनिक बूल आईईएक्सपेंडेड {get {return_isExpanded; } सेट {if (value! = _isExpanded) {_isExpanded = value; RaisePropertyChanged ( "IsExpanded"); // कस्टम लॉजिक लागू करें ...}}} अब TreeView तक इस प्रॉपर्टी को हुक करवाने के लिए, आपको ट्री व्हीव के संसाधनों में निम्नलिखित शैली को लागू करने की आवश्यकता है (या आगे दृश्य पेड़ उपयुक्त के रूप में) शैली लक्ष्य प्रकार = "{x: प्रकार ट्री वीआईआईआईटीम}" & gt; & Lt; सेटर संपदा = "आईईएक्सपैन्डड" मान = "{बाध्यकारी पथ = आइएक्सपैंन्डड, मोड = दोवे}" / & gt; & Lt; / शैली & gt; NB: आप एक ऐसी तकनीक का उपयोग भी कर सकते हैं जिसे

jquery - How to find <tr> inside <table> with depth 1? -

$ (यह) .parents ('table: first')। Find ('tr')) उपर्युक्त tr अंदर तालिका के लिए खोज करेगा, यह केवल शीर्ष tr के लिए खोज कैसे करे संपादित करें बच्चों अपेक्षित रूप से काम नहीं कर रहा है: चेतावनी ($ (यह '):। (' तालिका ': पहले)। बच्चों (' tr ')। लंबाई) देता है 0 $ (this) .parents ('तालिका: प्रथम')। ('& Gt; टॉडी & gt; tr; & gt; ट्र') ढूंढें मेज को पकड़ लेंगे और फिर सभी टीआर मिलेंगे जो कि सीधा बच्चे हैं और उन टीआर की मेज के प्रत्यक्ष बच्चों हैं। दोनों मामलों में काम करना चाहिए जहां ब्राउज़र जोड़ता है और जब ब्राउज़र नहीं करता है

Creating a MySQL SET's from a string -

Is there a way to create a set with a string of different values ​​in MySQL? For example: 'fast, brown, fox' => 'the', 'quick', 'brown', 'fox' without any inverse EXPORT_SET bit fading Regards If you are trying to use set in < In the statement, instead of dividing the string, you can make a comparison: SELECT * FROM `table` WHERE ', fast, brown, fox' regexp (' (^ |,) ',' Word ',' (, | $) '); I'm not sure how efficient it will be when your dataset is large, but it can be faster by reading and selecting in a temporary table.

java - Unable to find class annotation -

यह कोड प्रिंट क्यों करता है? @Table (name = "source") पब्लिक क्लास स्रोतडिटेल्स डाटाबेसइन्टीयटी {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {System.out.println (SourceDetails.class.getAnnotations ()। लंबाई) लागू करता है; } ...} क्योंकि आपने एनोटेशन की प्रतिधारण को सेट नहीं किया है रनटाइम। @ रीटेंस (रिटेंशन पॉलिसी। RUNTIME) @ इंटरफेस टेबल {स्ट्रिंग का नाम (); Int intValue (); }

docbook - preproccesing in XSLT -

Is it possible to 'pre-process' in XSLT? Prefetching means the source of the tree (in memory presentation). Is it possible, or I need to make many changes for this. Use Cases: We have DOCKBOOK reference booklets for customers, but for some customers, they require different 'skins' (different images, etc.) so I hope to do Based on the parameter, the image changes the fileref path then apply the rest of the usual docbook to XSL templates. Expansion on the Answer to Imaan ... Issues of XSLT 1.0 or 2.0 In, you will get the intermediate (pre-processed) result & lt; Xsl: variable> elements, either globally (top level) or locally (declared template). & lt; Xsl: variable name = "intermediate-result" & gt; & Lt ;! - Code to create pre-processed results, eg: - & gt; & Lt; Xsl: applied-template mode = "pre-process" /> & Lt; / XSL: variable & gt; In XSLT 2.0, the value of $ intermediate-result variable

iphone - resize uinavigationbar push/pop viewcontroller size issue -

I have to reduce the height of UINavigationBar (linked to UINavigationController) I have done this Controller via Navigation of UINAVigationControllerDelegate: Visual ViewController method, and it is working fine. The problem is the visual view controller that is in the main view. Thus, theShowViewController method also resizes the viewcontroller's visual frame, which works fine, thus it was not resizing itself to reflect the new navbar height. However, when I'm going to push on a new view controller, or pop, I always see the view that during the animated transition, the next scene falls into the original position. Then, in the NavControllerDelegate, I did it because of the code in the ShoveView controller, it has taken it back up I have the best way to make sure that the change never happens below. I tried to keep the code that changes the frame again in the WhiView controller, but it does nothing. I have also made sure that the frame of UIView, which is the vi

JQuery Clear Form on close -

I have a JQuery Dialog script below, I'm trying to figure out how to clear FORF I close the dialog function clearForm () {$ (': input', '# calcQuery'). No (': button, submit: reset, hidden') .val (''); }; // form popup $ (document) .ready (function () {// var dataString = $ ("# calcQuery"). Serialize (); $ ("# formbox") dialog ({bgiframe: true, autoOpen: false "Calculator", Button: {"Count": Function () {// Form $. Ajax ({Type: "Post", Url: 600, Width: 400, Model: False, PassOnScope: True, Title: "Calc.php", Data: $ ("# Calculator"). Serialize (), datatype: "html", success: function (response) {$ ("# calcbox"). Html (response); $ ("# Calcbox "). Show ();} error: function (excerpt, ajax option, thrown error ) {Warning (Excerpt); Alert (Throwed;)}}). Reaction Text; // Form Post}}}); $ ('#calcButton') Click (function () {$ ( '#FormBox&#

c# - Use XmlSerializer to add a namespace without a prefix -

मैं अपने आउटपुट को इस तरह दिखना चाहता हूं & lt; OrderContainer xmlns = "http: // ब्लाला / एपीआई / उत्पादों "xmlns: i =" http://www.w3.org/2001/XMLSchema-instance "& gt; तो मैंने अपने XmlSerializer के लिए निम्नलिखित को जोड़ा है XmlSerializer x = नया XmlSerializer (typeof (OrderContainer)); XmlSerializerNamespaces ns = नया XmlSerializerNamespaces (); Ns.Add ("", "http: // blabla / api / products"); Ns.Add ("i", "http://www.w3.org/2001/XMLSchema-instance"); // do stuff .. x.Serialize (स्ट्रीम, ऑर्डर कॉन्टैनेयर, एनएस); लेकिन अब मुझे मिल & lt; आदेशकैन्टेनियर xmlns: i = "http://www.w3.org/2001/XMLSchema-instance" & gt ; तो मैं डिफ़ॉल्ट नेमस्पेस को कैसे संपादित करूं? मेरी ऑब्जेक्ट परिभाषा इस तरह है: [System.Runtime (सिस्टम नाम) "सीरियलिज़ेबल एट्रिब्यूट (नाम =" ऑर्डर कंटैनेयर ", नेमस्पेस =" http: // blabla / api / उत्पाद ")] [सिस्टम। सेरिअलाज़ेबल एट्रिब्यूट

asp.net - How does one expand/collapse a nested GridView embedded within div element while clicking an ImageButton? -

निम्न कोड के लिए & asp: GridView runat = "server" आईडी = "GvCustomers" ... ... & lt; कॉलम & gt; & LT; एएसपी: TemplateField & gt; & LT; HeaderTemplate & gt; & Lt; / HeaderTemplate & gt; & LT; ItemTemplate & gt; & Lt; एएसपी: इमेजबुटन रनैट = "सर्वर" आईडी = "आईटीआईएमएक्सपैण्ड" इमेजयूआरएल = "~ / इमेज्स / कॉमन / एक्सपोर्ट। Gif" कमांडएनम = "सिलेक्ट करें" / & gt; & Lt; / ItemTemplate & gt; & Lt; / एएसपी: TemplateField & gt; ... & lt; asp: TemplateField & gt; & LT; ItemTemplate & gt; & Lt; / टीडी & gt; & lt; / टीआर & gt; & LT; टीआर & gt; & Lt; td colspan = "3" & gt; & Lt; div id = "document_ & lt;% # Eval (" RENTER_ID ")% & gt;" शैली = "मार्जिन: 10; प्रदर्शन: कोई नहीं; स्थिति: सापेक्ष" & gt; & LT; एएसपी: GridView आईडी = "gvDocuments" runat = &quo

NFS or SMB on Windows Share -

If I had to create a Windows shared folder, put a database file in that folder that many of our customers Is the app to be shared between users, is it an NFS or SMB shared folder? It should now be specified for the record as CIFS (Common Internet File System) but yes , This is SMB. Edit Apparently with Windows 8 and Server 2012 we back to SMB 3. Thank you, Benel

How can I sync files in two different git repositories (not clones) and maintain history? -

I keep two separate git repos that need to share some files, and I want to To be shown in a repo in another. What is a good way to do this for ongoing maintenance in each repo? I'm one of its controllers, and recently I fell in the role of maintaining Pearl's core documentation, whatever Git. Before I maintain perlfaq, it used to remain in a separate source control repository. I recently changed the GIT. From time to time, one of the perl5-porters will sync shared files in perlfaq repo and Pearl repo. Since we have switched to git, we are a bit lazy to change tools, and now I am what it does. For the time being, two repos are going to be different. Currently, to sync a frequently asked question for a new (monthly) release of Pearl, I'm ashamed to say that I only perlfaq * .pod Files perlfaq repo and overlay them in Pearl repo loses this history, etc. In addition, sometimes someone changes the Perl repo in those files and I overwrite it (yes, check git diff stu

Error making C++ functions virtual -

त्रुटि बताती है: "त्रुटि: वर्चुअल बाहरी क्लास परिभाषा" सवाल में सीपीपी सदस्य : वर्चुअल शून्य खाता :: क्रेडिट बैलेंस (डबल प्लस) {यदि (प्लस & gt; शेष) = + प्लस; और cout & lt; & lt; "ऋणात्मक ऋणात्मक नहीं हो सकता।"; } आभासी शून्य अकाउंट :: डेबिटबेलेंस (डबल माइनस) {if (माइनस और लेफ्टिनेंट; = बैलेंस) बैलेंस - = माइनस; और cout & lt; & lt; "डेबिट की राशि खाता शेष राशि से अधिक है।"; } बाकी का कोड यहां है (हालांकि मुझे यकीन नहीं है कि यह आवश्यक है): बस विधि परिभाषा के आभासी बंद पट्टी। घोषणापत्र पर वर्चुअल कीवर्ड केवल आवश्यक है उदाहरण: वर्ग खाता {सार्वजनिक: आभासी शून्य क्रेडिट बैलेंस (डबल); वर्चुअल शून्य डेबिटबेलेंस (डबल); }; शून्य खाता: क्रेडिट बैलेंस (डबल प्लस) {यदि (प्लस & gt; शेष) = + प्लस; और cout & lt; & lt; "ऋणात्मक ऋणात्मक नहीं हो सकता।"; } शून्य खाता :: डेबिटबेलेंस (डबल माइनस) {if (शून्य और लेफ्टिनेंट; = शेष) शेष राशि - = शून्य; और cout & lt; & lt; "डेबिट की राशि खाता शेष राशि से

C# SQL Columns into ComboBox -

My SQL query is not leaving anything in the blankbox but the connection seems to be working, but when the loop does not seem to work . Can anyone tell me what is wrong with that? string sqltable = ("dbo.SLTDS_C" + id + "_ table"); SqlConnection con = New SqlConnection ("Data Source =" + Server + "; Initial Catalog =" + Database + "; Integrated Security =" + Security); Con.Open (); string name sqldatapull = ("choose name from syscolumns where id = object_id (" + + sqltable + "') by serial name"); SqlCommand CMD = New SqlCommand (sqldatapull), Con?); CMD. Common Type = CommandType Text; SQL Datarer Dr. = CMD Spare reader (); while (Dr. Reid ()) {sqldatapull = dr [0]. Toasting (); ComboBox1.Items.Add (sqldatapull); } Dr. Close (); Con.Close (); Correction code: string string sqldatapull = ("syscolumn select name where id = object_id ('+ sqltable +' ') order by command name")

actionscript 3 - '[Inspectable]' metadata tag -

Anyone can interpret briefly about the [Inspectable] metadata tag. I could not read and understood in the live docs. Please help me when we are going to use the [Inspectable] metadata tag? Thanks, Ravi Tags are used with properties so that The code can be found for the property and the possible list of values ​​can be specified. This property can take while using it in mxml, unlike the [bindable] metadata, this tag does not have much effect on the code (other than specifying a default value) - its use It is mainly used to give directions to Flex Builder with special property. Define an attribute made aware by component users in the tag inspector of attribute signals and flex builders. Apart from this, limiting the acceptable values ​​of the property. For example, the property of Vertical Cyrrol policy mx.core.Container class is [Inspectable] < / Code> Tag with it. ] Public function vertical scroll policy (): string {return _verticalScrollPolicy; }

javascript - Programatically Scrolling Over Images in a Website -

I am attempting to set up a website using HTML and Javascript which, at one time, sections of an image Displays and clicks, buttons or segment of the image will scroll to a different section of the image. | ----- | | ----- | | ----- | -A- | | --B- | | --C- | ----- | | ----- | | ----- | If an image formed by a combination of A, B and C, I want to display only one segment, AB or C at a time, and to display one by clicking on a button Scroll left or right so if B appears, and if I click on a button inside the B, then I want to scroll the browser to the right and display the display. I think I can do this by creating three images next to each other, it is quite far enough that one will not see each other, and use javascript to hide scroll buttons, And then to use javascript, scroll to the html anchor that specifies the location of the image. However, I am having trouble getting images off screen if my small plan is to work, then I have to put an off screen on the left side, a

eclipse - Matching keyword highlight color in editor -

I am using a clone of uterine vitamin color scheme for eclipse python development and it is better than mailing keyword highlight Works as it works (whatever name is given), which is ffff96 makes it impossible to read the yellow pale white foreground text. Does anyone know where it is set? Oh! found it! General-> Editors-> Text Editor-> Comments-> Peripherals (Pydev) Very Excellent such a fuss.

flash - Pseudo threaded JSON parsing? -

Very useful, but when parsing the big string it can lock the UI. I am thinking that it is understandable to parse JSON in this one (aka "Chunking"). I am thinking that anyone has implemented, has given suggestions or arguments for the implementation of this approach. Let's just say it's quite complex ... JSON Parsing It is recursive, and the Parsing Automation is placed in the stack ... If you want to click it down, then you have to maintain your state ... I do not know any such library ... which you want Take a look ... If you have a large amount of data, then JSON probably does not like most, mostly because of the condemnation ... yes So that would do something like that ... It is easy to more compact, parse, and does not require repetition, thus can be easily carried in the thread of a green.

Asp.Net Class - problem returning html string value -

I am trying to return an HTML string to my class which I assign to an aspx page for control : This Div 1.InHtmlL = class.News (); However, my catch code is always returning the 'Novellou' message. The code works fine outside the classroom. When I reader linesHTMLStr.Append (reader ["title"]. To comment. ToString ()); I can get back the string on my calling code, do I have to do more to use the readers in the classes? Nameshot Conference { Public Class Conf {Private String Connection StringBMP = Web Configuration Manager. Connection String ["ConfBMP"]. ConnectionString; Public String News () {SqlConnection conn = New SqlConnection (connectionStringBMP); SqlCommand CMD = New SQL Commands ("Spawnews", Con?); Cmd.CommandType = CommandType.StoredProcedure; Cmd.Parameters.AddWithValue ("@ number", 2); SqlDataReader Reader; Try {conn.Open (); Reader = CMD Spare reader (); StringsbilderHTMLST = new stringbilder (""); Whil

What is wrong with this loop in my Django view/template? -

I hate to ask here, but I was also a people stumped and irc. The template I am trying to display does not display the contents of the list {{condition}} alone does not show any value what am I missing? Template: {% bet for condition%} & lt; Tr & gt; & Lt; Td> & Lt; Div & gt; {{Bet.game_num}} & lt; / Div & gt; & Lt; / Td> & Lt; Td> & Lt; Div & gt; {{Bet.home_team}} & lt; / Div & gt; & Lt; / Td> & Lt; Td> & Lt; Div & gt; {{Bet.home_odds}} & lt; / Div & gt; & Lt; / Td> & Lt; Td> & Lt; Div id = "home-odds-checkbox" & gt; & Lt; Input type = "checkbox" & gt; & Lt; / Div & gt; & Lt; / Td> & Lt; Td> & Lt; Div & gt; {{Bet.visiting_team}} & lt; / Div & gt; & Lt; / Td> & Lt; Td> & Lt; Div & gt; {{Bet.visiting_odds}} & lt; / Div & gt; & Lt; / Td> & Lt; Td> & Lt;

java - How do I convert an array of strings to a array of unique values? -

In Java, how can I convert an array of stars to an array of unique values? I have this string of strings: If string [] test = {"1", "1", "1", "2"} / P> and I want to end with: string [] uq = {"1", "2"} will be quick but inappropriately: set & lt; String & gt; Temp = new hashset & lt; String & gt; (Arrays.asList (test)); String [] uq = temp.toArray (new string [temp.size ()]);

c# - Windows Powershell SDK and System.Management.Automation.PSObject -

I have an error in a faster program that I'm compiling in a Windows Server 2008 Visual Studio 2008, I think SP's 2-64-bit OS says it 'system' Management. Automation. POOBiject 'is defined in an assembly that is not referred. I did some searches in MSDN and I found that it is part of Windows Power Shell SDK. The problem is that I already have Windows Powershell if all this is what I want, how do I use it or refer it to the C-Sharpe IDE? If I want to download additional surplus (i.e. SDK), then where do I want to go to do this? I could not find anything online View in C: Program Files \ Reference Assemblies \ Microsoft \ WindowsPowerShell \ v1.0 < / Code> for System.Management.Automation.dll and if it exists, add it as a reference in your C # project. If it does not exist, then download that will put the file in the top position.

iphone - Drawing half image -

Hi all I'm doing. PGG image. I want to attract only half of this image If I call on method DrawInRect: Image with half size of the width image, it will still attract the full image in the given image. So how to draw half the image

javascript eval -

eval ('({"suc": true})') < eval ('{"suc": true}') क्यों? < / Div> दुभाषिया का मूल्यांकन करने की कोशिश करते समय कर्ली ब्रेस देखता है और सोचता है कि यह एक ब्लॉक शुरुआत है कोष्ठक में संलग्न करना एक अभिव्यक्ति बनाता है और किसी वस्तु को सही ढंग से प्रारंभ करता है।

security - PHP: How To Disable Dangerous Functions -

मैं खतरनाक eval फ़ंक्शन को कैसे निष्क्रिय कर सकता हूँ? क्या यह ini_set फ़ंक्शन का उपयोग कर किया जा सकता है? इसके अलावा निम्नलिखित फ़ंक्शन को अक्षम कैसे करें? क्या हम उन्हें ini_set फ़ंक्शन का उपयोग कर अक्षम कर सकते हैं? allow_url_fopen allow_url_include exec shell_exec सिस्टम पासस्ट्रीम पॉप-अप स्ट्रीम_सचंद eval सबसे खतरनाक कार्यों में से एक है जो बुरे लोगों को चीजों का फायदा उठाने के लिए उपयोग कर सकते हैं। इसे अक्षम करने के लिए एक तंत्र होना चाहिए, जो कि php.ini फ़ाइल को बिना सहारा लेना चाहिए; खैर, मैं php.ini फ़ाइल पर जाने के बिना इन खतरनाक प्यारे फ़ेलोयों को अक्षम करने का सुझाव देने वाले एक उत्तर की तलाश कर रहा हूं; मेरा मतलब है कि उन्हें रनटाइम या प्रोग्रामैटिक रूप से अक्षम कैसे करें? पहले से धन्यवाद .... अपडेट क्या किसी ने सुना है PHP शेल अपराधी स्क्रिप्ट के बारे में? इसका मुख्य रूप से फायदा उठाने के लिए ईवाल फ़ंक्शन का इस्तेमाल किया गया था। हैकर्स आपकी साइट पर अपना PHP कोड चलाने में सक्षम हैं। मेरा प्रश्न यह था कि मैं php.ini फ़ाइल से eval फ़ंक्

c# - Using an embedded DLL? -

Is there a detailed guide on how to use the many resources embedded DLLs inside # source? All guides found on Google does not help much to make it "a new class" or "Aielarjerge" it ".NETZ". But I'm not sure that ILMRJG and others. Some Netjh material is how to use, and what to do after making sections guide class file, because since I do not even get a new one. for example, . After adding the class and work, I do not know how to get DLL from my resources. So, to be specific, what I'm seeing is a guide on how to use the .dll file that was embedded in resources < / code> to hold to be able to have a class call, please without parts omitted in mind that I am not very experienced with C # coding. Thanks in advance. : D PS Do not use those big words I have to lose easily. You may have to use Aielarjerge it seems that this solution naturally problem for you Will do

iphone - reorder row in uiitableview -

In my application, I want users to rearrange the contents of differnt rows as well as delete rows Please I recommend that you check these tutorials, they say it is very good !

c# - ASP.Net MVC: How can I easily change the tab color of my navigation menu based on the tab that I'm on? -

I want to apply my navigation tab to some people on this site, and I have heard that it uses ASP The tax was made Net MVC if I am on stackoverflow.com/users, "user" is orange in comparison to the menu tab and all others are gray, just like if a different tab is selected. I am very good to tamper the CSS. Change colors when adding or removing / authoring items in the menu container, but the tab is not familiar with how to change the color of the tab based on the page At i Is there any quick and dirty way to accomplish this? Assign a unique ID to the body element of each page (e.g. & lt; body id = "Users"> ). ASP.NET MVC can be written as body tag on your master page: body id = "& lt;% = ViewData [" bodyId "]% & gt; & Gt; and see in the administrator's methods for each pageData ["bodyId"] = "user"; To specify the id dynamically for each page, Then in your NAV markup, Then do somethi

winapi - CheckTokenMembership in VB6 -

I'm having trouble converting this C ++ code to VB6 code. I have searched the net and I have some PInvoke.net is only in reference to VB.NET code. Here is the code from MSDN: BOOL IsUserAdmin (zero) / * ++ Regular details: This regular return is correct, then the processor of the caller is a member of the local group. The caller is unlikely to impersonate someone and it is likely to be able to open its own process and process token. Logic: No return value: Right - the caller has the administrator local group. Wrong - The caller does not have administrator local group. - * / {BOOL b; SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY; Psid administrator group; B = AllocateAndInitializeSid (& amp; NTAUTHORITY, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, & amp; AdministratorsGroup); If (B) {if (check! TokenMemberShip (NULL, Administrator Group, & amp; B)) {b = FALSE; } Freeside (Admin Group); } Return (B); } It would be gr

c# - Cannot implicity convert a...list -

मेरे पास निम्न कक्षाएं हैं ... सार्वजनिक वर्ग के आदेश {निजी मार्गदर्शक आईडी; सार्वजनिक गिन आईडी ({आईडी; वापसी आईडी; } सेट {id = value; }} निजी सूची & lt; आइटम & gt; आदेश आइटम; सार्वजनिक सूची & lt; आइटम & gt; ऑर्डरआइटम (प्राप्त करें {वापसी ऑर्डर करना; } सेट {orderItems = value; }}} सार्वजनिक वर्ग मद {निजी गाइड आईडी; सार्वजनिक गिन आईडी ({आईडी; वापसी आईडी; } सेट {id = value; }} निजी स्ट्रिंग आइटमनाम; सार्वजनिक स्ट्रिंग ItemName {get {return itemName; } सेट {itemName = मान; }}} फिर मेरे आवेदन में मैं निम्नलिखित की कोशिश करता हूं .... ACME.Order newOrder = new ACME.Order (); NewOrder.ID = xxx newOrder.OrderItems = नई सूची & lt; OrderItem & gt; {नई ACME.OrderItem {ID = xxx ItemName = xxx}} हालांकि मुझे त्रुटि मिलती है "परोक्ष रूप से प्रकार 'System.Collections.Generic.List & lt; ACME.Item & gt; ; ' से ACME.Item [] । अजीब बात यह है कि मेरे पास मेरी सूची ऑब्जेक्ट्स पर "ऐड" विकल्प नहीं है। < / Div> क्या आपके वेब

asp.net mvc - Converting RDL report to RDLC for use in MVC -

I have an existing RDL report that I want to convert to an RDLC report for use in any MVC application. Change the name of the .rdl file to .rdlc according to the method of changing it, include it in the project and then use a ReportViewer control to select datasource. Being MVC I do not have a report comment control on my page, I was using to help in submitting reports in the Response stream. I've given rdl the name rdlc and have included it in my project but when I try to open it, get the following error: The definition of the report is not valid is. Description: There is an invalid target namespace in the report definition '' which can not be upgraded. Any ideas how can I convert rdl to rdlc without having to type it again? You can not change the SQL Server 2008 Reporting Services report. RDL in RDL - Microsoft only knows this ..... See Bill von for some expert insights In short: Right now, there is no working story to convert RDLC into Reporting Se

objective c - Downloading HTML string into an NSString or Swift String variable in iOS -

optional titles How to download a web page data in Objective-C How to download web page data in Swift? Save the HTML pages in an NSString Save the HTML pages in an NSString Blockquote> How do you get web page data and put data in the string? Something like this: NSString * webpagebody = GetWebPageData ("www.mysite.com/webpage.html"); In WebpageBode , I would like to see "html my web page html". swift 3.0 guard URL = url (string: "http : //www.example.com ") and {return} <{Html} = Swift 2.3 try html < // headl 'error' here} purpose-c NSString * url = @ "http://www.example.com"; NSURL * urlRequest = [NSURL URLWithString: url]; NSError * err = Zero; NSString * html = [NSString stringWithContentsOfURL: urlRequest Encoding: NSUTF8StringEncoding Error: & amp; Err]; If (mistake) {// handle}

jquery - jCarousel not working in IE8 -

I am trying to do this work for the last hour, but I can not do it for my life, so I I thought I would ask here I have this code: & lt; Ul id = "myCarousel" & gt; & Lt;% foreach (different dates in the login date) {%> & Lt; Li & gt; & Lt; Div style = "text-align: center; width: 60px;" & Gt; & Lt; Span class = "headerSpan" id = "day_ & lt;% = date.ToString (" dd-MM-yyyy ")%>" & Gt; ABC & lt; / Span & gt; & Lt; / Div & gt; & Lt; Input class = "time input narrow" type = "text" id = "time_"; date = date.ToString ("dd-MM-yyyy")% & gt; /> & Lt; Input class = "subsInput narrow" type = "text" id = "subs_"; date = date.ToString ("dd-MM-yyyy")% & gt; /> & Lt; / Li & gt; & Lt;%}% & gt; & Lt; / Ul & gt; & Lt; Script type = "text / javascript"

wpf - Using a DrawingImage as Icon for Multiple MenuItems -

I have some icon resources because DrawingImage s is composed of many GeometryDrawing < / Code> s I have the file menu item s and toolbar buttons that use these images through the resource binding on the MenuItem.Icon . Unfortunately, only shows an icon from menu s I'm sure that you have many DrawingImage resources in many MenuItem.Icon (or something else for that matter), but I do not know an option I do not like to duplicate the drawing resource, but if I think that I am also looks like. You assign an image control to the icon property and set DrawingImage in the picture. Source Property In XAML: & lt; MenuItem & gt; & Lt; MenuItem.Icon & gt; & Lt; Image Source = "{StaticResource myDrawingImage}" /> & Lt; /MenuItem.Icon> & Lt ;! - Everything else - & gt; & Lt; / MenuItem & gt; C #: menuItem.Icon = new Image () {source = (ImageSource) resource ["myDrawingImage"]};

asp.net - Setting selectedvalue for a dropdownlist in GridView -

I have a dropdown list in Gridview and I am compiling a data source in Gridview. Although all record dropdown prices are not selected properly displayed I have a dropdown list in Gridview in ASP.net & Lt;% # bind ("Country")% & gt; How to set it up Thank you You can hook up to the Grid view in the Route DataAbout event, Get control and set price. Secure Zero GridView_RowData Bound (Object Sender, GridViewViewArg E) {var Dropdown List = E.RO. Drop Controll ("YOUR_DROP_DOWN") as dropdown list; drop down list. Selected index = SET_VALUE_HERE; }

.net - Custom RoleProvider with MVC 2.0 -

I have a custom subscription and role provider that I am installing in an application. ASP I use the same providers in the webforms in the net and when the app is compiled and moved, the web The providers are started due to references given in the config. When I take it to MVC and apply break points to these "starting" methods for these sections, there are no break hits An oddity: If I use "[Author (roles =" Maroli "]]" The process within a controller and hit that the action goes to the Roleprovider and automatically calls "GetRolesForUser" But still never hit start. This is an issue because I need some of the varibles set out before calling any type of approach. I know that I can directly call "Start", but it would have been thought that it is automatically in ASP webforms. Do I have to start them manually in MVC or am I missing something? To consider some things, first subscription and role providers are stable an