Wednesday 15 September 2010

HTML valid way of tracking outbound links via Google Analytics? -


I'm using, and I'm tracking an outbound link, but I want my page to be valid .

This is the error that I am getting: There is no "ononic" attribute

HTML:

   

I have added this to my JavaScript embed file to track all outgoing links:

  $ (document) .ready (function () { $ ('A href = = http: no ("[href * =: //' + document.domain + ']"). Click (function () {pageTracker._trackPageview (' / out / '+ $ (This) .attr ("href"));});});  

So now my js embed file looks like this, I notice that I get $ (document) I call .ready (function) {At the beginning of both snippets, will they both go into one?

  $ (document) .ready (Function () {// opens a link in a separate window $ ('a [relay = "external"]'.) (Function () {window.open ($ (this) .attr ('href')) ; Return false;});}); $ (document) .ready (function () {$ ('a [href ^ = http]: no ("[href * =: //' + document.domain + '] ") '.) Click (function () {pageTracker._trackPageview (' / out / '+ $ (this) .attr (" href "));})}};  
< / Div>

Unless you are using some highly vague or ancient versions of HTML, you are probably using xhtml , Which is mamu Lee is sensitive and all low-case. It's called onclic .


asp.net - Having Issue with Azure Cloud Service Web Role that points to SQL Azure -


There is a strange problem in my web application when it is hosted on Azure, in fact this issue is that I have a page Which goes to the database and when my app's connection string indicates my SQL Ezur DB, I get an empty response for that particular page (by means of blank I mean that when you see the source, you can do anything Do not see). When I point to my normal SQL Server 2008 db that the page works fine.

Using Visual Studio on Development Server and Azure Development Server, I have no problem on the page,

Anyone know what's going on?

You need to set firewall rules to allow access to SQL Ezur.


android - How can I add event handling in each row in ListView -


I am making a cursor adapter to provide data for my ListView.

I want to show the data in a row of my list view to apply the bindView () method but at the end of my bound view, I add the clicker. But when I run it on the emulator, I do not see any print statement.

Can you please tell me how to add event handling in a row in the listview?

  View.setOnClickListener (New OnClickListener () {public void onClick (see v) {System.out.println ("an onclick event is occurring ....");}}); You can add OnItemClickListener to ListIview - not separate rows.  

  listView.setOnItemClickListener (new OnItemClickListener () {public void OnItemClick (adapter view & lt;? & Gt; arg0, view view, int arg2, long arg3) {Log D. ("tag", "clicked");}});  

Grouping multiple events in a single ics file (icalendar stream) -


According to RFC, I want to group multiple events in a single ICS file (iCalendar stream), but this can be done, however, according to

I do not know how to Can someone help me or give me an example?

Here RFC says:

However, many iCalendar objects stream together simultaneously iCalendar. The first line of the ICalendar object and the last line should be a pair of iCalendar object delimiter string. The following syntax for an iCalendar stream:

  icalstream = 1 * icalobject icalobject = "BEGIN" ":" "VCALENDAR" CRLF icalbody "END" ":" "VCALENDAR" CRLF  
  BEGIN: VCALENDAR Version: 2.0 PRODID: - // bobbin v0.1 // NONSGML iCal writer // N Kailsela: Gregorian method: Posted: VEVENT DTSTART: 20l0070lT080000Z DTEND: 20l0070lTll0000Z DTSTAMP: 20091130T213238Z UID: 1285935469767a7c7c1a9b3f0df8003a@yoursever.com Created: 20091130T213238Z Description: Example Event 1 Last-Modified: 20091130T213238Z Sequence: 0 Position: Fixed Summary: Example Event 1 TRANSP: Opaque End VEVENT Launch: VEVENT DTSTART: 20100701T120000Z DTEND: 20100701T130000Z DTSTAMP : 2009ll30T2l3238Z UID: 1285935469767a7c7c1a9b3f0df8003b@yoursever.com Created: 20,091,130 t 213238Z Description: example Event 2 final Revised: 20091130 T 213 238 Siiipi Isiii: 0 Location: Knfrmit Summary: Example Event 2 Tronspep: Opekyu Andः VEVENT and: Vsilender  

Copy it into a file and save it as events. And it most should open in Iklandr compatible applications eg Outlook 2007 Sunbird, ICL and more complex examples you present calendar before seeing the results to export to create an event in Google Calendar and Calendar or somewhere like icalshare.com You can try to download The file format is similar to e-mail encoding, in which it should be folded. Is a very good article on Aisilandr Wikipedia and if you Google "icalendar recognizer" If you have multiple services that will allow you to validate your files Oh, and if you get frustrated with it, you are not alone, Although this is a good sampling imho, its implementation is very, er, is different.

Help you to help others with a little more detail about how you want to use it.


java - For each with my custom class won't work -


Oh all I'm working with Java.
That's why I'm writing a class named OrderedSet . This is a class that is cross between a set and a queue. In other words, this is a line without any duplicates. So I know that I have to implement the ineligible interface, and have to type an iterator method. To write the method, I must then implement the Iterator interface.

  package comp345; Import java.util.Iterator; Import java.util.NoSuchElementException; Class serializes the set of Iterable & lt; Object & gt; {Private Object [] queue; // It represents the ordord, an // queue private object counter; // Copy to keep track of the current status of the queue private int queue; // Keep track of queue; // Constructor Public Ordered Sets (Integer Size) {this.queue = New Object [Size]; This.counter = 0; This.queue size = size - 1; Instant for every object instance of object (for int i = 0; i & lt; queue.length; i ++) for the object array {q} [i] = new object (); }} / ** * This ensures that the element specified in this collection is if it is not already in the collection then it has been added behind the queue. * * @ Ultimate E * Element whose presence in this collection is being ensured * If true, then this collection has been changed as the result of the call * @ Threas tap pointer exception * If the specified element is empty / add boolean ( Object i) {if (i == queue [counter]) {return false; } And if (i == empty) throw new nullioner exception (); Else {// add the object behind the line queue [counter] = i; Back true; }} / ** * Deletes all elements from this collection. After this method return the collection will be * empty * / clear () (for (int i = 0; i & lt; qi.lamp; i ++) {q} [i] = null;}} / ** * True Return If there is no element in this collection * * @ Return if there is no element in this collection / / Boolean is empty () {If (Q [0] == faucet) back true; Second false return;} / * * * The blank * * * queue of this line, or empty if this queue is empty * / object peek {if (queue [counter]! = Null) return queue [counter ]; And tap return;} / ** * Removes the head of the queue and removes * * @ Behind the head of this queue * @ throw noschlement exception * if this queue is empty * / remove object () { If (queue [0]! = Null) {object temp = queue [0]; queue [0] = queue [1]; return temporary;} and neither throw a new nouselame exception ();} public class SetIterator Iterator & lt ; Object & gt; {Private Inter Counter; Public Setter () {this.counter = 0;} @OverWide Public Object Next () { R ++; if (Kyuijyug == counter) return null; if (row [counter]! = Null) return (object) queue [counter]; And neither do the new NSUELEMENT throw exceptions (); } @ Override in Public Boolean Next () {Counter ++; If (the queue size  

I can see at least one problem.
Take a closer look at your hasNext () method.

Do you really want the variable counter ?


Word 2007 form fields unprotect document via VBA clears all fields but not in Word 2002 version -


I have a VBA code that prints the Word document generated from the word template with the Word field and then changes it Reprint incompatible headers and documents for when I vulnerable the doctor to change the contents of the header, all form fields are cleared. But: When I use a Word 2002 doctor who has just been saved as a 2007 dot format, everything works fine.

I should be ashamed to decide it is so easy to leave me as a developer Think about - or do not work in the previous months every day: -)

Answer: The parameter noreset is to be set true

  ActiveDocument.Protect NoReset = True  

linq to entities, operator like WhereAnyIn? -


Before I was in the implementation but I am thinking that someone can write an option in "Where Any Any" For example: Ive an Institutions: Post --- PostTag --- Tags

I need the query with parameter int [] tags, in which the given list contains all the posts containing any tag is done.

I can not understand it

Thank you for your help.

  static zero main (string [] args) {int [] integers = Enumerable.Range (0, 10) .oir (); Expression & lt; Funk & lt; Post, bull & gt; & Gt; Expression = Make these Express & Lt; Post, At & G; (P = & gt; P tag, integers); } Static expression & lt; Func & lt; TItem, bool & gt; & Gt; CreateWhereInExpression & lt; TItem, TValue & gt; (Expression & lt; Func & lt; TItem, TValue & gt; Lambda, TVLu [] items) {if (lambda! = Null) {Member Expression Member Expansion = Lambda. As a Member Member; If (Member Expression! = Null & amp; Member Feedback Experience == Lambda. Parameter [0]) {Body of Expression; If (objects == zero) items Long == 0) {body = expression. Constant (true); } Other {body = items.Skip (1) .growet (expression .aquel (member expression, expression. Constant (item [0])), (expression, item) => expression. Constant (item))); } Return expression. Lambda & lt; Func & lt; TItem, bool & gt; (Body, lambda parameter); }} Return tap; }  

how to give background colour to textview in android? -


एंड्रॉइड में पाठ का दृश्य कैसे पाता है?

<पूर्व> textView.setBackgroundResource (resourceId) // संसाधन पाठ से viewview.BackgroundColor (int रंग) // उदाहरण कस्टम रंगों के लिए color.RED

  int रंग = Color.rgb (int red, int green, int blue);  

search - Switch off the new Delphi 2010 Find feature -


Delphi 2010 added a new search bar below the source editor. Although I think that like a good idea I think F3 should be pressed several times for the next matches. It works from time to time to me

How can I turn it off and use the old search function?

It is not possible to switch back to the old model behavior that code has gone if you click on a list If you want to see the results, you can use "Search in files" and to keep the minimum number of files to choose "Minimal files" or "files in files"


.net - SQL Server encryption using self signed SSL certificate. Querying from ASP.NET 3.5 -


I have created a self-signed certificate to test encryption between my web application and SQL Server.

When trying to query the database by using "encrypt = yes"; In the connection string, I get the following message:

A connection was successfully installed with the server, but then there was an error during the pre-login handshake. (Provider: SSL Provider, Error: 0 - The certificate chain was issued by an authority which was not trusted.)

Background
I The same received message when first attempting an encrypted connection from the management studio. This was resolved by establishing a self-signed certificate in the Certified Certificate Authority.

Question
Is there a way that I can get ASP.NET to trust the certificate on the way my user does the account?

The correct answer for this is to add a self-signed certificate to the certificate store.

Wrong way
Installing the certificate by double-clicking on the .cer file on the server - This currently adds a certificate for the log, in the user only, which is why That in some cases cloning works

Correctly
Use CertMgr.exe to install certificates.
- You can find CertMgr.exe in the Windows SDK, or apparently in Visual Studio 2005, the bin folder is not in VS2008.
- You can run CertMgr.exe under a Needs account ; A domain account with local administrator privileges will not work - runmind to run on the server To add the certificate to the localmarket trusted store, run CertMgr.exe:
- certmgr / add your.Certificate Fileename.cer / s / r localmachin root
- certificate / Add yours. Certification.Filename.cer / s / r Localmark Trusted

Also note that the certificate can not use wildcards while referenceing the file name. (/ Add * .cer will fail.)


java me - BlackBerry - How to start a messenger application? -


I would like to use gtalk or any other messenger in my application but I do not know how to do it. Please let me know how to solve it. If you can give me some web links to learn more about this.


Try this for standard BB Messenger:

  Int mh = CodeModuleManager.getModuleHandle ("net_rim_bb_qm_peer"); If (mH == 0) {try new application manager exception ("BBM Messenger is not installed"); } Hold (ApplicationManagerException e) {System.out.println (e.getMessage ()); }} ApplicationDescriptor ad = CodeModuleManager .getApplicationDescriptors (mh) [0]; ApplicationDescriptor ad2 = New ApplicationDescriptor (advertisement, empty); Try {ApplicationManager.getApplicationManager () .runApplication (AD2, True); } Hold (ApplicationManagerException e) {System.out.println (e.getMessage ()); }  

You can start any app through the module name, just

  "net_rim_bb_qm_peer"  

Update and if you want examples of Blackberry Open Source Messenger, see:

ICQ Chat Software

IRC Midlet for Mobile Phone

Java Cell Phone Or support IRC client Java MIDP 1.0 (J2ME) for any other device.


php - Symfony : How to use widgets with i18n forms in backend (doctrine) -


I can not manage the management of both i18n and tinyMCE widgets on international standards. If I have put both of them, then I will play internationally for the areas of all my belongings, but there will be no small MECE for them. As I have been declared, the small MEEE fields I have, but thew will not be in accordance with any language, they will be at the beginning or end.

// config / doctrine / schema.yml

  MyObject:  

{type: string (500)} Introduction: {type: string ( 4000) Text: {Type: string (500)} subtitle: {type: string (4000)} text: {text: type: string (16000)}

// lib / Form / doctrine / MyObject.class.php

  Configure Public Function () {$ this- & gt; Embeds I18N (array ('N', 'FR', 'S')); $ This- & gt; Widgetscima- & gt; Set Labels ('FR', 'Franchise'); $ This- & gt; Widgetscima- & gt; Set labell ('n', 'angle'); $ This- & gt; Widgetscima- & gt; Set label ('es', 'español'); $ This- & gt; Widget- schema ['intro'] = new sfWidgetFormTextareaTinyMCE (array ('width' => 600, 'height' => 100, 'config' = & gt; 'theme_advanced_disable: "anchor, image, cleanup, help" , 'Theme' = & gt; sfConfig :: get ('app_tinymce_theme', 'simple'),), array ('class' => 'tiny_mce')); $ This- & gt; Widget-schema ['text'] = new sfWidgetFormTextareaTinyMCE (array ('width' => 600, 'height' => 100, 'config' = & gt; 'theme_details_disabled: "anchor, image, cleanup, help '', 'Theme' => sfConfig :: get ('app_tinymce_theme', 'simple'),), array ('class' => 'tiny_mce')); $ Js_path = sfConfig :: find ('sf_rich_text_js_dir')? '/' SfConfig :: get ('sf_rich_text_js_dir'). '/ Tiny_mce.js': '/sf/tinymce/js/tiny_mce.js'; SfContext :: getInstance () - & gt; GetResponse () - & gt; AddJavascript ($ js_path); }  

So I think that when I use $ -> widgetscama ['intro'], the "identity" name does not correspond to all the IILN "intro" areas. Tried both 'entrantro' and 'intu_an', but it does not spell any magic. So maybe you can help me?

So I found how to do it and I thought it could interest anyone: / P>

Instead

  $ this-> widgetSchema ['intro'] = ...  

put

  $ this-> Widgetskima ['n'] ['intro'] = ...  

with all languages


cocoa - How to add a program into Dashboard and implement to turn over a panel In Mac? -


I found that some programs can put in the dashboard, and most of them are a feature: when click on "i" The panel will close and show another panel, how to implement it? And how to put a program into the dashboard? Thanks a lot!


How can SQL Server email an error message when Replication publisher fails to connect to a subscriber system -


There are several remote locations where we set up SQL Server 2005 replication.

2) Customer's inappropriate shutdown,

3) Changes in domain, sometimes the publisher fails to repeat due to several reasons such as

1) Network problems,

password,

4) Changes in SQL password,

5) Failure to switch to client system

Is there a way that we can send SQL Server to an administrator when an email happens when this happens?

Thanks, Chuck

The way I usually handle it, by modifying the SQL Agent job (s) Which are responsible for starting / running replication agents (depending on your replication topology, you have different types of potentially different locations). Just after the "Run Agent" phase that after the execution of / when that stage completes / fails, add the job phase to the appropriate agent job (i.e. Log Reader Agent, Distribution Agent, Merge Agent, Qi Agent, etc.) Depending on whether or not you're using a continuous schedule).

For example, if I have a Transaction Un-Directional push publishing setup, then the delivery agent will be running in the distributor. If I am connected to the distributor and find the SQL agent job responsible for running the distribution agent for this publication, then I can modify the job and add a step to send an email to a particular group if the "Run Agent" Phase fail / complete. If I am using a continuous replica schedule, then I will add the step of the email when the "step agent" phase ends (as I want to inform that the agent stops for any reason). If I'm using a non-continuous schedule, instead I can only run the email step on the failure of the "Run Agent" step. You can also configure the "email" step to send e-mail, for a while Pause for, then try to restart the agent automatically (by configuring the steps for "Go to step 1 for success").

Here is a screen shot showing how the job steps look for a distribution agent, as I have configured the above framework:

In the picture above you will see that I step, called "Notification, Stop, Retry," which at any time prevents the agent (success or failure - This is intentional because I use continuous replication schedule I am doing and whenever Swimming agent who is not running for any reason) This step is basically sends an email to a specific group, one or wait for two minutes, then resume agent. You can add code to do anything, including logging, can only restart the number of fixed times in a fixed time slice, etc. It is easily scripted and repeatable for any number of agents, publications, etc. (I have scripts to ensure any NDAs are included in this type of topology, such configuration in EV replication agent - So this is just a matter of adding or adding performance to a release tool, depending on how you deploy in your environment).


iphone - revoking removeFromSuperview? -


[((UIImageView *) सेल। बैकग्राउंड दृश्य) removeFromSuperview];

यह सेल को हटा देता है .backgroundView UITableviewCell से, लेकिन मैं इसे वापस कैसे वापस ला सकता हूँ ..? (फिर से देखें?)

  [सेल ऐडएसूब्यूव्यू: myBackgroundView]  < / Pre> 

जहां myBackgroundView एक UIImageView है यदि आप myBackgroundView को एक उदाहरण चर के रूप में रखते हैं, तो आप इसे फिर से जोड़ सकते हैं। यदि आप नहीं करते हैं, तो आपको पृष्ठभूमि दृश्य को फिर से शुरू करना होगा;

  UIImageView * myBackgroundView = [[[UIImageView alloc] initWithImage: [UIImage imageNamed: @ "अपनी छवि"]] autorelease];  

ऐसा कुछ।


html - Having line breaks between <li>s -


मेरे पास & lt; li & gt; तत्वों के साथ डिस्प्ले: इनलाइन युक्त एक क्षैतिज मेनू है

तत्वों को एक-दूसरे के बगल में होना चाहिए।

स्रोत कोड में, मैं आसान डीबगिंग के लिए एक पंक्ति पर प्रत्येक ली करना चाहता हूं:

  & lt; li वर्ग = "आइटम 1 पहले" & gt; ... & lt; / li & gt; & Lt; li वर्ग = "आइटम 2" & gt; ... & lt; / li & gt; ...  

हालांकि, यदि मैं प्रत्येक तत्व के बाद एक \ n जोड़ता हूं, तो मेनू आइटम एक-दूसरे के बीच अंतर है मैं इसे इकट्ठा करना चाहता हूं, लेकिन एक चालाक "श्वेत-स्थान" सेटिंग या कुछ चीज़ों का उपयोग करके इसे बंद करने का कोई तरीका क्या है?

संपादित करें: मैं फ्लोट का उपयोग नहीं कर सकता, यह है सूची आइटम को केंद्र के विकल्प के साथ एक सीएमएस में।

आप प्रतिपादन से बच सकते हैं

  और 
  • gt; 1 & lt; / li & gt; & lt; li & gt; आइटम 2 & lt; / li & gt; & lt; li & gt; आइटम 3 & lt; / li & gt; & lt; / ul & gt;
  • यह सफेद स्थान को हटा देता है, लेकिन पाठ संपादक में आइटम को संपादित करना अभी भी आसान है, बशर्ते आपका सीएमएस आपके द्वारा दर्ज मार्कअप के साथ गड़बड़ नहीं करता!

    < / html>

    iphone - UITextField text value returns garbage -


    When I dismiss the keyboard, then I'm trying to get the string value from the textfield. However, it seems that whenever I try to get the value, I get garbage (the trash attempt to print textField.text shows garbage).

    (The control displays okay, and I can also enter text value in it).

    Here is my code:

      - (BOOL) textFieldShouldReturn: (UITextField *) textField {NSInteger currenttag = textField.tag; NSLog (@ "% d", textField.tag); If (current tag == 0) {nslog (@ "% x% s", (unsigned integer textfold.txt, textfield.txt); User name = textField.text; } And if (currenttag == 1) {password = textField.text; } [TextField Resigns First Responder]; Yes come back }  

    Field names and passwords are zero NSString * 's, but since I'll only catch on NSStrings organized by textField.text, it should be fine.

      NSLog (@ "text field text:% @", textField.text);  

    Javascript security / cross scripting on same server -


    Make some javascript for which I have to work through:

    : // localhost < / P>

    : // servername

    : / www.domainnamefortheserver.com

    When I run a script from IFRAME referenced to the domain - it does not load.

    Thanks

    Is there a way to identify JavaScript security models as server names, localhosts, and domains as "domains"?

    Thanks

    If you are running on Unix, You can edit / etc / hosts to provide fake DNS entries.

    For example

    127.0.0.1 localhost www.domainnamefortheserver.com

    Then you can always add it as the correct name, even if it is still Do not live on the live site. Try and do not break javascript protection directly.

    This will also work on OSX. Windows works differently, I hope.


    php - spawn-fcgi dying after a number of connections -


    I recently set up a new Ubuntu machine with WordPress, Spawn-FCG and NGNA.

    Every morning, I will try to see my blog and I got a 50 gate gateway error.

    I tried to find some sort of thing, why php-cgi died, but nothing was found.

    I run spawn-fcgi like this:

      sudo / usr / bin / spawn-fcgi -a 127.0.0.1 -p 9000 -U www-data - G www-data -f / usr / bin / php5-cgi -p /var/run/fastcgi-php.pid  

    I just tested the following:

    Ran spawn-fcgi

    After about 480 connections, the egg-FCG died and I started receiving 502 errors.

    With no idea why would I have any kind of logs?

    This can not be a real improvement, but setting

      PHP_FCGI_MAX_REQUESTS = 400  

    Environmental variables will force PHP to kill and re-execute after 400 requests, so the problem will not appear.


    Event issue with ASP.net Update Panel -


    I am fully stumped on this and really appreciate any help.

    I am working on a user control that is located inside an updated panel. There is a button on the form that loads some data. This is working properly.

    There is also a drop-down box to filter the data. Changing this, a post starts back, though nothing happens. The drop-down box goes back to the default value that is never called the on-line index chain function.

    I have put brake points in the page-prerenders and page_preload and both posts are being hit back definitely. Breakpoints are never killed with the dropdown group_changed function.

    Deleting the update panel solves the problem, though it breaks the rest of the page so I can not use anything other than testing.

    I have also verified that there is nothing in my prerender / page load which is resetting the page's position.

    Here is the update panel code:

      & lt; Asp: UpdatePanel ID = "Update Panel 6" Runt = "Server" ChildArgrager = "True" UpdateMode = "conditional" & gt; & Lt; ContentTemplate & gt; & Lt; UcControlName: ControlName ID = "ControlName1" runat = "Server" /> & Lt; / ContentTemplate & gt; & Lt; / ASP: UpdatePanel & gt;  

    There is a drop-down in the question - it is located inside the user control

      & asp: dropdown list id = "dropdown group" = Runt = " Server "visible =" false "autopostback =" true "on-select index =" dropdown group-exchange "& gt; & Lt; / Asp: dropdownlists & gt;  

    This issue is clearly visible and at that point there is a database from the point where the problem is coming in.


    A little more information- one Hard coded dropdown (to exclude a stupid databasing issue) and one textbox in the same control. I have the same problem.

    It seems that the event is not triggered because values ​​are never changing, because NAT is concerned. I've checked the control during page_init and page_load - the value is always the same.

    The fact is that the button works but in other controls I do not think there is a visual state problem here but I can not quite ferret it out because of it. Viewestate is enabled for page and panel - I do not know that all this can be override / corrupt

    Did I mention that I hate the updated panel with passion? Because I hate the updated panel with passion, I recommend checking 'Value Property' for each 'ListItem' in the 'Dropdown List' control. I

    If they are all identical , even though the 'text' attribute is different, 'on-selected index change' will not come at all Because ASP.N.T. Nothing can tell that nothing has changed (see for more information.)

    This was the real cause of my problem, even though I had a DropDownList inside 'UpdatePanel' and 'AutoPostBack' 'With a' UserControl 'firing was expected as expected. I thought UpdatePanel was the culprit, but this was not the case. Each of the items in my dropdown list had the same basic value as "10", even though they had specific 'text' values, I changed them, each has a unique value, which is then the indeclinable index-playback Allows for the event to fix this problem.


    ASP.NET MVC Model Binding -


    I was wondering if there was a way to force the price of an input field directly into the model with the value of the property Type model For example, let's say my model is an address object. I want to be able to say Html.Textbox (Model.Address1.State, "state", Model.Address1.State) . The first parameter will be the obvious asset that I want to bind to the model from the user, the second parameter will only be the DOM id and the third value will be the initial value of the input when I present the view.

    I know that you can do Html.TextBox ("Address.State") and there is a custom binder that will create an address object for you and populate the state's property. . I need Html.Textbox (Model.Address1.State) .

    Help?

    I think that code to check the things that you want.


    Clear HTML page using JavaScript -


    Is there a way to remove the contents of the existing content on a JavaScript function page? Like:

      & lt; I am curtained & gt; & Lt; Is there any JavaScript or HTML statement here? & Gt; & Lt; I display it and gt;  

    What should I put in & lt ;? I can put any javascript or HTML statement here & gt; ?

    I know to put & lt; Div style = "display: none" & gt; & Lt; Plain & gt; Share I want to see Will Hide appearing at the end of a page, but how to do it I document.body.innerHTML = "" "post-text" itemprop = " Text ">

    Can you use it? Code>. As long as the browser processes the page, it will remove everything in the body. See the following example:

      & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P & gt; It should not appear & lt; / P & gt; & Lt; Script type = "text / javascript" & gt; Document.body.innerHTML = ''; & Lt; / Script & gt; & Lt; P & gt; It should look. & Lt; / P & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

    This, however, is not a great way to accomplish this. If you want to hide some text, think about jQuery as told about others.


    ruby on rails - link for adding something to the session -


    Do I have a link that will add something in session hash? For example, if I have a link, then it is done when clicked:

      session [: items]  

    I have to trigger a JS file for that action, so I can update the session when the user clicks the link.

    OK, what did I do, if someone crosses the other, then I will call this line as my controller , For example, if we add something to our paraMedge, then it will be.

      session [: items]  

    Flex SWF assets loaded into Flash SWF at runtime within same ApplicationDomain -


    I am trying to load an SWF compiled by FLEX SDK exported by Flash IDE in the manner of GetDefinition ( ) Usually this flash works well with the assets exported from the IDE, then loads from Flash IDE to another SDF.

    In the same way, I can only use Flash IDE:
    Loader -> Use same ApplicationDomain -> getDefinition (class)

    Now, [Embed ] Using the ' test .as' compiled from Flex SDK using the metadata tag:
    Loader -> Using the same application daemon -> getDefinition (" Test _ "+ Class)

    The problem is that instead of prefixing the class name to me, the asset libraries loaded I do not have to keep I (like '' test _ "+ class) versus (class)). Is there any way to do this without referencing the library to reach the original loader Or without being pulled? In this way I do not have to know which SDF property is coming, just the name of the class which I can instantiate from the current applicant, doom.

    Thank you < / P>

    What Y DF try to load and when it is fully loaded, get getDefinition (class)? No embeds


    c# - Better approach for SSO to cater windows integrated auth as well as users not on domain -


    This can be a duplicate (not sure), but since I am unable to quench my thirst for the right answer ( 0: So it goes here:

    I have to provide a single signal for my ASP.NET web application. Where:

    Case 1. User Login is allowed if user is already on the domain (logged in to a Windows domain).

    Case 2. User login But does not allow if the user is not on the domain / validating user login credentials from Active Directory.

    Question 1a. In the comments about those steps What I need to "follow" and "should follow" is required. How can I improve it? Improving the meaning, is this the right way to provide the expected functionality above?

    Question 1b. In addition, I currently have difficult coded roles in my database; I am planning to move it within Active Directory user roles; I could use the IISInRole method functionality. What did you think about it?

    Right now, I have implemented it in the following way

    For the case 1, the application uses: Windows authentication; Basically like the following:

      Return (WindowsIdentity) (HTTPPTXX.Content.User.indenti)).  

    This is an authenticated user, if application income.

    For Case 2, the application: asks for the user who asks for the user who provides the ID, and password checks that the user is present on Active Directory; The following is a cut.

    directory finder search = new directory finder (entry); Search.Filter = "(SAMAccountName =" + username "+") "; Search.PropertiesToLoad.Add ("cn"); SearchResult Results = search.FindOne ();

    If it finds a user's record then the application income

    Please note that the web in it. Recommended changes are included in the config file, such as the following fraud:

      & lt; Authentication mode = "form" & gt; & Lt; Forms loginUrl = "~ / UI / page / login aspx" defaultUrl = "Default.aspx" name = "adAuthCookie" timeout = "60" path = "/" /> & Lt; / Authentication & gt; & Lt; Authority & gt; & Lt; Deny users = "?" / & Gt; & Lt; Allow users = "*" /> & Lt; / Authorization & gt; & Lt; Identification impersonation = "true" />  

    Adding roles (admin, supervisor, guest) to active directory roles is very good, but then when I deploy my application, I actively add those hard-coded roles How about going the directory? Well .. Just think loudly.

    I had to research it a few months back, and how to add form and Windows security to ASP.NET Well, excellent article on I never got a chance to apply it, so I am unsure of the actual results. If you use any of these, please let me know how it works for you.


    c++ - vptr - virtual tables -


    There is nothing I do not know.

    For every class, I declare that the vptr members pointing to the class virtual table is hidden.

    Say I have this announcement:

      class support {virtual_table * vptr; // It's completely hidden, just stating the clear virtual zoo (foo); } Category is defined: Public base {virtual_table * vptr; / / That is also hidden in the virtual zoo foo (); Virtual zero thief (); }  

    First I have to understand something, is it really the name of the member of VPTR for both derivative and base?

    Second, what happens in this situation:

      base * original = new derivative ();  

    I have found, the basic variable gets, VPTR is getting, but how is this happening? Generally, when a conversion occurs, then the derivative basic base (including the VPT of the base) must be assigned to the basic, and should not be derived vptr is probably different if both classes have a variable with the same name I do not know.

    The third and final question: When I have

      base * basic = new derived ();  

    Is there a way to call from a basic base even if it's virtual?

    Thanks

    First, yes, it is a single member. It is officially handed over for the first time when the base constructor is run, and the derivative constructor is assigned a second time while running. (In the case of the default blank constructs, the waste assignment of the base has been removed.)

    Second, there is no actual conversion. Actually, the etymology can be given the name of the "one" relationship. In the case, the derivative "one is" basis if you consider the first bytes of the memory of the derived object, then they get the same meaning from the first bytes of the original object.

    Third, you can call the basic member function as follows: basic- & gt; Base :: foo ();


    c++ cli - C++/CLI : How to override Equal method of Object class -


    I am a newbie for C ++ / CLI and there are some issues with overriding the same method as the base object class. Are there. I get the following compilation warning error for the following code. How should it be corrected?

      Warning 1 Warning C4490: 'Override': Incorrect use of override specifier; 'Test :: Sample :: Equivalent' base referee does not match class method c: \ project \ code \ Sample.h 18 error 2 error LNK2022: Metadata operation failed (80131187): Incompatible method announcements in duplicate types (type: Test Sample; Method: Equal): (0x06000002) 3: I removed the overridden keyword in the source file, by replacing "Equals" with "Equals", but error 2 still stands.  

    / / header file

      public ref class sample: public object {public: int someVariable; Override virtual bull equivalent (object obj); Virtual It's Hoshcode () Override; }  

    // source file

      bool sample :: equals (object ^ obj) {if (obj == nullptr GetType ()! = Obj-> GetType ()) returned incorrectly; Sample ^ p = dynamic_cast & lt; Sample ^ & gt; (Obj); Return (some variables == P- & gt; some variables); } ET Sample :: GetHashCode () {return GetHashCode (); }   

    The method's name is not identical Code> equals . You should not use the virtual or override keyword in the implementation:

      Ref class test {public: Virtual Bull Equals (Object ^ o )) Override; Virtual It's Hoshcode () Override; }; Bool test :: equal (object ^ o) {// no "override" here // ...} int test :: GetHashCode () {// no "override" here // ...}  < / Pre> 

    How to delete the default Help button in CPropertySheet in MFC? -


    I am using the CPropertySheet class for my design in the MFC application, usually the CPPprooty sheet will have 4 default buttons. Hide / Hide Help button .. I tried the following..but it is not working / not responding .. I have written in my CPPTP page class that there is no other way ...

    m_psh .dwFlags & amp; = ~ PSH_HASHELP;

    // delete help button CBTTTON * BTN help; BtnHelp = reinterpret_cast & lt; CBTton * & gt; GetDlgItem (IDHELP); BtnHelp-> DestroyWindow ();

    c# - Case insensitive comparision -


    केस असंवेदनशील तुलना कैसे लागू करें?

      सूची & lt; व्यक्ति & gt; व्यक्ति = नई सूची & lt; व्यक्ति & gt; (); व्यक्ति। जोड़ें (नया व्यक्ति ("P005", "जॉनसन")); व्यक्ति। जोड़ें (नया व्यक्ति ("पी 2002", "अर्नोल्ड")); व्यक्ति। जोड़ें (नया व्यक्ति ("P007", "कझल")); व्यक्ति। स्थान ((पी 1, पी 2) = & gt; पी 1.Name.CompareTo (p2.Name));  

      persons.Sort ((p1, p2) = & gt; स्ट्रिंग तुलना करें (पृष्ठ 1 नाम, पी 2। नाम, सच));  

    How to catch divide-by-zero error in Visual Studio 2008 C++? -


    How can I find a divider-zero-zero error (and other errors and being able to access exception information ) In Visual Studio 2008 C ++?

    I tried to do this:

      try {int j = 0; Int i = 1 / j; // In fact, we call a DLL here, which has a split-rate-zero} hold (std :: exception & e) {printf ("% s% s \ n", e.what ()) ; } Hold (...) {printf ("general exception"); }  

    But this is normal ... hold blocks. I think MS-specific __trree may be useful here, but I prefer standard C ++, and in any case I have destructors who stop the use of __try.

    Clarification: The above code is simple. For discussion purposes, actually, by dividing zero, there is a bug which is deep in the third party DLL for which I do not have the source code. Depending on the error parameter (a handle for a complex structure), which I pass to the library, but not in any clear way. Therefore, I want to be able to honestly recover.

    Assuming that you can not just fix the cause of the exception generated code (maybe because your There is no source code in that particular library and probably because before you can not adjust the input parameters before causing the problem).

    Some hoops for you to do this work as you want, but it can be done.

    First of all you need to set up a structured exception translation function handling by calling _set_se_translator () (see) then you can check the code that you pass When an SEH is an exception and can throw an appropriate C ++ exception

      zero CSEHException :: translator :: trans_func (unsigned int code, EXCEPTION_POINTERS * pPointers) {switch (code) {case FLT_DIVIDE_BY_ZERO: CMyFunkyDivideByZeroException (code, pPointers) Throw; break; } // The usual C ++ SEH exception for things we do not need to handle separately .... Throw CSEHException (code, pPointers); }  

    So you can just hold your CMyFunkyDivideByZeroException () in normal way in C ++.

    Note that you need to set your exception translation function on every thread you want to translate the exception.


    cpu architecture - C programming and error_code variable efficiency -


    I have ever read most code uses int to deal with standard error Kind of). But I am thinking that if there is any benefit to using uint_8 then it will be a compiler - the most compiler on most architectures - produce instructions using instant address mode - that is, embed Do 1-byte integer instruction? I am thinking about it that the key command compares after a function, its return type is used as a UIT_8.

    I was thinking about things wrongly because starting with 1 byte type just causes alignment issues - perhaps a completely sensible reason that compile 4-bytes Likes to pack things in and it probably uses all the reasons - and since it is a problem related to stack rather than a heap, there is no real overhead.

    I'm thinking about doing the right thing but for the sake of logic it says that it is a popular cheap microprocessor for an intelligent clock and it is configured with 1 memory, but its instruction There are different addressing modes in the set: D

    Another question will be specialist (x86) to discuss: in: literally:

      uint_32 x = func (); X1 ==;  

    and

      uint_8 x = func (); X1 ==;  

    The same type? Or the compiler will generate 8-byte literal in the second case. If so, then it is used as a comparison instruction which is literally as an instant value and can be returned to generate returns as a register reference. .

    What a special compiler will do for the following code:

      Extras int Fu (zero); Zero times (zero) {if (foo () == 31) {// error code 31 do_something (); } Else {do_somehing_else (); }} 0: 55 push% EBP 1: 89E5% MOV% esp,% ebp3: 83EC 08 sub $ 0x8,% esp 6: e8fcffffff call 7 & lt; Bar + 0x7 & gt; B: 83F8 1F CMP $ 0 x 1f,% eXE: 74 08GE 18LT; Bar + 0x18 & gt; 10: C9 Leave 11: E9 FC FF FF FF JMP 12 and LT; Bar + 0x12 & gt; 16: 89F 6 mov% esi,% esi 18: C9 Leave 19: E9 FC FF FF FF JMP 1A and LT; Bar + 0x1a & gt;  

    3 byte instructions for CAP if foo () returns a four, then b: 3 C 1f cmp $ 0x1f,% al

    If you have the skills Are looking for Do not assume comparison of goods in% A1 is faster than comparing% eax


    breadcrumbs - Creating a "guide bar" like this, above a web page by php+mysql? -


    I want to create a "guide bar" (I do not know its exact name). I have a table named cat that contains the following data:

     catid catname parent 1 news faucet 2 game 1 health 3 4 tennis 2 5 football 2 6 soccer 5 

    My page gets: $ catid = 6 , and I want to create:

    football>

    First get your data from the database and create an array

      $ q = mysql_query ("select" Catid, cat's name, cat to parents "); $ Pages = array (); ($ R = mysql_fetch_assoc ($ q)) {$ pages [$ r ['catid']] = Arrays ('catname' = & gt; $ r ['catname'], 'parent' => $ r [ ' parent ID']); }  

    Use a recursive function to create breadcrumbs:

      function build_breadcrumbs ($ pages, $ catid) {if (not_null ($ catid) || Free ($ catid) return; Return build_breadcrumbs ($ pages, $ pages [$ catid] ['guardian']). $ Pages [$ catid] ['Cat's name']. '& Gt; '; }  

    The function returns the breadcrumb of the parent + breadcrumbs current. Use the function like this:

      $ catid = 6; $ Breadcrumb = trim (build_breadcrumb ($ page, $ catered), '& gt;'); Echoes breadcrumbs;  

    Or, if you prefer more arrays, then you can create a function like this:

      function build_breadcrumbs ($ pages, $ catid ) {If (is_null ($ catid)} empty ($ cated) returns return (); Returns array_majores (build_broadcrambs ($ page, $ page [$ catid] ['parent']), array ($ page [$ catid] ['name'])); }  

    and use it with implode:

      $ catid = 6; $ Breadcrumbs = intestine ('' gt; ', build_breadcrumbs ($ pages, $ catid)); Echoes breadcrumbs;  

    This gives you the option to define the separator outside the function, hope that helps.


    flex - MXML: combobox width is larger than parent width -


    I have a width blank box set to 100% However, when one of its elements is larger, Equally grows, making scrollbars and other ugly in my app! How do I keep the combobox within my parents?
    NB, that's fine if the list that falls below becomes bigger when the closed cubbocox is small.

    Sample:

       & Lt ;! - This text box should be spread in both forms, this is why it is in a separate HBox - & gt; & Lt; Mx: text input height = "20" width = "100%" /> & Lt; / Mx: hbox & gt; & Lt; Mx: HBox id = "formsHbox" x = "8" y = "{8 + tagsHBox.height}" width = "{this.width-16}" & gt; & Lt; Mx: form id = "left form" width = "50%" & gt; & Lt ;! - Personal details - & gt; & Lt; Mx: formhiding label = "personal details" width = "100%" /> & Lt; Mx: formystem label = "first name" width = "100%" & gt; & Lt; Mx: text input text = "{person first name}" width = "100%" /> & Lt; / Mx: FormItem & gt; & Lt; Mx: form item label = "last name" width = "100%" & gt; & Lt; Mx: text input text = "{person.lest name}" width = "100%" /> & Lt; / Mx: FormItem & gt; & Lt ;! - and 15 additional form items :) - & gt; & Lt; / Mx: form & gt; & Lt; Mx: form id = "correct" width = "50%" & gt; & Lt ;! - address - & gt; & Lt; Mx: form heading label = "address" width = "100%" /> & Lt; Mx: formitium label = "street" width = "100%" & gt; & Lt; Mx: text input text = "{person.address.street}" width = "100%" /> & Lt; / Mx: FormItem & gt; & Lt; Mx: formystem label = "city" width = "100%" & gt; & Lt; Mx: text input text = "{person.address.city}" width = "100%" /> & Lt; / Mx: FormItem & gt; & Lt; Mx: formystem label = "country" width = "100%" & gt; & Lt ;! - This Cambodia is painful here, 'South Georgia and the South Sandwich Islands' is a country that has names of some small islands of the South Pacific and is a name that is too long for my innocent unheard boxed box - & gt; & Lt; Form: Combo box ID = "CountryCompono" height = "20" width = "100%" Detector = "{model.cethodDataModel.countries}" /> & Lt; / Mx: FormItem & gt; & Lt ;! - and 15 additional form items :) - & gt; & Lt; / Mx: form & gt; & Lt; / Mx: hbox & gt; & Lt; / Mx: canvas & gt;  

    You may be able to use the minwidth instead. Set it to zero or any other less value I know that it works with containers like HBOX and Vbox to stop growing your parent's container larger, so it can also work with the combo box. . Basically, what happens is that Minwath = "0" overrides the measured minwd, which is a value that the parent container generally considers as the minimum possible size, and it can be larger than its container limit.


    JavaScript: clone a function -


    The fastest way to clone a function in JavaScript (with or without its properties)?

    Two options coming to mind eval (func.toString ()) and function () {return func.apply (..)} . But I'm worried about the performance of eval and wrapping, will make the stack worse and potentially degrade the display if pre-wrapped or too many have been implemented.

    New Function (Args, Body)

    Update:

    What do I mean

      var funcB = funcA.clone (); // where clone () my extension is funcB.newField = {...};  

    Try it out:

      Var x = function () {return1; }; Var t = function (a, b, c) {back a + b + c; }; Function. Protopp Clone = function () {var that = this; Var temp = function temporary () {that.apply return (this, argument); }; For (var key in this) {if (this.hasOwnProperty (key)) {temp [key] = this [key]; }} Return temporary; }; Warning (x === x.clone ()); Warning (x () === x.clone () ()); Warning (T === T. Clone ()); Warning (T (1,1,1) === T. Clone () (1,1,1)); Warning (t.clone () (1,1,1));  

    vb.net - Checking user keypresses creates a warning -


    I am trying to keep user input as clean as possible in my application. In a way I'm trying to do this, do not allow the wrong data type in the field (alpha characters are not allowed when expecting numeric values)

    I found the following code And implemented:

      private subtxtSocial_KeyPress (ByVal handles this as object, byVal e System.Windows.Forms.KeyPressEventArgs) txtSocial.KeyPress Driven UserKeyPress handles four = e.KeyChar Dim isKey Boolean = e.KeyChar.IsDigit (UserKeyPress) is dim asCont boolean If in the form = e.KeyChar.IsControl (UserKeyPress) if not isKey and notCont then e.Handled = true end then  

    code desired however works as visual studio This throws a warning:

    Shared members, continuous members, access to members or nested types through a member; Eligibility expression will not be evaluated.

    I am not against warnings, but if I have there that is what I know to ignore warning and want to move forward, or there is a better way for my goals To complete?

    After

    instead of e.KeyChar.IsDigit , use char .isdigit . This is the case for IsControl . When accessing a static (shared) method like IsDigit, you can use a specific example instead of doing it directly through the class: Example ( e.KeyChar in this case) Will also be ignored, and this is what the warning is.


    actionscript: acces now object instance -


    My problem is that after creating new movie clips by me, I do not know how to access them

      Miscellaneous numOfBalls: int = 5; Var Balls: Array = New Array (); Import flash.utils.getDefinitionByName; Function addBall (instanceName: string) {var mciname: String = "ball"; Var tMC: class = getDefinitionByName (mciname) as class; Var newMc: MovieClip = new TMC () movie clip; Newmc.name = instanceName; Trace ("added" + newmc.name); NewMc.x = Randrends (10, 300); NewMc.y = Randrends (10, 300); AddChild (newMc); Turn it back. Newmc; } Function Randrange (start: number, end: number): number {return mathematical (start + (Math.rendum) * (end-start)); } Var i = 0; While (i & lt; numOfBalls) {ball [i] = adobe ("ball_" + i); I ++; } Trace (this.balls [0]); // returns error trace (this.balls_0); // return error  
      addBall function (instanceName: string): movie clip {Var mciname: string = "ball"; Var tMC: class = getDefinitionByName (mciname) as class; Var newMc: MovieClip = new TMC () movie clip; Newmc.name = instanceName; Trace ("added" + newmc.name); NewMc.x = Randrends (10, 300); NewMc.y = Randrends (10, 300); AddChild (newMc); Return to New Mac; }  

    Fix it. Returned to the movie clip, and right bit, instead of returning to newMc. Newmc; The new MC is not related to this.

    If you had it. Newmc = newMC can be.


    windows - Unziping files to existing directories in Visual Studio 2005 C++? -


    I have a directory structure already on the client machine server that looks like this:

      - | + CSS | ABC | -EFG | -XYZ + img | ABC | -EFG | -XYZ + js | ABC | -EFG | -XYZ + htm | ABC | -EFG | -XYZ  

    When we send updates to our customers on our e-commerce website, we send them to the ZIP file, which contains the following structure:

     < Code> - | + CSS | -UniqueDirectory + img | -UniqueDirectory + js | -UniqueDirectory + htm |. -UniqueDirectory  

    ... Where UniqueDirectory is always the same name

    That's why being said, there is a program zip that has Visual C ++ 2005 One way that the file can be written to unzip and can be written to that we can send the client to the existing directory (without the overwriting of any existing directory, except definitely UniqueDirectory) Is overwritten)

    The final result after unzipping the file on the client machine should be:

      - | + CSS | ABC | -EFG | -UniqueDirectory | -XYZ + img | ABC | -EFG | -UniqueDirectory | -XYZ + js | ABC | -EFG | -UniqueDirectory | -XYZ + htm | ABC | -EFG | -Directory Directory | -XYZ  

    Can it be done using C ++? My clients do not include technical skills, they simply do not want to set up an unzipping program, opening the file in the correct directories.

    Will it require an external library? Preferably I want to do this by using Visual Library only from Visual C ++ 2005, but if an external library is required I want to know what it is called.

    Only when you are not available with VS2005, you only want to apply compression / decompression algorithm , Then you want to use a library to do your work for yourself. I recommend . It's free

    is one

    Edit: .. In response to the question in your comment, yes it has to be manufactured by the old VS2005. I just downloaded the latest source and was able to compile it in a .dll . I downloaded the copy "zlib source code, version 1.2.3, zipfile format" . After removing files, see / projects / visualc6 / directory you should be able to build the library there.

    Alternatively you can download a pre-compiled library from the zlib site. This source file is listed as "zlib compiled DLL, version 1.2.3, zipfile format" with download file.

    Edit: Keep in mind that zlib is a C library if you are looking for a C ++ library , You can try, which is basically zlib with a C ++ wrapper.


    R: one-dimensional optimization -


    I optimization () , or something similar, at least the maximum value / function , I'm unsure about the exact range on which the function should be optimized, which is the required parameter for the function 'opplease' (such as optimize (f = fun, interval = c (lowerbound, upperbound)) ).

    In the problem of this optimization, I am able to estimate a value a , which is "close" of the optimal solution, but depends on the "proximity" situation.

    Is there a function in R which can use the initial value a , which is not required to specify the function that the function is optimized?

    When you say that you are not sure about the lower limit, I suspect that its This means that the parameters that you are trying to guess are not bound down

    If this is the case, then a move is to change the function so that the lower bound on the parameter

    This trivial function is minimal on x = 4:

      have fun  

    Through which we can find:

      optimization ( F = funny, interval = c (0,8)) # & gt; $ Min # & gt; [1] 4  

    But for a moment, do not argue that we are not sure whether there is a lower limit or not, and we know that the upper limit is 8. If we try, then an error:

      optimization (f = funny, interval = c (-Inf, 8))  

    Because the boundaries are finite In this situation, we can use the exponential changes ( exp () ), which, like the map with the positive numbers, the positive numbers like:

      optimization (F = function (x) fun (log (x)), interval = exp (c (-inf, 8))) # & gt; $ Min # & gt; [1] 54.59815  

    And to get root, you just need to change the solution via the following:

      log (54.59815) ) # & Gt; 4  

    If you do not know the upper or lower bound on the underlying parameters, then you can use the log-axis conversion instead of log (): :

      function (x) log (x / (1-x))  

    and it is inverted in place of exp () Code>:

      function (y) exp (y) / (1 + exp (y))  

    Note that log-os conversion unit interval Modes the actual numbers, so the interval parameter becomes 0: 1 .

    There are some numerical limitations in these solutions (for example, if we had defined interval = exp (c (-inf, 16)) in the first code, then we had an error Must have met). Tip, you can scale these changes again in the center of a given point, which can reduce the numerical limitations.


    android - Where is the SQLite DB I've created using Phonegap app -


    I am preparing my first Android app using the PhoneGap and the PhoneGap app on my Android tablet. This uses a SQLite DB I want to be able to see some tables in DB. I have embedded my tablet and installed several apps such as SQLite debugger, SKLite DB reader, file manager. None of them seems to be DB. This phone is not listed under the app or under com.modeman.app notation I have not set up in config.

    Do anyone know where to find it? Thank you

    You can see the Database folder in Eclipse File Explorer, com.mydomain.app. Note: If you have not entered data, you can not see


    c# - SignalR: Startup class in different assembly -


    I am writing a self-hosted signaller application, the host is a service of windows.

    I want to use as a startup class as a class present in an external assembly.

    If I write a startup class inside the assembly of service, then it works right.

    If I put a class in another assembly referred by the service, then I can not be able to start signaller communication.

    I did not use the Owin startup feature.

    Can anyone help me with an example of a work?

    I have already read this article, but still do not work.

    Thanks in advance, Giuseppe


    c# - WebInvoke Method = * -


    I am currently working on projects where the previous developer used * for the webinvoke method.

      [OperationContract] [WebInvoc (method = "*", Uretemplate = "/ path", response format = webmail format .jason)] zero set path (pathinfo pathinfo);  

    I think that's what * - if anything. I was expecting GET, PUT, POST, etc. ... no star initially I was thinking the default (post), but there is no reason to use * if it is similar to default.

    MSDN does not address it (), but they do not really know which method except the POST, which is the default.

    This post () seems to indicate that * URITemplate should be used as OPTIONS method. So, I'm just trying to explain if he is wrong or if his code is legitimate, then I want to know what that means.

    I have the system ServiceModel.Description WebHTP Behavior which uses WebInvoke and you can see that it is only a wildcard action that matches everything.

      Public class WebHttpBehavior: IEndpointBehavior, IWmiInstanceProvider {Internal cone string GET = "GET"; Internal cone string POST = "POST"; Internal constant wildcard action = "*"; Internal constant wildcarded mode = "*";  

    This is a hold all behavior


    IIS Access for Visual Studio Asp.Net Application -


    I'm trying to access a Microsoft Word document on a network location through a button click in my application I am The code is as follows:

      Protected sub button 3Click (ByVal Sender as the object, ByVal e.EventArgs as the system) Dim as the path 3 = "Full file path here" Dim WordApp new Microsoft.Office as .interop.Word.Application is a new Microsoft.Office.Interop.Word.Document wordApp.Visible = True WordDoc = wordApp.Documents.Open (path3) as the WordDoc end sub  

    I'm running it on the IIS 8, with the application pool of your site, as the DefaultAppPool, and as the applicationPoolIdentity identifies. My understanding is that what I need to do, DefaultAppPool allows to read the file in question. I have access to User Groups IIS_IUSRS and IUSR. Since I am using form authentication, if I have access to IIS_UUSRS, then I should be able to use the file, yet I am not able to. I believe that I need the file to IIS AppPool \ DefaultAppPool, however, the file is located on a different server than the website, so a group / username is not available to give this file. Is there any work to solve this problem?

    If both server domains are included, you run your application as a user in the domain (The account created for the purpose of running your site) then provide the user (newly created account) in the question to access the remote files.


    perl - Adding new key-value pair in an existing json element -


    I am getting a Perl script which is basically generating JSON from an XML. This part is working fine but after some commercial reasoning I need to add a new key-value pair to an existing element in JSON.

    I am able to insert a completely new element in JSON, but there is no key-value pair An existing element of input JSON

    Here is sample JSON:

    Now in the above json I'm trying to add element Based on some business logic, a new key-value pair laptop (person-> home-> laptop) (key-value pair example: "key": "123456789"), then the new JSON looks like this:

    What is the approach taken in the Perl code:

    1. Change JSON to a hash map first
    2. Attempting to add new element (this is where the problem comes I can add a completely new element, but can not add a key-value pair inside an existing element)
    3. Convert hash back to JSON.

    The Perl code for that: (Ignore any missing use statements, to make the script less complicated to highlight the error)

      #! Use / usr / bin / perl strict; Use warnings FATAL = & gt; QW (all); Use data: Dumper; Use JSON; Get the original back to JSON in aSupup (key value added) (JSON is generated from an XML file, $ json, but for this example, please use the sample JSON as described above) My $ tempHash = decode_json ($ Json); #The new key-value pair should be added to the JOSON (in original code it has been generated from commercial logic but in similar format)% filed = ('key', 123456789); # Enter the file now. Think about putting a file key here @ $$ tempHash-> {'Person'} - & gt; {'Home'} - & gt; {'Laptop'}}, $ \% fileData; My $ newJSON = encoded_son ($ tempHash);  

    The above code is not working as I expected. It is actually adding a new element {'person'} -> {'home'} -> {'laptop'}} instead of adding it under an existing element (which is the expected behavior).

    Does someone ask me to correct the syntax or any other suggestion is appreciated.

    I have explained the question in a very simple way (the original code has become very complex now and many different stuff). Tell me if more information is needed or more information is needed for the problem solving which I did.

    instead of your lines

     % fileata = ('key' , 123456789); # Enter the file now. Think about putting a file key here @ $$ tempHash-> {'Person'} - & gt; {'Home'} - & gt; {'Laptop'}}, $ \% fileData;  

    Use lines

      my ($ key, $ val) = ('key', 123456789); $ TempHash- & gt; {'Person'} - & gt; {'Home'} - & gt; {'Laptops'} - & gt; {$ Key} = $ val;  

    You can also insert a bunch of values ​​in the bunch of keys using the hash slice.

      My% filedata = (Key1 => 123, Key2 => 456); @ {$ TempHash-> {Person} {HOME} {laptop}} {keys% filed} = value% filed;  

    Which is a more typical but tedious code version

      my @keys = qw (key1 key2); My @ value = (123, 456); @ {$ TempHash-> {Person} {home} {laptop}} {@ key} = @values;  

    python - django render field of a foreignkey field -


    I have a model:

      class media (model. Model): olc = Models Class Media Manager (model.model): title = model.ccarfield (max_length = 50, empty = true) Description = model. Sherfield (max_long = 100) media_files = models.ForeignKey ('MediaManager', related_name = 'media' (max_length = 255, empty = true) media_file = models.fileField (upload_to = get_upload_file_name) def __unicode __ (self): return self. Title  

    and my look:

      Media media (files):  

    Here for media_files in the media Is it possible that the areas of media manager in the media like

      field = ("OLC", "title", "media_file")  

    And all this to the field Does Radan and a browse option Meedia_fail?

    Any help?


    How to specify class attribute type in PHP? -


    I want to create an attribute friend type array and an attribute /

    And my properties can not be of another type, but my specialty friend can be redundant!

    You can specify method arguments, but not .

    Consider creating fields private and define gates / sets:

      private $ friends; // There is no possibility to define the type of personal $ skill; Public Function setFriends (array $ friends = zero) {$ this-> Friends = $ friends; } Public Function Setcill (skill $ skill) {$ this- & gt; Skill = $ skill; }  

    c++ - Class Method with specialized Parameter -


    It is possible to create a template method with flexible parameter lists, such as:

      class test A {public: Test A (int i, nt j) {...}} Class test {public: test b (study :: string A} {...}} class base {public: template  

    with the PARA replaced by the parameter list. Class test A and Test B know what parameters they need (how many parameters and types) to make it possible with VAR?

    Is there a better way to do this?

      base.add & lt; Testa & gt; (1,2); Base.add & lt; TestB & gt; ("Abc");  

    Yes, they are looking for you, they will give you the methodology you want:

      template & lt; Class T, Class ... Args & gt; Bool Base :: Add (RGS & amp; ... args) {// ... t myT (std :: forward & lt; Ergas & gt; (Args) ...); // ...}  

    Note that if you do not have any rvalue references, then both of you have both the Args & amp; Amp; & Amp; and should use std: Forwarded (unless you explicitly want to apply a copy) These will be required in the appropriate reference types.


    vba - How do I keep Excel from binding to the Microsoft Word 15.0 Object Library? -


    We have a very complex Excel 2010 spreadsheet template, every new copy of the template needs to go through many people in our lifetime. .

    Unfortunately, one of the first people using the template is Office 365 installed, after touching it, the spreadsheet starts binding from the Microsoft Word 15.0 Object Library, which is not available on the Excel 2010 PC. . While a personalized broken file can be fixed by unchecking the missing Word Object Library in the VBA code tools> context, I need to find a way to prevent it from being in first place.

    I have reviewed the code in detail and I am not getting any reference to the MS Word object library, so are you bidding Excel to the first place? Is there anything that I can do to stop it?

    Unchester, but something like this will be working in your workbook preceding saved event:

      with this workbook VBProject References for = 1 for 1 phase-1 if insat (atom) (i) .name, "word") & lt; & Gt; 0. Remove the request. (I) Next End  

    Disclaimer: I do not have Office 365 and do not know why this word 15.0; Either way, above it assumes that it does.


    intel 8080 - Read register pair by bits - assembly i8080 -


    I have a hexadecimal value stored in the register pair. And I want to read it with characters. For example, in B in 322 (hexadecimal) I want to save 2 in 2 and then 2 (in ASCII). Is this possible in some way? Or is it possible to store this register pair in "string" by string I mean-> my_string: ds 30 I'm really new to the assembly.

    I remember, "pair B register" is made up of B and C registers. C is less than 8 bits, and B contains 8 bits high. So if you have a value in BC and you want to get hexadecimal digit (4 marks) then the process is something similar:

    1. MOV A, B
    2. Shift A right 4 place (see below) puts 4 high bits of this number in less than 4 bits of A, and clears the high bit of A4. So you have 0 to 15 numbers.
    3. Changing that value to hex digits (0-9, IAF) I remember there was some non-obvious way to do this, but I do not know what it was.
    4. to output that value (or later to save in output to memory).
    5. MOV A, B
    6. ANI 0x0 F - this high 4 bits zero, give you four bits of high byte. MOV A, C
    7. Step 2, 3, and 4
    8. Step 3 and 4
    9. MOV A, C
    10. Li>
    11. Step 3 and 4

    Since I wrote a 8080 code, it has been a long time since, so I'm not going to confuse you with a broken code. Am I will fulfill the requirements above to your needs.

    Note that my use of 0x0F can not be the right syntax for your code. I am trying with the decimal value 15 or hexadecimal value F and I do not know how your codeher hexadecimal constant expresses.

    I do not think there was a change instruction in 8080. However, if it has rotation instructions, instead of transferring 4 degrees, instead of transferring 4, you rotate the four places properly and then assert less 4 bits. This is:

      RAR RAR RR RARI 0x0F  

    ios - How to get the entire text when user taps on UItextview in Iphone -


    I have a UITteview with some names along with it.

    Founder: Eduardo Severin, Chris Hughes, Dustin Moskovitz, Mark Zuckerberg, Andrew McCullum

    When a user clicks on any name, I can get that name and in the API call Must pass as a parameter. Can anyone tell me how to implement this functionality?

    Thanks in advance.

    @coding Voldemort posted an answer, then removed it for any reason.

    The answer is that there is a property text in your text view that gives you the entire content:

      [target column and text: yourTextView.text]; Edit:  

    Edit:

    Use the selected range property of the text view to get a range of selections if you want the selected text, and NSString substring methods Such as part of the string to remove substringWithRange

    If you want to notify the user when changing the selection, apply the delegate method textViewDidChangeSelection .


    automated tests - Allure reports. Screenshots are added to wrong reports using AfterMethod -


    I have Maven and Testing tools on my project. I and I am trying to add screenshots to allocating reports. If I call the method with "Attachment" annotations directly from my test, then everything is fine.

    But if I call it in the "@Efter Matthews" section, then screenshots are added to the wrong report and mixed.

    In both cases, screenshots are generated and saved on disk correctly.

    I have already seen the question here:

    And I think, due to the TestGen adapter, my difficulties can be.

    Call the "Attachment" method What is the right way to do it? What adapter do I use to avoid this problem? Maybe somebody gave me examples of using iTestListener to make screenshots, if a test failed? I have a similar problem with temptation + testNG and it IHookable interface by my BaseTest class. << / P>

    "post-text" itemprop = "text" To implement your run () method, you need to run test normally, but in any case there is a need to catch the exception of taking a screenshot

    Javadoc says that:

    () method will be applied instead of every @ test method The test method will be invited on the greeting of callback () method of the IHookCallBack parameter.

    The code snippet looks like this:

      Public Class Bestset IHookable {@Override Public Zero Run (IHookCallBack call back, ITestResult testResult) {callBack.runTestMethod ( TestResult); If (testResult.getThrowable ()! = Null) {try {takeScreenShot (testResult.getMethod (). GetMethodName ()); } Hold (IOException e) {e.printStackTrace (); }} Attachment (value = "method {0} failure, type =" image / PNG ") private byte [] Lace screenshot throws IOException {get getWebDriver (). GetScreenshotAs (Output Type. BYTES);} }  

    Note that you can not use testResult.isSuccess (), yet, because the result of the test method is unknown and at that time it has a "running" status < / P>


    How do I use a date job parameter in Grails spring batch & SQL? -


    I want to execute a query using 2 date job parameters which are late binding with spring batch.

      JobParametersBuilder Builder = New JobParametersBuilder () builder.addDate ("Until", unless); Builder.edit ("Start", Start); JobExecution Exec = jobLauncher.run (myJob, builder.toJobParameters ())  

    My bean / job definition:

      myReader (JdbcPagingItemReader) {Same - & Gt; Bean.scope = 'step' bean.autowire = 'byname' data source = referee ('data source') queryProvider = ref ('sqlPagingQueryProviderFactoryBean') parameterValues ​​= [start: "# {jobParameters ['start']}" , Unless: "# {jobParameters ['until']}"] pageSize = '10' rowMapper = ref ('myRowMapper') // did not show here} sqlPagingQueryProviderFactoryBean (sqlPagingQueryProviderFactoryBean) {sub -> Bean.autowire = 'byname' bean.scope = 'step' data source = ref ('data source') selectClause = 'some_timestamp, column 2' fromClause = 'some_table' whereClause = 'some_timestamp & gt; = Dali (Started as Timestamp) and some_timestamp & lt; (Such as a timestamp) 'Sort of =' some_timemstamp '}  

    I am getting all kinds of errors, depending on how I should insert timestamps etc. Code):

    step.AbstractStep has failed to perform a task in MyStep for myJob org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; Select some [some_timestamp, some some_table from some_table table = some_timestamp> = cast (? Timestamp) and some_timestamp & lt; Some_timestamp ASC limit by CAST (? Timestamp) by ORDER 10]; Error: Invalid input syntax for typed timestamp: "# {Job parameter ['Start']}"; Error: Invalid input synthesis for type timestamp: nested exception is org.postgresql.util.PSQLException error :: invalid input syntax for type timestamp "# {jobParameters ['start']}" nested exception org.postgresql Use.PSQLException is: "# {JobPameters ['Start']}"

    How do I use the timestamp for my query?

    Instead of using just binding here.

      // within myReader, no need for parameters / parameterValues ​​= [// start: "# {jobParameters ['start']} ", // until:" # {jobParameters ['till']} "// // // within sqlPagingQueryProviderFactoryBean whereClause =" some_timestamp " = '# {JobParameters [\' start \ ']}' :: timestamptz and some_timestamp & lt; ' # {JobParameters [\ 'as ​​long as \']} :: timestamp: " 

    hadoop - How to connect to remote datanode using hdfs client? -


    My target is to download files from HDFS for local file system. I am using a client that connects to remote HDFS NameNode. Hadoop FS Go HDFS: // sourceHDFS: 8020 / path_to_file / file / path_to_save_file and I became an exception

      15/03. / 17 00:18:49 Warning client.ShortCircuitCache: ShortCircuitCache (0x11bbad83): I / O error remote construction: to load 1073754800_BP-703742109-127.0.0.1-1398459391664 15/03/17 12:18:49 warning hdfs. BlockReaderFactory has failed block reader java.io.IOException: found error for OP_READ_BLOCK, self = / 127.0.0.1: 57,733, remote = bigdatalite.localdomain / 127.0.0.1: 50010, file / user / hive / warehouse / b2_olap_hive For .db / dim_deal_log / 000000_0, pool BP-703742109-127.0.0.1-1398459391664 Block 1073754800_13977  

    My understanding of the situation. HDFS connects to the customer's nameNode, but NameNode returns local datanode IPs (because NameNode and DataNode are located on the same machine). And incorrect address of DataNode for remote client 127.0.0.1

    What is the datanode I can connect to right? And maybe my understanding is wrong?

    Thank you in advance

    You can not be bound to 127.0.0.1 . Ensure that the host name entry in / etc / hosts indicates the non-loopback interface. Bounce your detonodes and nominations.


    redis module and perl -


    I have the Strawberry PRL version 5.16.3 and the radis module (1.978) for updating the updated date

    Where do I run the following code:

      my $ r = redis-> new; My% hash = (one => 1, b => 2); Forward my $ key (key% hash) to {$ r- & gt; Set (foo = & gt; 'bar'); }  

    I get the following error:

      can not use an undefined value as a HASH reference on C: / strawberry-perl- 5.16.3.1-64 bit-portable / perl / site / lib / io / socket / time-out PM line 101  

    Is there any problem related to this problem or is there any problem to fix this problem? To know?


    winforms - c# datagridview row indeces validation -


    If I double-click on a row header cell in my gridview, I get an indicative parameter error. I tried fixing my double click event with my Row index statement, but is there any other place I want to do?

      Private Zero DGV1_CellDoubleClick (Object Sender, DataGridViewCellEventArgsE) {try {if ((E. Column Index & gt; 0)) {EditUser eu = new EditUser (); Eu.UserId = DGV1.Rows [e.RowIndex]. Game [1] .Value.ToString (); FormFunctions.OpenMdiDataForm (Program.GetMainMdiParent (), EU); } If (E. randex == 0 || E.RO index == -1) {return; }} Catch (Exceptional Former) {Message Box. Show ("error \ n" + pre. Message, "error", message box button. OK, message box icon. Error); }}  

    Your verification argument is not implemented in the desired order Change to:

      Try {if (e.ColumnIndex & gt; 0 & amp; amp; e.RowIndex & gt; 0) {EditUser eu = new EditUser (); Eu.UserId = DGV1.Rows [e.RowIndex]. Game [1] .Value.ToString (); FormFunctions.OpenMdiDataForm (Program.GetMainMdiParent (), EU); }} Catch (Exceptional Former) {Message Box. Show ("error \ n" + pre. Message, "error", message box button. OK, message box icon. Error); }  

    javascript - Angular modules conflict -


    I use two modules of glass strap () and UI bootstrap (). Is it possible to use both in one application? I have a problem with the dropdown Do I have to choose a module or can I inject the required module? In coach view I use endorsement with UI Bootstrap and dropdown - which is broken, but I want to get glass strap Use the dropdown. How to inject these two modules?

    App. JS

      Angular Modules ('projApp', [.... 'mgcrea.   

    Controller / Coach.js

      Angular. 'ProjApp')). Controller ('CochTrint', Function ($ Range, Coach) {....  

    From the Connor Bootstrap website, you can build a build, where you want to use a single blanket strap, should not be included in the dropdown. In fact, both the libraries provide disputed instructions so that you can choose one or the other

    Unfortunately I do not think the angular one in the strap Ilding system, so you will need to have angled to keep the bootstrap, you remove manually Dayrektivesn source code.


    Query conversion from sybase to SQL Server -


    I have a query that is to convert from SQL to SQL Server, I think that we just need to join the operation Need is part of the question ..

    Can anyone help me here?

      to sy_trcr_divided d, fd_income_trans t WHERE d.fd_id_income is not empty and t.fd_income_transfer_id = d.fd_proc_id and t.fd_income_est_yn = 'y' and d.fd_id_income = a.fd_id and d. Fd_dist_to_i_or_p = 'a' and d.gl_year =: p_lYear and d.gl_period =: p_lPeriod and d.fd_include_stip_yn = 'y'), 0) as ADDTO_FUND to sy_est_income_detail a, fd_master WHERE a.fd_id * = fd_master.fd_id and a .hr_id =: p_szHRID  

    My idea: Change the * = with one join.

    * = should be a left interaction And the piece of query you might be:

      to sy_trcr_divided d Join INNER fd_income_trans t on t.fd_income_transfer_id = d.fd_proc_id WHERE d.fd_id_income is not empty and t.fd_income_est_yn = 'wi 'And d.fd_id_income = A.fd_id and d.fd_dist_to_i_or_p =' a 'and d.gl_year =' p_lYear and d.gl_period =: p_lPeriod and d.fd_include_stip_yn = 'Y'), 0) an ADDTO_FUND with sy_est_income_detail at leftfind_factory_fd_master A.fd_id = Fd_master.fd_id where one. Hr_id =: p_szHRID  

    dataframe - R: Expand contents of cells of a DF -


    इस सवाल का पहले से ही एक उत्तर है: < / P>

    • 4 जवाब

    मेरे पास कुछ नेस्टेड डेटा है एक डीएफ और मैं इसे अन्य सभी प्रविष्टियों के डुप्लिकेट के साथ एक नया डीएफ में विस्तार करना चाहूंगा। उदाहरण के लिए

      x1 x2 x3 1 43 'j, k, d' सेब '2 11' के रूप में, ddd '' pear ' 

    इसमें डीएफ चर एक्स 2 में कॉमा से अलग-अलग प्रविष्टियाँ हैं। मैं एक नया डीएफ तैयार करना चाहूंगा जो निम्नलिखित दिखता है:

    <प्री> x1 x2 x3 1 43 'जे' सेब '2 43' के 'सेब' 3 43 'डी' सेब ' 4 11 'के रूप में' 'पीअर' 5 11 'डीड' 'पीअर'

    कोशिश करो

      लाइब्रेरी (स्प्लिटस्टैक्सशिप) सीएसप्लिट (डीएफ 1, 'एक्स 2', ',', 'लाँग') # एक्स 1 एक्स 2 एक्स 3 # 1: 43 जे सेब # 2: 43 के सेब # 3: 43 डी सेब # 4: 11 के रूप में नाशपाती # 5: 11 डीडी नाशपाती  

    Android: menu option ShareAction versions -


    It is compiled without any errors, but after crashing the activity, I get it at runtime:

      java.lang.UnsupportedOperationException: it is not supported, use android.support.v7.internal.view.menu.MenuItemImpl.getActionProvider (MenuItemImpl.java:645) on MenuItemCompat.getActionProvider () on com ... .... activity .onCreateOptionsMenu  

    line of code (the onCreateOptionsMenu)

      shareProvider = (ShareActionProvider) item.getActionProvider ();  

    MenuItemCompat.getActionProvider (use) asked for, but it is an import and I minSdkVersion is 15, targetSdkVersion 21

    This activity

    >  import android.app.AlertDialog; Android Import Bluetooth. Bluetooth adapter; Import android.content.ContentValues; Import android.content.Context; Import android.content.DialogInterface; Import android.content.Intent; Import android.content.SharedPreferences; Import android.database.Cursor; Import android.database.sqlite.SQLiteDatabase; Import android.database.sqlite.SQLiteOpenHelper; Importroid.os.Bundle; Import android Preference Import android.support.v4.app.Fragment; Import android.support.v4.app.NavUtils; Import android.support.v7.app.ActionBarActivity; Import android.view.Gravity; Import android.view.LayoutInflater; Import android.view.Menu; Import android.view.MenuItem; Import android.view.View; Import android.view.ViewGroup; Import android.widget.AdapterView; Import android.widget.CursorAdapter; Import android.widget.ImageView; Import android.widget.LinearLayout; Import android.widget.ListView; Import android.widget.ShareActionProvider; Import android.widget.TextView; Import android.widget.Toast; Public class activity ActionBarActivity implements AdapterView.OnItemLongClickListener {Private ShareActionProvider shareProvider; @ Override public boolean on cret option menu (menu menu) {getMenuInflater (). Flood (R. menu.menu, menu); Menu item item = menu.findime (raid.action_share); ShareProvider = (ShareActionProvider) item.getActionProvider (); Back true; } @Override public boolean onOptionsItemSelected (MenuItem item) {Intent shareIntent = new Intent (Intent.ACTION_SEND) .putExtra (Intent.EXTRA_TEXT, "text"); SetShareIntent (shareIntent); Back true; } Private Zero SetSheseentant (Intent Shareentent) {if (SharePrice! = Faucet) Share Provider .SetShareEmantant (Share Intent); }}  

    Menu

      & lt; Menu xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: app = "http://schemas.android.com/apk/res-auto" xmlns: tools = "http: //schemas.android.com/tools "tool: reference =" com ....... activity "& gt; & Lt; item android: id = "@ + id / action_share" android: title = "Share" app: Sosakshn = "Ifroom" android: icon = "@ android: drawable / Aisi_menu_shaire" Android: ActionProviderClass = "AndroidkwidgetkShareActionProvider" / & Gt; & Lt; / Menu & gt;    

    When you use ActionBarActivity Instead of using android.widget.ShareActionProvider :

      & lt; Android: id = "@ + id / action_share" Android: title = "share" application: showAsAction = "ifRoom" app: action providerClass = "android.support.v7.widget.ShareActionProvider" /> Errors the error message as  

    and then MenuItemCompat.getActionProvider () .

    Use the note that it is clickable only after calling ShareActionProvider setShareIntent () - as soon as you can ( either onCreateOptionsMenu () is used or when you want to share, load content / onOptionsItemSelected () .

    instead selected /

    sql server - Convert date to datetime and set the time -


    तो मैं कर रहा हूँ

    चुनें कन्वर्ट (DATETIME, t.MyDate)

    और स्वाभाविक रूप से यह 2014-01-01 से 2014-01-01 00: 00: 00.000

    की तरह कुछ बदल जाएगा

    मैं कैसे परिवर्तित और फिर जो भी समय सेट मुझे चाहिए? उदाहरण के लिए, 23.5 9.5 9.9 99?

    आप तिथि के भाग में समय जोड़ सकते हैं:

    < पूर्व> दिनांक और समय का चयन करें (दिनांक समय, '2015-03-17') + कन्वर्ट (समय, '23: 59: 59.999 ')

    एक साइड के रूप में अपना समय नोट करें स्ट्रिंग गलत थी। डॉट () केवल सेकंड और मिलीसेकेंड को विभाजित करता है घंटे और सेकंड के लिए बृहदान्त्र (: ) का उपयोग करें।


    Python requests + proxy + 302 redirect, why incorrect request? -


    I am using Python requests, and I request a proxy but the site, I 302 redirect, and request Does not work properly It appears that the request sends without proxy and the site gets to know my actual IP.

    Pyro code: try: session = session () request = request (', url, headers = headers) prepped = session.prepare_request (requested) resp = Session.send (prepped, proxies = proxy, timeout = 8) session.cookies.clear () print (resp.status_code) except print (resp.history) requests. Exempts.Timeout: Print ("Expiration error ... :(" + "\ n") Exclude requests. Exception. Connection Array: Print ("Connection error ... :(" + "\ n") Except requests .exceptions.HTTP Error: Print ("HTTPError ... :(" + "\ n")

    History of reaction

      & lt; response [302] & gt; Basically I need to send a request from another IP and every time with new cookies as new user and so on. But with this code I do not manage to do this Anybody can help me with this and say what is the problem?   

    r = request.head (url, allow_redirects = true) print (r.url)


    c# - Merge List of custom classes by property -


    मेरे पास एक कस्टम वर्ड वर्डडेट की सूची है:

      class workdate {string dayid; सूची के & lt; स्ट्रिंग & gt; ब्लॉक; कार्यदिवस। जोड़ें (नया कार्यदिवस ("1", {"a", "b", "c"}); workdates.Add (नया कार्यदिवस ("2", {"a", "b"}); कार्यदल । (नया कार्यदिवस ("1", {"d", "ई", "एफ"});  

    मैं उसी पर आधारित सूची आइटम को मर्ज करने के लिए कैसे linq का उपयोग कर सकता हूं

    "1", {"a", "b", "c", "d", "e", "f"}

    < P> "2", {"a", "b"}

      वर्कडेट्स.समूह (X = & gt; x.dayid)। चुनें (जी = & gt; नया कार्यदिवस {dayid = g.Key, blocks = g.SelectMany (x = & gt; x.blocks) .ओलिस्ट ()})। ToList ())  

    sails.js - Deploying Treeline -


    I am trying to track my destiny with any luck at Ubuntu / Digital Ocean Server

    I have worked successfully with Apple (using "forever") and tried to install Trail in the same way.

      Install Trailin-G  

    But after the installation, when trying to do something else, it always gives:

    < Pre> traeline.py: can not connect to x server

    I do not know whether this error node is deployed or the first step of the Trailine Project (which is really good on the other side) ) Is due to lack of experience.

    Thank you in advance.

    Deploying a trail application is actually the same as deploying a sales app because the files that are synchronized The is sales app below the Traline server - you were not just typing the code on your server, instead of typing the code. This is just to preview your app locally, as you make changes in it, instead, when you're ready to deploy, follow all the processes that work for your previous seal app and this Your train will work for the app.

    As far as treeline.py error - which appears to be coming from a pre-installed file on Ubuntu!


    networking - High amount of http read timeouts on azure -


    When we migrate our app to auction from rackspace, we have time to read about 50% of HIT requests saw.

    We tried to keep the client inside the blue with the same result and outside, in this case the customer is also a server BTW, so neither the issues of any geographic / browser. We also tried to increase the size of the box to ensure that the blue was not throttling. But while using the D box for a single request, the result was the same.

    Once we came out of the auction, they started working properly.

    Each question was done directly on an example using a public IP, so there is no load balancer problem either.

    Approximately 50% of the time the timeout ran in this problem was set for 15 minutes.

    50% of HTTP requests end when the area was US 2

    Doing is not common practice is the reason why you need to analyze that by validating the requests due to the deadlines that are killing your VM, I advise you to run a packet capture on your server and Analysis of reaction times, as well as the number of high sensibilities I also see; It is also better that you can take a network trace simultaneously on your client machines so that you can analyze the TCP sequence number and get a comparison of the packet obtained. If you are seeing latency in packet capture or high number of retranslation, then it needs a detailed analysis. I strongly suggest that you open a support incident so that Microsoft support can assist you in examining your problem. Could.


    go - Aligning text in golang with Truetype -


    I am trying to present some text on a PNG, which is using the FreeType / TrueType in the Galang project Used to be. As you can see from an attachment, I am trying to render 4 characters in the column - each letter is centered in the column. The truetype API is used to get the width and width of the glow but I can not be converted to give accurate offset for each glyph, for example with the O glyph, the font is used While I get the following dimensions:

    Hertricks {Advance: 543 left sidebearing: 36} bounds {XMin: 0 YMin: -64 XMax: 512 YMax: 704} Advance width: 512 < / Code> <

    Size: = 125.00 Tile Off Aet: = (int (TileWed): / p>

    * I) + Int (tileWidth / 2) pt: = freetype.Pt (tileoffset, (IMGH -NightWhite) -Inter (size ))

    How can I return the returning glyph dimension correctly to offset the characters truetype? I have tried to use AdvanceWidth as a detailed code (line 160) but it does not give me a consistent result in all the glyphs.

    example of presentation

    As suggested by Simon, using the correct solution AdvanceWidth:

    Crude Example:

    package main import ("flag" "FMT" "IO / Ioutil" "log" "image" "buffio" "picture / illustration" "image / png" "image / color" "github. Com / golang / freetype / truetype "" golang.org/x/image/font "" github ("dpi = flag.float64 (" dpi ", 72," screen resolution in dots per inch ") fontfile = flag.String ( "Fontfile", "/ usr / share / f Hinting = Flag String ("Hinting", "None", "None") Size = Flag. Float 64 ("Size", "T / F / Liberation Serif-Regular TTF", "Filename of TTF Font" , 125, "font size in digits") spacing = flag. Float64 ("difference", 1.5, "line difference (i.e., double meaning double 2)") wonb = flag.Bool ("whiteonblack", wrong, " White text on a black background ") text = string (" JOJO ")) func main () {flag.Parse () fmt.printf (" Fontfile% q \ n ", * fontfile loading) b, Err: = ioutil.ReadFile (* fontfile) If mistake! = Zero {log. The printline (mistake) returns} f, err: = truetype.Parse (b) if mistake! = Zero