Posts

Showing posts from April, 2015

arrays - How to find all methods in the .NET framework that accept or return a specific type? -

This is probably a stupid question, but I do not have any answer yet. I should know if there is a method or technique that gives all the methods in the .NET framework that accepts or returns a particular type. Example: I would like to search all the methods in the NAT framework which returns the arrays; I would like to search all the methods in the .NET Framework which accepts the array as a parameter. Note: I tried the object explorer in Visual Studio, but it seems that the type of thing I want is not inspecting each parameter It takes time to search through all the classes and their methods. Use reflections with the same (using all, and then) all sections and Can calculate their methods, and can get. You can find a simple example (this is not to deal with it, it is a different story; should be helpful).

C# Events handling problem for base and derived classes -

I have this case where I am creating 2 different event handlers in a base class and subscribing to them according to quotes Yes Chart Classes The problem I am having is that the first membership is cured for the first instance, but no lower membership is executed. I've included an example of 2 different handlers, quotes and charts, quotes execute for the first time without any problems, but charts are not triggered when the data is received. public intangible class MyBaseClass {protected Virtual Zero RaiseOnQuoteData (string item) {} Protected Virtual Zero RaiseOnChartData {string item} {} zero OnDataReceived (object sender , DataEventArgs e) {if (e.Item == "Statement") RaiseOnQuoteData (e.Item); And if (E. ITEM == "Chart") Raisen Chartadata (E. Items); }} Excerpt and Chart Class: Public class quote: MyBaseClass {public event eventhandler & lt; DataEventArgs & LT; QuoteRecord & gt; & Gt; OnQuoteData; Protected override zero RaiseOn...

openid - DotNetOpenAuth I Need Send Long string in FetchResponse -

Invalid URI: When I send long string in FetchResponse Execution Execution Invalid URI: Uri string is too long. AX, or any other open-end extension, is not designed to run large payloads. If you have an image or other big binary data to transmit, then it is better that the image can be accessed through the URL and then transmitting the URL to the URL.

Sending out twitter retweets with Python -

I wanted to know that it is possible - I want to use Python so that every tweet sent to each person Can change If so, how can I apply it? Unfortunately, not yet supports Twitter You have to make that call yourself directly (using a direct call on the API_ofTech URL) or implementing the patch to add support. You are better with using; Quick and dirty examples: import tweepy auth = tweepy, read an easy retitude (ID) method for redo. BasicAuthHandler ("user name", "password") api = tweepy.API (auth): api.retweet (status.id) This will be retired from the someuser EDIT: Twitter no longer accepts BasicAuth authentication, and you have to use it to receive authorization token OAuth authentication By changing the above example to use Exchange OAuth, I will have to withdraw from the retweet API point Was trying, see for a detailed tutorial.

in jquery ui dialog, how can i change the color / contract behind a single modal dialogs -

By using , brown in background colors (I think it is being operated by my subject roller). For a specific modal dialogue, I want to get the background darker than the default with the default options. More importantly, I can change the shading on the background screen while loading a specific dialog. In this case, I do not want to change the CSS of my Theme Roller CSS because I want to apply only on a specific page. Can you create the following place on your special page: thus overriding the background & lt; Style & gt; .ui-widget-overlay {background: url ("images / ui-bg_flat_0_aaaaaa_40x100.png") Repeat-X scrolling 50% 50% #AAAAAA; Opacity: 0.3; } & Lt; / Style & gt; Just adjust the opacity to the level you want and for IE you may also need to modify the image .. I hope you I understand ...

cocoa - NSOutlineView with transparent field editor -

I am working with NSOutlineView located on an HUD panel. I have configured it so that it can not drag its background. As long as I do not double click to edit a cell, everything looks fine, the field editor pulls its background and focus ring, which completely ruins the entire user experience. I am doing this in the subclass of NSTextFieldCell: - (NSText *) SetUpFieldEditorAttributes: (NSText *) textObj {NSText * text = [Super SetupFieldedAditatorAttivate: Textob]; [Text Setdrivebackground: Yes]; [Text setbackgram color: [Enkolar dark gray color]]; Return text; } If I use setDrawsBackground: No, it is completely ignored and I get a white background. My solution is very far from being good because I have the alpha component of color Can not touch (if I do this, then the field editor will use the second color as the background), but at least I do not get a white background. I am thinking that there is a real solution to this problem. Do I have to give my own field editor? i...

azure - CloudQueueClient.ResponseReceived Event broken? -

I am trying to create an event operated AZUR queue where every time a message is put in Azure, the queue. With AzureXplorer, I see that the messages are correctly placed in the blue queue but the CloudUQEElient Response reaisewood event never fire. I am using blue V1.4. This is the code from my worker role: Public class workers: Roll EntryPoint {public override zero () {while (true) {thread. Sleep (10000); }} Public Override Bull Onstart () {// Set the maximum number of concurrent connections ServicePointManager.DefaultConnectionLimit = 12; Var queuDataSource = new AzureQueueDataSource (); QueuDataSource.GetCloudQueueClient (). ResponseReceived + = new event handler & lt; ResponseReceivedEventArgs & gt; (Received Varkarol_published); // Info about handling configuration changes See the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357. Return basis.onstart (); } Received zero workarroll_with reference (object sender, response reasVEVE ARGS e) {var i = 1; />...

Stop image repeating after viewing all list in jQuery Carousel in Wordpress -

The nextgen-jquery-carousel plugin to display a list of images horizontally in WordPress. I want the carousel to stop browsing from the beginning after seeing the list. Can i do that For example, I like an arrow to hide after seeing all the images. Is this plugin using? If so, you can see that it will show you all the parameters you can set. It seems that you want to use the "wrap" parameter. If you apply jCarousel, you will use the "Loop" parameter.

wordpress - How to get post_id from post_meta -

हम post_id से post_meta से कैसे प्राप्त कर सकते हैं Meta_key , , मुझे post_id से post_meta प्राप्त करना है जहां meta_key है: _wp_page_template और meta_value my_page_template.php चाहें तो कुछ मदद कृपया। धन्यवाद इसे अपने functions.php में रखें और जब आप चाहें तब कॉल करें function getIdFromMeta ($ meta_key, $ meta_value) { वैश्विक $ wpdb; $ Pid = $ wpdb- & gt; get_var ($ wpdb- & gt; तैयार ("SELECT post_id से $ wpdb- & gt; पोस्टमेटा WHERE meta_value = '$ meta_value' और meta_key = '$ meta_key' ORDER द्वारा पोस्ट_id DESC")); अगर ($ pid! = '') $ Pid लौटाएं; दूसरा झूठी वापसी; } आशा है कि यह मदद करता है

Embed widget in android activity - not responding -

I am trying to create a home screen. I have got the widget to show the display but I have some kind of Need to send information, so it will start. Maybe me AndroidManifest.xml AndroidManifest.xml: & lt; Manifest xmlns: android = "http: //schemas.android.com/apk/res/android" package = "com.Fredrik" android: versionCode = "1" Android: versionName = "1.0" & gt; & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Application Android: Icon = "@ Drable / Icon" Android: label = "@ string / app_name" & gt; & Lt; Activity Android: name = "Homescreen" Android: label = "@ string / app_name" Android: launchMode = "Single instance" Android: stateNotNeeded = "true" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "and...

java - How to write a fallback mechanism that saves entities that weren't successfully saved the first time -

I am trying to write a mechanism that will manage my saved in DB operation. I have a list of server objects, it overlaps them and saves everyone. Now, if they fail for some strange reason (exception) then they save them in the other list, which every 5 seconds the timer tries to save them again. Then I have a locking problem, which I can solve with any other boolean. My function is to protect the object lost me: private void SaveLostDeals () {synchronized (unsavedDeals) {if (unsaved) (To) ( ) (for (DealBean unsavedDeal: unsavedDeals) {boolean successfully unsaved were = report translates (Shela, false, false); if (successfully saved) deals unsaved {. extracted (saved without saving);}} }}} and my report delays () method is being called for regular reports and lost deals For the report: Try {...} Hold (Hibernate Expression E) {... if (fallback) synchronized (unsaved Dell) {unsavedDeals.add (deal);} Session.getTransaction (). Rollback ();} Finally {....} Now, wh...

Python inheritance problem -

I am making a game, and I have some problems ... I have a function that loads the map (Usually when the player collides with a gate). I have two doors and two maps (one gate on each map) when I will run on one door, the second map is full, when I walk through the gate of that map, the first map loads. I already have a tree on the map. Everything is fine till I click on that tree. This is very strange because I do not have anything that handles it! Nothing should be done! And in fact, nothing happens, except that when I try to withdraw from other maps it does not work! This error message I receive: traceback (most recent call final): file "guilds.py", line 820, & lt; Module & gt; Load_map (objekt.gate_path, objekt.name, False) file "guilds.py", line 287, load_map in NPC (o [1], o [3]) file "guilds.py", in line 147, __init__ creature. __int __ (self, position, name) type error: __init __ () takes 3 arguments (4 given) Therefore there is a...

What does MM stand for in git show --raw output for merge commits? -

मैं git शो का उत्पादन देख रहा हूं - numstat --shortstat --raw --pretty = medium -पी कमांड और देखें कि मर्ज के लिए आउटपुट अलग-अलग होता है यह वही है जो मुझे मिल रहा है: प्रतिबद्ध cec68e2b00d86357c18b576cbaed52cc1ea42a74 मर्ज: b2ea79c e4900df लेखक: jeresig & lt; jeresig@gmail.com> दिनांक: गुरु 9 दिसंबर 12:44:30 2010 -0500 https://github.com/csnover/jquery का csnover-bug5566 16 16 src / manipulation.js 76 56 परीक्षण / यूनिट / हेरफेर :: 100644 100644 100644 e09dd7e ... c592b7a ... 8d951b6 ... एमएम src / manipulation.js :: 100644 100644 100644 4805016 ... 8ee3688 ... 23ed898 ... एमएम परीक्षण / इकाई / हेरफेर.जेएस क्यों कोई अंतर जानकारी नहीं है और एमएम क्या खड़ा है? मैंने इस संशोधक को पहले नहीं देखा है। कोई अंतर जानकारी नहीं है क्योंकि - raw उस आउटपुट को दबा देता है (बेशक यह दस्तावेज़ीकरण से स्पष्ट नहीं है।) "कच्चे" आउटपुट को git diff-tree मैन पेज, अनुभागों में और दस्तावेज में दर्ज़ किया गया है। आपके उदाहरण में दो M s हैं क्योंकि यह दो माता-पिता के स...

Android: Reusing an activity stored as local variable in another activity -

itemprop = "text"> I have two activities in my Android 2.1 application. The first main activity, in which is the second setting setting, which offers settings to adjust the parameters used within the main. There is currently a setting activity within my main category. Class examples I read the settings from this example in Maine. See the public class applies the main activities. OnClickListener, View.OnTouchListener {secure setting settings; } The list of public category settings activity tools extends to the adapter {} , I have come to know that if my setting activity is already created, then only one continuous example To make sure: within // main.java: intent = intent (new, new) (this, settings.class); Intent.setFlags (Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); // Reuse this current settings Initial activity (intent); My problem is how can I tie it primarily with the local 'settings' member. Can someone start me as a quick example of how my lo...

chromium - Managing Multiple Chrome Profiles - OSX -

I am running as an app in OSX to start several instances of Chrome with a new personal folder: shell script "/ application / google \\ Chrome.app/Contents/MacOS/Google \\ Chrome - enabled-U-profile - user-data-diamond = / user / $ user / Library / App \\ Support / Google / Chrome Personal / gt / null2> and 1 & amp; " This is awesome - because I have the Cmd-tab in Chrome Examples Can I delete without cookies / cache etc? Problem: I would like to extend the script to overlap a big "2", "3", etc. on the Chrome icon for each instance in the Doc and CMD-tab popup so that I I can do the difference. Right now, I see that there is more than one chrome. IPax Any ideas about how to accomplish this? I'm also opening the icon to edit, though the Chrome 2.app icon does not affect the dock icon - because the dock icon comes from the original Chrome.app. UPDATE: The problem has been solved, how is it here: Copy "Google Chrom...

c++ - Overloading + Operator -

Debugger is giving me 'bad ptr' when I create a new string array in this constructor, but only when my overloading operator The method creates a new MyString object ... confused. Here's my constructor MyString :: MyString () {stringSize = 0; String cap = 16; String array = new four [string cap + 1]; Stringer [0] = '\ 0'; } This is my overloading operator method Mystring Operator + (Const four * Left Op, Constant Mistine and Writeup) {MyStream Results; // New object results are used to store results. Striggies = Stellen (left option) + WINDOWS. String sequence; // if the string does not fit into the array (if result.stringSize> result.stringCap) {delete} string array; Result.stringCap = (result.stringSize + 15) & amp; ~ 15; Result.stringArray = New Four [result.stringCap + 1]; } Strcpy (result.stringArray, leftOp); Dome (result stringierae, writeup string strings); Return result; } This is my copy constructor, which never gets to the debugger...

javascript - Can not get JSON object -

Hey, under this URL 1234 /? Fmt = json I'm making a Jason object like that surveyage = {question: $ ("# question"). Val (), Options: Option, Count: Calculation}; Var jsonString = JSON.stringify (Surveyors); And I'm trying to recover a json object via an AJAX call var url = "1234? Fmt = json"; $ .jax ({url: url, type: "get", datatype: 'jason', success: function (data) {$ ("# display"). Html (data);}}); How can I not display data? I have tried that if I cross the data type parameter and keep the others the same, then I can in some way get the JSON string, which I do not know. And I could not help but I noticed that there are a few similar problems instead of "Post" instead of "Post", why is it that it is right? Thanks Make sure your "callback url" 1234 /? Fmt = json only Try hard coding values ​​for example, and see if it works, then delete the code in your URL as output to your h...

javascript - Why $('#id').val() not working while document.getElementById('id').value works perfect? -

$ ('# id')। Val () = $ .cookie ("name"); - काम नहीं करता है, कोई भी परिवर्तन नहीं document.getElementById ('id')। Value = $ .cookie ("name"); - ठीक काम करता है क्यों? आप सीधे तत्वों के मूल्य तक नहीं पहुंच रहे हैं। आपके अभिव्यक्ति के बाएं हाथ की ओर एक शब्द है जो एक शाब्दिक मूल्यांकन करता है तो अभिव्यक्ति 5 = 10 की तरह कुछ है, जो स्पष्ट रूप से काम नहीं कर सकता है $ ('# id')। Val () = $ .cookie (" नाम "); वैल () अतिभारित है, और इसे एक तर्क देकर आप पुन: असाइन कर सकते हैं $ ('# id') .val ($ कुकी ( "नाम")।);

php - How do I refresh and remove some query on current URL -

मेरे वर्तमान यूआरएल का उदाहरण http://domain.com/category/health है -beauty /? सत्र = {% 22session_key% 22% 3 ए% 22df1eca3f79e122bd915651e5-1325102496% 22% 2C% 22uid% 22% 3 ए% 221,325,102,496% 22% 2C% 22expires% 22% 3A0% 2C% 22secret% 22% 3 ए% 229eb858d1fc7dda2b37be912282a41382% 22% 2C% 22base_domain% 22% 3A% 22domain.com% 22% 2C% 22 तक पहुंच% 22% 3 ए% 22193986783965592 | df1eca3f79e122bd915651e5-1325102496 | एनजे_यूसीएएमएमटी 2 6 एस 40QWBKw6-रीक% 22% 2C% 22sig% 22% 3A% 22a7304578c9e00c14ed8e5825e2c2837b% 22} सत्र फेसबुक से आ रहा है। अब मुझे वर्तमान यूआरएल को हटाने या रीफ्रेश करना है Http://domain.com/category/health-beauty/ मुझे बताएं। निम्नलिखित यूआरएल से क्वेरी स्ट्रिंग छीन लें और पृष्ठ को ताज़ा करें यदि (window.location.indexOf ('?')> Gt; -1 ) {Window.location = window.location.substr (0, window.location.indexOf ('?')); } इसके अलावा, अगर आप इसे php में करना चाहते हैं $ uri = $ _SERVER ['REQUEST_URI']; अगर (स्ट्रॉप्स ($ uri,...

android - How to know which version of ADT we are using in eclipse? -

Can anyone tell me what version of ADT plugin I am using in Eclipse? What version of Android SDK are you using? Please tell me that I'm new to Android. ( Windows ) Eclipse Go to menu Help>> About Eclipse ( for Mac ) About Eclips in Help Menu Go to Eclipse next to the Apple symbol located at the top. ( for Mac ) Go to Eclipse> About Eclipse A window opens and clicking on the green Android robot icon here. Opens the next Winodw in which you can find the version of Android ADT. and for SDK Veerson: Eclipse menu window Go to & gt; & gt; Android SDK and AVD Manager A window opens, and in this selection, the installed package will show you all about SDK Information.

Installing Gitorious - rake gems:install aborted -

Follow the instructions for when trying to run rack gems: Install me the following The trace is received: gitorious] $ sudo / opt / ruby-enterprise / bin / rake gems: install --trace (/ var / www / html / gitorious) rack aborted! Bundler Some Guys could not be found Did you play 'Bundle Install'? /var/www/html/gitorious/config/../config/preinitializer.rb:18 /var/www/html/gitorious/config/boot.rb:28:in `Load '/ var / www / html / gitorious /config/boot.rb:28:in 'preinitialize' /var/www/html/gitorious/config/boot.rb:10:in 'boot!' /var/www/html/gitorious/config/boot.rb:123 /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require '/ opt / ruby ​​enterprise / lib / dark red / site_ruby / 1.8 / rubygems / custom_require.rb: 36: need for ` '/ var / www / html / gitorious / Rakefile: 4 / opt / ruby-enterprise / lib / ruby ​​/ gems / 1.8 / gems / rake -0.8.7 / lib / rake.rb: 2383: `load '/opt/ruby-enterpr...

python - django form custom widget for a "ListField" and displaying a list -

django-ldapdb का उपयोग कर, मैं अपने ldap निर्देशिका में संग्रहीत उपयोगकर्ता एसएसपी कुंजी को प्रबंधित करने की कोशिश कर रहा हूं। मेरे पास मुख्य समस्या यह है कि जब मॉडल मॉडल पर कोई प्रदर्शित होता है, तो यह एक सूची के साथ एक सूची को एक यूनिकोड स्ट्रिंग के रूप में प्रदान करता है जब वास्तविक डेटाटाइप ListField.to_python () द्वारा लौटाया जाता है तो एक सूची है। कस्टम विजेट को लिखने का सबसे अच्छा तरीका क्या है जो उस सूची को इनपुट बॉक्स या किसी कस्टम HTML में सेट कर देगा? अंतिम लक्ष्य ऐसा कुछ है जो बहुत समान दिखता है ताकि उपयोगकर्ता आसानी से नई एसएसबी कुंजी जोड़ सके या मौजूदा लोगों को हटा सके। आम की उस स्क्रीनशॉट की तरह मौजूदा सामान केवल एसएसआई कुंजी फिंगरप्रिंट और कच्ची कुंजी के बजाय "टिप्पणी" या ईमेल को प्रदर्शित करेगा। किसी भी व्यक्ति को बोनस अंक जो कुछ jQuery को हुक करने का तरीका समझ सकता है और इसे डीजेंगो एडमिन इनलाइन सुंदर (Google django jquery admin) के समान बनाएं और djangoadvent लेख पर क्लिक करें। इसमें पर्याप्त लिंक नहीं हैं I)। आप इस तरह से कुछ कैसे लागू करेंगे? ...

ubuntu - adding string object to gArray -

I want to add some string object to GRE but when I read the API manual g_array_new () , It wants the size of the element to be added while creating the array, but different string objects have different lengths, so how can I cope with this issue? Regards, iSight I believe, the size of the element is: pointer for a string.

Python subprocess never exits and keeps giving empty strings in output -

Therefore, I am writing that there is a problem using the subprocess for Python app. To clarify the problem, I wrote a small script that copies my problem very well. Import from __future__ import print_function from the importation of sub process selection as SP = sp.Popen (['ls'], Stdout = sp.PIPE, stderr = sp.PIPE, stdin = Sp.PIPE) p.stdin.close () while p.returncode is none or p.stdout.closed or p.stderr.closed: # print ('returncode available_readers = select ([p.stdout, p.stderr], [], [], 2.0) [0] For available_readers in r: print (r.read (1)) # output_display.insert Of course, we all know that the Ls Some of the content can be stdout (or stderr ), but the above script is never present. That you above I can see the last line (comment) in the script, I put the content in a vaccine text component by subpublishing. Therefore, I can not use the .communicate and other blocked calls like I That I need to command to run, I take a long time and I need to show...

ipad - UISplitViewController Render problem after using UIPopoverButton -

Image
I started with the UISplitViewController template in Xcode 4, and a UIImageView that covers the entire details ViewController. When I run the project I present the image and the view properly. If I rotate the device, it renders the correct also, but if I suppress the popup button in the image and then rotate the device The image is rendered above the rootview. I 're trying to reproduce the bug you are experiencing, but Without the fruit you can add to the visual image and how do you set the frame, providing information about it? A potential solution I'm thinking is the setting: self.view clip tubons = yes; A bug and tell What is wrong.

jquery - Issue with slideDown in IE -

मेरे पास कोड की यह पंक्ति है: & lt; SCRIPT type = text / javascript & gt; $ (document) .ready (function () {$ ( "# StraightFoods") अगले ( "div.menu_body") slideDown ( "धीमी");।।}); & lt; / script & gt; यहां अनुभाग के लिए HTML है: & lt; div class = "menu_head" id = "StraightFoods" title = "सीधे फूड्स" & gt; & Lt; div title = "# d99043" id = "straightfoods_colour" & gt; & lt; / div & gt; & Lt; a rel = "# d99043" href = "http: //URL/Category/0/Straight_Foods.html" & gt; सीधे फूड्स & lt; / a & gt; & Lt; / div & gt; & Lt; div class = "menu_body" & gt; & Lt; div class = "leftbox_item" id = "सूरजमुखी सीड्स" & gt; & Lt; a rel = "# d99043" href = "http: //URL/Category/0/Straight_Foods~Sunflower_Seeds.html" & gt; & lt; span शैली = "रंग: # d...

php - Integrating Wordpress with my website -

I would like to create a website which allows users to integrate / integrate their WordPress account on their website. Therefore, they can manage their blog from their website. Is this possible? I have a website with users, but I do not want to create a blogging system. That's the reason I'm thinking that if WordPress will help. As WordPress 3.0, you have the ability to create a network of sites (multizite) This article is a guide for creating a network. It is similar to creating your own personal version of wordpress.com. - Maybe?

Magento - make the field "company" required -

for a B2B Magren site, when a new customer is entered, then I need the field "company" Want to do Which file should I edit? Thank you very much. You should add it to your side on the server side If you use Magento Entreprise Edition , you can only edit the company property by back end, and set it to "Required" . If you are working with Community Edition , you must manually change this value with SQL this eav_attribute is in the table, attribute_code is company and you just is_required to 1 .

objective c - Programmatically initiate Conference call on IPhone -

Is there a conference call program in the iPhone? I want to be able to call A and B, add both, and then let go of yourself and the two parties continue to talk. Is this possible? Not possible an app can call a single phone number, -openURL: Through the method UIApplication , but once it does, it takes you to the background and the phone goes to the app. In addition to this, it seems as if you violate the section of the app store, 22.6 , Guidelines: Unique or mischief phone Applications that enable call or SMS / MMS messaging will be rejected

Regex only numbers and dot or comma -

मुझे मान्यता दो या एक संख्या के लिए एक नियमित अभिव्यक्ति की आवश्यकता है, फिर , या । और फिर दो या एक नंबर। इसलिए, ये मान्य निविष्टियाँ हैं: 11, 11 11.11 1.1 1,1 \ d {1,2} [ संपादित करें: नई आवश्यकताओं (टिप्पणियों) को पूरा करने के लिए अद्यतन;) संपादित करें: ब्रायन के अनुसार अनावश्यक qtfier निकालें ^ [0- 9] {1,2} ([,।] [0- 9] {1,2}) $ $

JSON Beautifier Library for Java -

I want to format the string with JSON data using Java. Does anyone know of an open source library for this? Assuming you have an existing JSON string, it can do it for you: ObjectMapper objectMapper = new ObjectMapper (); ObjectMapper.configure (SerializationConfig.Feature.INDENT_OUTPUT, true); String OriginalGessen = ... Jason Node Tree = ObjectMaper Readry (Original Jason); String formattedjson = objectmapper.litewealeststring (tree);

c# - MEF Best practices: Where in the application I create container and where to call Compose()? -

I have decided to use MEF for a plugin pattern and it is not easy to choose MEF and at all No intrusion. I looked at the samples and found it very easy to work with them. However, as soon as the implementation started, I started struggling with composition. Suppose I have a class in which it has [ImportMany] on one of its assets. I have seen that in all instances, they make the container in the category that has imported (let's call it composable ) and basically make the class themselves this may be fine for example, but of course the plugin can be found to know how to compute is. I can happily make a single container and access it in my compose, but again the composer is able to call on type () and I am not happy with it because it is like a dependency injection scenario where the square actively solves () on the container so I not it Just want to use for the bus service location. To make matters worse, I am using Windsor Castle for D. and I am not sure how ...

silverlight - Embedded object in RIA POCO? -

सभी सभी silverlight buffs के लिए त्वरित प्रश्न .. मुझे कस्टम POCO ऑब्जेक्ट का पर्दाफाश करने की आवश्यकता है रिया सेवाओं के माध्यम से .. अच्छी तरह से, मैं शायद एक वेनिला वेब सेवा पर इसे करने के साथ दूर हो सकता है .. तो मैं दिमाग नहीं है अगर आप मुझे एक गैर आरआईए सेवा पर यह करने के लिए कहते हैं यह एक है इस तरह से बिट: सार्वजनिक आंशिक वर्ग बंदर {// आदि .. // यह एक इकाई ढांचा इकाई है} सार्वजनिक वर्ग MonkeyCollection {// यह POCO सार्वजनिक स्ट्रिंग है MonthName {get; सेट; } सार्वजनिक बंदर MonkeyForMonth1 {प्राप्त करें; सेट; } सार्वजनिक बंदर MonkeyForMonth2 {get; सेट; } // आरआईए सेवाओं को एक "कुंजी" [कुंजी] सार्वजनिक int आईडी की कमी के बारे में चुप रहें; सेट; }} // मेरी सेवा वर्ग में सार्वजनिक आईएनआईमेरेबल & lt; MonkeyCollection & gt; GetMonkeys () {// मक्खन जैसी डेटा मंथन} यह POCO का संग्रह देता है, लेकिन जो वापस नहीं आता वह एम्बेडेड ऑब्जेक्ट्स (बंदर) है। यानी यह प्राइमिटिव (महीना नाम, आईडी) देता है, लेकिन कस्टम ऑब्जेक्ट नहीं .. और वास्तव में दृश्य स्टूडियो ...

iphone - show hide tab in uitabview programatically -

How to hide some tab / s oprogramatically in the uitabview application How to hide some tabs To modify FinishLaunchingWithOptions, for example (BOOL) Application: (UIApplication *) Application FinishLaunchingWithOptions: (NSDictionary *) launchOptions { // launch an override point for optimization after app. // Add the current view of the tab bar controller as a subview of the window [auto. Windows Aid Sewiewewe: Tab Bark Controller. See]; [Self. Windows and knowledgeable]; Yes return; } I for Tab controller. View controller in UIViewController * v) {UIViewController * Vc = v; If ([vc isKindOfClass: [First ViewController class]]) {FirstViewController * myViewController = vc; Vc.view.hidden = Yes; }} but it removes the contents of this view, but how can the first named tab still remove it? Best regards Use the hidden property of UIView as the UIView ,

mongodb - Good solution for tagging in Rails with MongoID -

What are the best solutions for Tagging in Rail with MongoID? It seems that this is really simple, just add a hash or array to a document, but I'm not sure that this is the best way. Maybe some gem? Or a simple move with nested documents? For now, I used a very simple approach, which works very well : Just add an array - field #app / model / image Monogead in RB Class image :: Documentation includes: Mongaid :: Timestamp Field: Message, Type = & gt; String field: tag, type = & gt; Array def self.images_for tag image.any_in (: tag => [tag]) end # routes.rb match "tag /: tag" = & gt; "Images # tag" # / app / controller / image_controllerRb Classroom Image Controller & lt; ApplicationController # GET / Tag # GET /tag.xml def tag @images = Image.images_for params [: tags] response_to do | Format | Format.html {Render "Index"} format.xml {Render: xml = & gt; @images} End End This works, but I still have some doubt...

android - How to open AlertDialog from preference screen? -

मेरी गतिविधि नीचे है import android.app.AlertDialog; आयात करें android.content.DialogInterface; Import android.content.Intent; आयात करें android.content.SharedPreferences; आयात करें android.content.SharedPreferences.OnSharedPreferenceChangeListener; Importroid.os.Bundle; आयात एंड्रॉइड। प्रीफ़्रेंस। आयात करें android.preference.Preference.OnPreferenceChangeListener; आयात करें android.preference.PreferenceActivity; आयात करें एंड्रॉइड। सार्वजनिक श्रेणी के स्थानों सेवासेटिंग्स प्राथमिकता उपकरण लागू करता है OnPreferenceChangeListener, OnSharedPreferenceChangeListener {@Override सार्वजनिक शून्य पर क्रिएट (बंडल सहेजे गए इन्स्टैंसस्टेट) {super.onCreate (SavedInstanceState); addPreferencesFromResource (R.xml.locationservice); // PreferenceManager.setDefaultValues ​​(अधिसूचना सेटिंग्स। इस, R.xml.notification, सच); } @ ओवरराइड पब्लिक बूलियन ऑनप्रियरेंस चेंज (प्राथमिकता वरीयता, ऑब्जेक्ट न्यूएवल्यूज़) {// टोडो ऑटो-जनरेटेड विधि स्टब सिस्टम। आउट.प्रिंटलाइन ("वरीयता बदले" + नया वेल्यू...

MVS C++ error : string subscript out of range -

I want to solve the following: There was a text file "pesel.txt" given , Which includes 150 national identities, each line has a national identity, which is an 11-digit number. The first two digits from left to the last year, in which a person was born, the next two digits fixed month and the next two scheduled days. To reduce: points 0-1 = year points 2-3 = month digits 4-5 = day digits 6-11 = set another, which is not important here I need to read the file, check how many people were born in December. I'm trying to do this in the following way: After reading each row On each line, I check whether the third letter in the string is equal to 1 And if the fourth letter is equal to 2, then yes, I increase the pay scale, which is my match for those born in December, and the next loop is executed Here is the code: int _tmain (int argc, _TCHAR * argv []) {ifstream ("C: \\ Cuba \\ Study and Boat \" Matra XDDD \ INFA \\ 1 \\ Dane_PR \\ pesel.txt ...

Excel Macro : How to get notification when a VBA script stops execution -

I am running a macro on a remote PC which executes every 5 seconds throughout the day. Now I want to be informed or notified via email if something goes wrong and macro prevents execution. How can I do this? MySub () error occurred on 'geton error' handler here '...' for a expected error if some WentWrong = true error then Rice number: = My arreber number, source: = "MySub", _ Description: = "This thing went wrong." Now Will go to the errorHandler end if 'More work was done here ... ExitProcedure: Error resume next Next' Cleanup code goes here ... Exit the sub error handler: 'If any error occurs (approximate or No), then the following will be executed. Call SendEmailNotification (_ Recipient: = "you@there.com", _ Subject: = "Something went wrong.", _ Message :: Error number and vbCrLf and error. Description and vbCrLf and Err.Source) Error management goes here ... Resume Exprro Processed and All To sen...

Allowing WPF application to write to an XML file -

I have developed a WPF application and have established a deployment project. The installer works perfectly and does so, as long as it does not try to enter an XML file. This file acts as a XML database for the action and is included in the application folders. Where am I going wrong. Do I need to assign some privileges to a particular No, it is wrong to comment with the app. You have to read the documentation. You are rejecting to write in the application folder since Windows NT4 or something there are special folders to write in, and to get them Is a method for Because the app folder on general modern windows writes securely for normal users, it should be. This is the program folder. Move your database to the sub-folder in the Epidata folder for your database. Get started for the document. Read the Windows Guideline for programming for Windows platforms. There are several "are" and "not there" before writing in the application folder is one of ...

testing - perl selenium: Test::Exception, proper usage and good code example? -

In the Selenium IDE, the code template installed by the Pearl driver / format contains . Use "post-text" itemprop = "text"> test :: exceptions; Test :: Exception should be used in all my files? So far, I did not use any method of it and my tests are still running fine (I usually Khus- path test). Now I've come up with a possible use I noted that selenium object sometimes dies, if you do not get the page or if there Loketetr wrong, etc. In many cases I want to continue my tests, i.e. selenium should not die, and continue to work on one page. Can this be a fair use of a test :: exception method? Will I try: Trying to combine it with Tiny? Here's a little helpful method that I've written. Life_ and Method Test :: falls under exception. sub-verification_text_key {my ($ sel, $ text) = @_; # $ Cell - selenium object # $ text || = 'I think'; # Some text I am searching for the page to life (sub $ {$ my $ found = $ sel- & gt...

flash debug: flex app compiled with eclipse fdt doesn't show line numbers on errors -

I have Firefox 3.6.15 with Flash debug version 10.3. Whenever an error occurs, there is a popup error and stack trace but it does not have the number of cards in the stack trace, which makes it more difficult to debug it. How to configure any idea how to actually show line numbers? I think it may be related to how I compile my Flash application? (I think!) I use Eclipse FDT 4.2 for compilation and I add the following compiler flags: -debug = true -compiler.verbose-stacktraces I think these parameters should be sufficient, but I could be wrong. Thank you! I'm afraid this is a limit on the compiler. Sometimes you will get errors without line numbers because the error comes from SWC (which is already compiled with the code) or your error is related to some, which is difficult to obtain the line number (for example CSS Syntax error). The good news is, Adobe is currently re-exploiting the compiler and should be better in the upcoming versions of Flex.

objective c - Get Speed of UISwipeGestureRecognizer - Custom Gesture Recogniser? -

I have an app that plays video I want to control the video by gesture i. Swipe left-to-right-to-left-right-for-right swipe , but it was when this project was but there was no idea. Now I sit down and sign it that I do not know. The respondent said that I may need to create a custom gesture identifier to achieve the speed of the blow, I want to speed up the speed of the video. Any ideas how would I go about it? I have never created or configured a gesture identifier before, so I do not know how to go about it? What I really want is a way of handling start and end methods, I think I can get a timer running between two and do the work of X end and expert. To calculate Y, y will help by any help, code-samples and preferences. Cheers One way to touch time difference and and touched and . Using these two numbers, you can calculate "pixels per second", or similar. Then you can use the magnitude of the result to act as a coefficient of motion of the video.

mysql - Scalable status updates / private messaging for a rails social network app -

I am trying to learn more about scalability for ROR. I have a basic social networking app that is currently available Using MySQL to store everything (user relationship, status update, private message) NoSQL database is ideal sound but are they able to effectively view / retain the relationship RDBS? Or a hybrid solution would be more ideal (only store status updates and private messages in NoSec DB) How will an AMQP solution fit for status updates? Do I have the process of reading from the status updates queue and it is going to expel all followers / friends (XMPP?)? It looks like as if it can turn into obstacles, as long as I keep increasing threads / processes to stop the thread. Or should I just take the Twitter route and stick MySQL? Any thoughts / suggestions will be helpful thanks. Someone else is wandering in the same path, there is a Ruby on the Railway Open Source Project It has already addressed many of these issues. In addition, if your application is b...

Android listview multiple choice -

How to obtain selected multichoice list view data I have a list view with multiple choices and I selected listview in string array I want to store the item. Can someone direct me how I store the selected list of list observation in string array? SparseBooleanArray selected items = lv.getCheckedItemPositions (); Int id1 = lv.getCheckedItemPosition (); Toast. Make Text (getApplicationContext (), "" + id1, Toast. LNNGHIHORT) Show (); For (; I & lt; i = 0 int lv_arr.length; i ++). {If (selectedItems.get (i)) {String [] GetString = (string) lv.getAdapter () GetItem (selectedItems.keyAt (i)); Println ("+" + GetString); }} Hey, I've used the string to save all checked items from the list Used. See the code below: Import android.app.activity; Importroid.os.Bundle; Import android.util.log; Import android.util.SparseBooleanArray; Import android.view.View; Import android.widget.AdapterView; Import android.widget.AdapterView.OnItemClickListener; Import a...

c# - How to find caller assembly name in unmanaged c++ dll -

I have an unmanaged C ++ DLL I have unmanaged this from C # (pure 3.5) Calling the external methods of DLL I'm calling Witch C # assembly is my unmanaged C + DLL C ++ DLL (at least, assembly name ) And of course, I do not want to give any additional parameters to the methods . Thanks in advance This requires stack walk in managed code as well As code works, the code access protection applies as well. Do not work so well when there are native stack frames to run, you can try StackWalk64 () in your original code. There is no possibility of working expensive and well, especially. Be careful with the optimization options in 4.0 where the CLR does not mimic the module too many to reduce the frame indicator. Do not do that, I will say. It is so easy to solve this by giving an additional argument to the managed code.

How can I drag a imagebutton in android -

I am using ImageButton in my application. I am responding to touch events using onTouch event and onTouchListener after the touch event is complete I just display ImageButton in the target location Instead, I wanted to show it like dragging it to ImageButton instead. Anyone can tell me in the right direction. There are two very good examples of how you can use touch events on anyone around the screen to move a similar view

Django Celery and multiple databases (Celery, Django and RabbitMQ) -

Is it possible to set a separate database to experiment with the demo celeri? I have a project with many databases in the configuration and do not want the DJGongoCalary to use the default one. I would be good if I can still use the Digenga sealery admin pages and read the results stored in this separate database): It has not been specifically tested with celery, but if it does not work for some reason, then this druggo- A bug in Elri (or Dijanco only) be fixed. Your router looks like this: Category Celery Rotter (object): "Root cellary model to isolate DB." APPS = (Model from 'Django', # combo. Transport Dozon, if you are using DJGO as message transport. DJ_LLIAS = 'Celery' def DB_Forad (self, model, ** signal): If Model. _meta.app_label in self.APPS: return self.DB_ILAS returns no Deaf DB_for_litet (self, model, ** sign): If the model._meta.app_label in itself. APPS: return self.DB_ILS return Return no DRF permission (self, Obj1, Obj2, *...

algorithm - Area of intersection of axis-aligned rectangles -

प्रत्येक आयत में इस तरह 4 डबल्स होते हैं: (x0, y0, x1, y1) किनारों एक्स और वाई अक्ष के समानांतर हैं वे बेतरतीब ढंग से रखा जाता है - वे किनारों पर छू सकते हैं, अतिव्यापी, या कोई संपर्क नहीं है मुझे उस क्षेत्र को खोजना होगा जो उनके ओवरलैप द्वारा बनाई गई है - कैनवास में सभी क्षेत्रफल जो एक से अधिक आयताकार "कवर" ( उदाहरण के लिए दो आयताकारों के साथ, यह चौराहे होगा) मुझे समझ में आता है कि मुझे स्वीप लाइन एल्गोरिदम का उपयोग करना होगा। क्या मुझे एक पेड़ की संरचना का उपयोग करना है? इस समस्या के लिए स्वीप लाइन एल्गोरिथ्म का उपयोग करने का सबसे आसान तरीका क्या है? पहले ब्लश पर ऐसा लगता है कि ओ (एन ^ 2) एल्गोरिथ्म सीधा होना चाहिए क्योंकि हम सिर्फ सभी जोड़ीदार बिंदुओं की जांच कर सकते हैं। हालांकि, यह दोहरी गिनती की समस्या पैदा करेगा, क्योंकि 3 अंकों के सभी बिंदुओं को 3 बार गिना जाएगा! यह महसूस करने के बाद, एक ओ (एन ^ 2) एल्गोरिथ्म अब मेरे लिए बुरा नहीं लग रहा है यदि आप एक तुच्छ ओ (एन ^ 2) एल्गोरिथ्म के बारे में सोच सकते हैं, तो कृपया पोस्ट करें। यहां एक ओ (एन ^ 2...

javascript - Highlight every other list element -

I have such a div:. How can I highlight every other list element in the div without the use of jQuery? The easiest way to perform this is with a CSS, for a compatible browser. Example: li: nth-child (even) {background: #CCC} li: nth-child (strange) {background: #FFF}

Mocking HttpSessionState in ASP.net for nunit testing -

I found the HTPassState and ASP.NM I am trying to write a test for an asp.net application and wondering if it is possible to start the session and if so, how? I currently use Rhino Mox and NewYet Gilbert, Maybe I'm too late for you, I am using MSPC, but I think these concepts are the same. I needed to duplicate many components of HTTPContacts in the controllers under test. I started with these following classes to copy essential components (for my purposes) in HTTTPtexbase. I filled only the necessary pieces within the classes. Your needs will vary according to your requirement in the controller. Once you understand the pattern, it is easy to add as needed. Public class MockHttpContext: HttpContextBase {Private Readonly HttpRequestBase _request = new MockHttpRequest (); Private Readonly HttpServerUtilityBase _server = New MockHttpServerUtilityBase (); Private HTTP://stressbook_session = new MockHttpSession (); Public override HttpRequestBase request {get {return _...

javascript - Removing a cookie from within a Chrome Extension -

I want to remove cookies (according to certain criteria) from within a Chrome extension. According to chrome.cookies.remove this field is the url (the URL associated with the cookie) and names (the name of the cookie to delete the). Now the following fields have one: name, value, domain, host, path, secure, httpOnly, session, expiration date, storeId but not url . How do I get the URL of a specific cookie, so that I can delete it? For my reference, a cookie looks like this: domain: "google.com" adi = 8 & lt; Snip & gt; U " " "" "" " After some lawsuits and errors, I get the URL , It works for everything (probably leaving the file): // ) function extrapolateUrlFromCookie (cookie) {var prefix = cookie.secure? "Https: //": "http: //"; If (cookie.domain.charAt (0) == ".") Prefix + = "www"; Return prefix + cookie.domain + cookie.path; }

php - How can I filter a MySQL result by the amount of words in a column? -

I am trying to filter the results of a MySQL query with the number of words within a table column. For example, there are 10 testimonials with my column ID, name, URL, testimonials, and five of those lines have a testimonial column with more than 100 words to create a certificate. How do I use a query to return only those testimonials columns that are less than 100 words? It's not that the way I did it, it's very Large, but ... SELECT * FROM table WHERE LENGTH (field) - LENGTH (Ripley (field, '', '')) + 1 & Lt; 100 It actually counts the spaces ... but it can be enough for you.

command line - compare my current directory to a predefined directory in unix -

I am trying to write a small script which will install the extension for use at present. However, If I do ssh in the box, I do not always want to see if I am in the right directory to install my extension. Instead, I will just run a command and in that command it checks the current working directory and then I predefine one of the comparison of that directory's end. For example, I install my extension, you have guessed it, extensions folder. Say I run pwd and it excludes /home/site.com/not_extensions_directory/ . Then the script will see that the current directory is not extensions , then I can kill the install and print a warning. The script will know with a better solution that I am not in the correct directory and then point to the user you "(yes / no) ? What would be the correct syntax for doing this on a Unix box (either solution)? Put it at the top of your script, replace / path / to / extensions with your extension folder. CURRENT_DIR = ...

c# - Custom Linq extension method for jqGrid select list -

I have a custom method to get a string that is used with search jqGrid for the selected lists is. Required string format ": all; value1: text1; value2: text2" I currently have the following method to get it in a reusable manner: public static string jqGridFilterSelectList & lt; TSource & gt; (This IQueryable & lt; TSource & gt; source & lt; function & lt; function of the & lt; source; expression; "," {string.Join (return., Source.Select (selector) .Distinct () toArray ()); } This works fine, but calls are required for it: string filteringcontrol list = service. Gate all user () JqGridFilterSelectList (x => X.User + ":" + x. Warmer); x = & gt; X.user + ":" + x.user I am not very happy with using a selector. I would like to convert it to 2 surcharges like this (pseudo code !!) // where we want the value and text of the selection list for the same public stable string, jqGridFilterSelectList ...

gnuplot histogram: How to put values on top of bars -

मेरे पास निम्न डेटा है: 1 3215 2 321 ... 31_60 59 60 + 32 मैं हिस्टोग्राम को ग्नुप्लॉट का उपयोग करना चाहूंगा और इसके ऊपर बार का मान डालूंगा। यहाँ हिस्टोग्राम बनाने की कोशिश करने वाला ग्नुप्लॉट कमांड है: सेट शैली डेटा हिस्टोग्राम सेट xtics 2: xtic (1) का उपयोग करते हुए साजिश 'file.dat' को घुमाएगी। क्या कोई मुझे बता सकता है कि कैसे मूल्यों को जोड़ने के लिए सलाखों के शीर्ष उत्पन्न? मुझे निम्नलिखित लिंक से संबंधित हिस्टोग्राम मिला (), लेकिन ठीक से यह क्या नहीं हुआ। कुछ नमूना डेटा फ़ाइल के रूप में Data.dat : 1 10 2 20 3 15 4 16 5 19 6 5 आप इस स्क्रिप्ट को बक्से और उसके ऊपर दिए गए बॉक्स के संबंधित मूल्य को प्रदर्शित करने के लिए चला सकते हैं: सेट बंद की गई साजिश 'डेटाडेट' बॉक्स के साथ यू 1: ($ 2 + 0.5): ($ 2) पैटर्न के साथ 1, Em> जहां टी वह 0.5 निर्दिष्ट करता है कि मान बॉक्स के ऊपर कितना है।

c# - use dateTimePIcker to set timer interval -

I want to use dateTimerPicker time format {mm: ss} and want to use it in timer.interval. means repeating dateTimePicker value and repeating it again. Any thoughts? Use this: timer. Interval = DateTime Picture Value.TimedFime millisecond

wordpress - Show/hide content of posts with jquery -

Using WordPress Loop and jquery, I am trying to show / hide the contents of the posts displayed. After some searches I have come to this conclusion. $ f (function () ($ F ("Portfolio-Dissacus"). Hover (function () {$ f (".change") Toggle (function () {$ F ('. Highlight') SlideUp ('sharp');}, function () {$ F ('Highlight'). Slidedown ('sharp');});});}); This works almost the first post works fine, but the second post expands the content of the first and second posts. And it does not stop showing / hiding Content is jumping! Odd stuff .. oh! Just saw that these "jumps" are incremental, starts with 1, then 2, then 3, ... Thanks in advance! (And sorry for any mistake in my English.) Ignore Edit: Here is HTML & lt; Div id = "portfolioscontent" & gt; & Lt; Div class = "portfolio-destaques" & gt; & Lt; P class = "destaques-data" & gt; 2010-03-10 & lt; / P...

android - ListView with rows containing a LinearLayout -

I am trying to implement a list using ListView, which has rows created with rows. This LinearLayout is made up of a checkbox and a textview. The name of the line layout is Task_list_Oro.xml: & Lt; TextView Android: id = "@ android: id / text1" Android: layout_width = "fill_parent" android: layout_height = "wrap_content" /> & Lt; / LinearLayout & gt; Then from my code, I can initialize this list: last string [] items_task = new string [] {"one", " Two "," three "}; SetListAdapter (New Arrayheader & lt; String & gt; (This, RLType_Cast_List_ImS, Items_task)); But then I get an error: Aradhyapter - You have to provide a resource ID for a text wave Then I will send textview Attempt to specify ID like this: setListAdapter (new array adapter & lt; string & gt; (this, RID.Text1, RL.Task_List_Lai, item_task )); but I did not find any resource error (R.id.text1 exists in R.java f...