Monday, 15 August 2011

iis 6 - Adding Silverlight MimeType using adsutil -


I have a script that creates an app pool, web site - and then I .

I am looking at this:

cscript adsutil.vbs set to W3SVC // root / mimemap ".extension, mime type"

However, since I have been building a web site in the same script, I do not know the ID.

Would anyone know how this ad will work?

Thanks,

  • Rich

You can always add MimeType using web.config instead:

  & lt; Configuration & gt; & Lt; System.webServer & gt; & Lt; StaticContent & gt; & Lt; MimeMap file extension = ".xaml" mimeType = "application / xaml + xml" /> & Lt; MimeMap file extension = ".xap" mimeType = "app / x-silverlight-app" /> & Lt; MimeMap file extension = ".xbap" mimeType = "application / x-ms-xbap" /> & Lt; / StaticContent & gt; & Lt; /system.webServer> & Lt; / Configuration & gt;  

Dynamic Access Form -


I am creating a dynamic form in Access 2003. Combo boxes "Keywords" every time the form is opened "My code is having trouble removing older boxes (or their labels, I'm not sure), and every previous opening is placed on the duplicate name (run-time error '2450').

Secondly, the junction table holding "checked" keywords is filled with less finite amount.

Thirdly, I can not understand how to populate the combo box when the junction table records If the form is loaded then The keys are always unchecked.

Thanks for any help!

I Using a continuous substation, I recommend dividing it into a junction template, which has a record per keyword and main record. Kwyword will be a combo box. Make sure you have a "Duplex Check" index that is the Forgeon Main Record Key And Fusion Keyword Key on the junction table .


winforms - C# Forms application getting stuck On Top -


हे सब, यहां असली अजीब है।

मेरे पास एसी # 3.5 फॉर्म एप रनिंग सर्वर 2008 आर 2।

आवेदन एक बार में स्क्रीन पर 15 सक्रिय रूपों के साथ, एमडीआई है।

समय-समय पर, मैं उस स्थिति में आ जाता हूं जहां पर अनुप्रयोग "फंस" शीर्ष पर होता है, इसका मतलब यह है कि मैं किसी अन्य रूप में ऑल्ट + टैब नहीं कर सकता, कार्य पट्टी दिखाई देती है, लेकिन अन्य रूप आगे नहीं आ रहा है इससे बाहर निकलने का एकमात्र तरीका विंडोज + डी को कई बार मारना है, यह अंततः डेस्कटॉप को दिखाता है, जिस पर मैं कार्य पट्टी में दूसरे चलने वाले अनुप्रयोगों में से एक पर क्लसी कर सकता हूं। जब मैं किसी अन्य एप्लिकेशन पर क्लिक करता हूं, यह शीर्ष पर आता है, लेकिन मेरा आवेदन भी दिखता है।

ऐसा लगता है कि उस समय के लगभग 25% जहां आवेदन चलता है, और कोई कविता नहीं है

किसी भी व्यक्ति को इससे पहले कुछ भी देखा है?

मुझे लगता है कि मैंने इसे यादृच्छिक अनुप्रयोगों के साथ कुछ बार देखा है, और मुझे यकीन नहीं है कि इसे कैसे तय किया जाए।

मैंने जो गौर किया है वह है कि अग्रभूमि ऐप वास्तव में फोकस खो देता है, लेकिन लक्ष्य ऐप ने लाभ फोकस नहीं किया आप यह देखकर यह देख सकते हैं कि अग्रभूमि ऐप के शीर्षक बार फोकस (ग्रे, जब तक कि आपकी रंग योजना अलग नहीं है) खो गया। आसपास काम करने के लिए, वापस को अग्रभूमि ऐप पर स्विच करें, फिर से दोबारा, और सभी को अच्छी तरह से करना चाहिए।


generics - Java Collections.sort - help me remove the unchecked warning -


  सूची & lt; प्रश्न & gt; प्रश्न = नया ArrayList & lt; प्रश्न & gt; (); questions.addAll (getAllQuestions ()); // प्रश्न संग्रह का एक समूह देता है। स्रोत (प्रश्न, नया बीन कॉम्पापारर ("प्रश्न आईडी")); //org.apache.commons.beanutils.BeanComparator  

जावा 1.5 के तहत, इसके बाद के संस्करण ठीक काम करता है, इसके अलावा कि 'नया बीन कॉम्पापारेटर ("प्रश्न आईडी)" एक अनियंत्रित चेतावनी उत्पन्न करता है मुझे चेतावनी पसंद नहीं है I क्या कोई तरीका है कि मैं बीन कॉम्पापरेटर को एक प्रकार प्रदान कर सकता हूं, या क्या मुझे @SuppressWarnings ("अनचेक") ?

विकल्प हैं:

  • BeanComparator को लागू करने के लिए Comparator & lt; प्रश्न & gt; यह एक वास्तविक विकल्प नहीं है, यह एक प्रसिद्ध बाहरी पुस्तकालय वर्ग है। लोग आपको ऐसा करने नहीं दे रहे हैं।
  • ऊपर के रूप में BeanComparator को फोर्क और संशोधित नहीं करें, इसे एक अलग FQN दे।
  • मौजूदा <कोड > बीन कॉम्पापैर उस क्लास के साथ जो Comparator & lt; प्रश्न & gt;
  • questions से की सूची & lt;? & Gt; ;
  • सप्रेस चेतावनी एनोटेशन जोड़ें।

c# - Avoiding a double serialize/deserialize -


I have a WCF webservice that acts as a proxy between the WCF window service and client interfaces. This is done because our program can have a central "state" server, while webwives can be distributed.

Ideally I want to host mid IIS by hosting WCF webservice serialization and feeding bytes through the IIS client directly on the Windows service. Is this possible?

Why not use directly? I think a cluster proxy will work better to deliver requests from the WCF service.


.net - DotNetOpenAuth submit multipart/form-data -


Whether to upload files with the DotNet OpenOff and to submit through multipart / form-data, Samples Available?

There is no sample to use it, but here's how you use the PostMultiPart method. New DotNetOpenAuth V3.3

  using DotNetOpenAuth.Messaging; Web consumer consumer; // You have started this var endpoint - New Message Recording EndPoint (URL, http deliverymops.poomerexquest.http.details authorization headerRequest); IDirectWebRequestHandler RequestHandler = Consumer Channel. Webrequesthandler; Var parts = new list & amp; MultipartPostPart & gt; (); Parts.Add (MultipartPostPart.CreateFormPart ("key", "value")); Parts.Add (MultipartPostPart.CreateFormPilePart ("filefield", "c: \ temp \\ foo.txt", "text / plain")); HttpWebRequest req = consumer.PrepareAuthorizedRequest (endpoint, token); Incoming web dispatch response = req.PostMultiPart (Request Handler, Part); // Yes, this is an extension method  

c++ - Boost: what could be the reasons for a crash in boost::slot<>::~slot? -


मुझे ऐसी दुर्घटना हो रही है:

  # 0 0x90b05955 __gnu_debug :: _ safe_iterator_base में: : __gnu_debug :: _ Safe_iterator_base :: _ M_attach # __gnu_debug :: _ Safe_sequence_base :: _ M_detach_all # safe_base.h पर 3 0x000bc54f __gnu_debug में :: _ Safe_sequence_base :: ~ _Safe_sequence_base में 2 0x90b05afa में _M_detach # 1 0x90b059ce: 170 # 4 0x000aac05 __gnu_debug में :: _ Safe_sequence करें & lt ; __ gnu_debug_def :: वेक्टर और लेफ्टिनेंट; बढ़ावा :: सिग्नल :: ट्रैकएबल कॉन्स्ट *, स्टडी :: ऑलोकेटर & लेफ्टिनेंट; बढ़ावा :: सिग्नल :: ट्रैकएबल कॉन्स्ट * & gt; & Gt; & Gt; :: ~ _Safe_sequence at safe_sequence.h: 97 # 5 0x000ac9c1 __gnu_debug_def :: वेक्टर & lt; boost :: सिग्नल :: ट्रैकयोग्य कॉन्स्ट *, स्टडी :: ऑलोकेटर & lt; boost :: सिग्नल :: ट्रैकयोग्य कॉन्स्ट * & gt; & Gt; ::: वेक्टर वेक्टर: 95 # 6 0x000acf65 को बढ़ावा :: सिग्नल :: विस्तार :: स्लॉट_बेस :: डेटा_टी :: डेटा_टी स्लॉट। एचपी: 32 # 7 0x000acf8f में boost :: checked_delete & lt; boost :: signals :: विस्तार :: slot_base :: data_t & gt; Check_delete.hpp पर: 34 # 8 को बढ़ावा देने में 0x000b081e :: विस्तार :: sp_counted_impl_p & lt; boost :: signals :: detail :: slot_base :: data_t & gt; :: sp_counted_impl.hpp पर निपटारा: 78 # 9 0x0000a016 को बढ़ावा :: विस्तार में: : Sp_counted_base :: release at sp_counted_base_gcc_x86.hpp: 145 # 10 0x0000a046 को बढ़ावा :: विवरण :: shared_count :: ~ shared_count at shared_count.hpp: 217 # 11 0x000a9fb0 में बढ़ावा :: साझा_पीट & लेफ्टिनेंट :: बढ़ावा :: सिग्नल :: विस्तार :: Slot_base :: data_t & gt; :: shared_ptr at shared_ptr.hpp: 169 # 12 0x000aa459 को बढ़ावा :: संकेत :: विस्तार :: slot_base :: slot_base slot.hpp पर: 27 # 13 0x000aad07 बढ़ावा :: स्लॉट & lt; बढ़ावा: : फ़ंक्शन & lt; bool () (char, int) & gt; & Gt; ::: स्लॉट स्लॉट.hpp: 105 # 14 0x001b943b मुख्य में vermes.cpp: 102  

यह कोड है:

  # शामिल करें & lt; boost / signal.hpp & gt; # शामिल करें & lt; boost / lexical_cast.hpp & gt; # शामिल करें & lt; boost / function.hpp & gt; # शामिल करें & lt; boost / bind.hpp & gt; बूल डममिफन्क (चार, इंट) {वापसी झूठी; } Int main (int argc, char ** argv) {boost :: sign & lt; bool (char, int) & gt; myslot; Myslot.connect (0, & amp; dummyfunc); वापसी 0; }  

यह पहली बार है कि मैं बूस्ट के साथ काम कर रहा हूं और मैं इस परियोजना के कोड के लिए पूरी तरह से नया हूं जो मैं यहां पोर्ट की कोशिश कर रहा हूं।

यही कारण है कि मैं पूछना चाहूंगा कि इस तरह की दुर्घटना बूस्ट द्वारा समझाई गई किसी भी तरह से हो सकती है या अगर यह बूस्ट से संबंधित नहीं है।

मैंने पहले से ही दुर्घटना को समझने की कोशिश की है, लेकिन मैं किसी तरह फंस गया। ऐसा लगता है कि संभवतः std :: vector, जो कि यहाँ हटाया जा रहा है, गड़बड़ कर दिया गया है (गड़बड़ = स्मृति भ्रष्ट) वेक्टर स्लॉट_बेस :: डेटा_टी का सदस्य है हटाए गए स्लॉट_बेस :: share_ptr के नाशक में किया जाता है तो शायद share_ptr भी गड़बड़ हो गया था - इसलिए संभवतः यहां तक ​​कि पूरे स्लॉट_बेस को गड़बड़ कर दिया गया था। लेकिन मेरे पास कोड में, मुझे वास्तव में एक कारण नहीं देखा गया है कि उस मेमोरी को गड़बड़ क्यों किया जा सकता है। MySlot के निर्माण के बाद भी यह पहली पहुंच है।

इसके अलावा: मुझे भी सच में समझ में नहीं आ रहा है कि जब मैं कनेक्ट करता हूं तो ~ slot_base () को यहां कहा जाता है। लेकिन मुझे भी कनेक्ट सदस्य सदस्य नहीं मिला। क्या यह एक जादू मैक्रो कहीं है?

मुझे समस्या मिली जब मैं इन पूर्वप्रक्रमक परिभाषाओं को सक्षम करता हूं (मेरे Xcode डीबग कॉन्फ़िगरेशन में डिफ़ॉल्ट रूप से करता है), तो यह क्रैश हो जाता है:

  -D _GLIBCXX_DEBUG = 1-डी _GLIBCXX_DEBUG_PEDANTIC = 1  
< P> मुझे लगता है कि बूस्ट (बजाम) बिना संकलित किए हैं और ऐसी समस्याओं का कारण बनता है क्योंकि एसटीएल संरचनाएं (जैसे वेक्टर) द्विआधारी रूप में अलग दिखती हैं जब इसे या इसके बिना संकलित किया जाता है।


c# - Serializing objects into the database while maintaining flexibility -


The properties of the object will change over time, keeping in mind that what I do to serialize an object in the database Want the approach?

First of all, I thought about ensuring that all my objects apply an interface, but when an interface loses one asset and another takes advantage, what happens is restoring But what about the current serial data in the database?

Should I use intangible classes or interfaces?

Below is a partial implementation that lets you resize flexibility and get some ideas For the management of additional additions and deletions, when you do not add any problems to the properties when you drop the properties, you can not allow to create such new properties in the future, but preserve existing data or All data associated with those properties Let programmed removed.

  /// & lt; Summary & gt; /// Data storage can look something like this // Creating a Table PersistObject (ObjectId Int) /// Create Table PersistProperty (PropertyId int, PropertyName varchar (50)) /// Table data (ValueId int, PropertyId int, SerializedValue Image) /// & lt; / Summary & gt; Interface IFlexiblePersistence {This object [string propertyName] {get; Set;} zero continuous (); } Category Person: IFlexiblePersistence {Language & lt; String, Object & gt; Information; Public person (int interior) {data = popupperson data (person ID); } Public this [string propertyName] object [retrieve {return data [propertyName]; } Set {data [propertyName] = value; To be continued (); }} Public Zero Continuous () {LoopThroughAllValuesAndSaveToDB (); }}  

functional programming - Can somebody please explain this continuation in scheme? -


I am learning continuity but I can not wrap my head around this code. Why does it go in infinite loop?

  (but (cont #f)) (call / cc (lambda (k) (set! Cont k)) (cont #f))  
< Line divider:

  • We define local variables
  • We call some lambda functions with the current continuity, that is, we are continuing the lambda function as the argument to the current argument. Current continuity is a function of argument 1, this argument is then used as the "return value" of call / cc (and finally it has been ignored).
  • Then after a few things in our case with << Code> (Lambda (call / CC-retal) (let's) (call / CC-Rated (cont #f)) . We set the cont value for this continuity. Return cc / cc .
  • Since cont is now a function that represents continuity, and its argument is "call / cc return value", we call that function, the argument is ignored, and Visit us at (cont #f)
  • >


sqlite - Thread synchronization in C#? -


I have very few small functions, each executes a query. I want only one function to run at a time, what is the best way to thread sync to avoid database lock issue in SQLite (C #).

The function is in many classes, how you lock all functions in all DB sections, so that only one function from any DB class is executed.

I will play devil's advocate ... why would you call them in different threads, if at the same time Will one execution? I just keep things in a queue and read one line in a row at the same time.

EDIT: According to my comment below, here is an example of a supporting class that you can use to reactivate your data in a more centralized location. This is a very basic example and there is no test.

  class database {private string connection string; Private Readonly Object syncRoot = new object (); Public database (string connection string) {this.connectionString = connectionString; } Public Zero ExecuteReader (SqlCommand command, verb & lt; idatarecord & gt; forEachRow) {lock (syncRoot) {(var connection = new SqlConnection (connectionString)) {command.Connection = connection; Connection.Open (); (Reader.Read ()) while using {var reader = command.ExecuteReader ()) {forEachRow (reader); }}}}}} Var myDB = new database ("connection string"); Var myCommand = New SqlCommand ("Choose ID from Blah"); MyDB.ExecuteReader (myCommand, line => console.wrightline ("id: {0}", line ["id"]));  

c# - About Sybase image -


Can the image data type be changed into a byte array in sybase? I apply the web service to set data in the (image data type) I use byte [] to return the web service. Then I want to show the image "response.binarywrite (byte [])" I use. (ASP.NET C #) but there is an image distortion problem (when I zune in the image, some points are remembered). I do not know how anyone knows that the image data type in Sybase can be transferred to the byte array?

System:

1 Sybase

  Sybase DB: 11.9.2 Adaptive Server Enterprise 12.5.1 Sybase. Data. ASC client: 1.0.152.0  

2 ASP.NET C # (Visual Studio 2008)

3 IE 6

< Div class = "post-text" itemprop = "text">

Finally, let me know. The cause of this problem is the limit on the size of the image in Sybase when the size of the image is more than 37k bytes, the output is still 37K, so I miss some bytes in this step. The solution is that you have to set the parameter to retrieve all the data. Partial codes are shown below:

  [WebMethod] public byte [] image (string c, string r) {// check input .. connection dubbs connbaseloc = new ConnectionDatabase (); Eclipse conn1 = null; ASCOMMand CMD1 = Faucet; String sqlstr1 = ""; Acadata Reader Reader = Faucet; Byte [] Imagebytes = null; Try {{conn1 = connbaseloc.Odbcconn_xxx ()) {string setTextCmd = "SET TEXTSIZE 130000"; // set parameter cmd1 = new precom (setTextCmd, conn1); Cmd1.ExecuteNonQuery (); Sqlstr1 = "select ...."; CMD1 = new Ace Command (sqlstr1, conn1); Cmd1.CommandText = sqlstr1; Reader = CMD1 Spare reader (); While (reader.Read ()) {Imagebytes = (byte []) reader ["image"]; }}} Hold (exception e) {// do something} finally {if (conn1! = Null) conn1.Close (); } Returns Imagebytes; }  

The parameter value depends on the images of your maximum size.


iphone - UITextView has no events -


I'm developing an iPhone application for which to capture some text, a multi-text text field (UITextView) is needed.

When the user touches the text then it becomes the first responder and displays the keyboard. What do I need to do, remove the keyboard when the user finishes? Normally a return / made button with a text field will signal the end of the typing typing and I will first use the representative to resign the respondent. However, with a multimedia text view I want the user to add a new line so that it is not possible.

The first responder will have to resign when my next option is to touch up outside the reader's view. The problem here is that there are no events declared on UITextView that I can see in the interface builder.

How can I create a multilay text field in an iPhone app that will release the first reaction at a specific time, the user is done with it?

You can use a full button on the navigation bar:

 < Code> - (zero) viewDidoadload [[Super Viewedload]; Self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemDone Target: Self Operation: @selector (doneAction :)]; }  

To dismiss the keyboard, handle events like this:

  - (zero) action done: (ID) Sender { [TextView resignFirstResponder]; }  

(Remember the .h file announcement)


How to print an integral template argument at compile time in C++ -


कहते हैं मैंने इस तरह एक टेम्पलेट क्लास लागू किया है:

  टेम्पलेट & lt; size_t N & gt;  

मैं चाहता हूं कि जब भी कंपाइलर एक खंड की रचना करता है जैसे

  c & lt; 20 & gt; सी;  

यह एक संदेश मुद्रित करेगा

"वर्ग सी को एन = 20 के साथ templated है"

मैं ' #pragma और static_assert व्यर्थ में करने की कोशिश की है।

समस्या यह है कि #pragma और static_assert के साथ, मैं एक संदेश में एक अभिन्न (20 यहाँ) एम्बेड नहीं कर सका ;

  • प्रीप्रोसेसरों के साथ, यह बहुत जल्दी है कि N को 20 के साथ प्रतिस्थापित नहीं किया गया है।
  • क्या कोई तरीका है या कोई रास्ता नहीं?

    धन्यवाद।

    आप एक पोस्ट-बिल्ड चरण जोड़ सकते हैं जो आउटपुट द्विआधारी के भीतर सभी संकलन के बाद सभी बाध्यता प्राप्त करता है टेम्पलेट पूर्ण हैं I उदाहरण के लिए, जीएनयू टूलचैन का उपयोग करके आप यह कर सकते हैं:

      बनाओ एनएम एफू | C ++ filt | Grep 'C & lt; [^ & gt;] \ + & gt; :: f'  

    जहां foo आउटपुट बाइनरी का नाम है।

    < P> नियमित रूप से अभिव्यक्ति को स्पष्ट रूप से टेम्पलेट इंस्टीटियेशन्स ढूंढने के लिए बदलना होगा, लेकिन यह उदाहरण आपके उदाहरण class C के लिए काम करता है।

    आप भी बहुत उपयोग कर सकते हैं किसी भी प्रकार के सभी टेम्पलेट इंस्टीटयेशन्स को ढूंढने के लिए विस्तृत regex:

      grep '& lt; [^ & gt;] \ + & gt; ::'  < / Pre> 

    यह संयोग से यह स्पष्ट करने का एक शानदार तरीका है कि एसटीएल या आईओस्ट्रीम पुस्तकालयों के प्रयोग से प्रतीत होता है कि छोटे प्रोग्राम भी ब्लोट करते हैं। टेम्पलेट इंस्टाशन की संख्या वास्तव में आश्चर्यजनक हो सकती है!


    Caching dynamic images in Rails -


    I am using a rmagick gem to create dynamic images from a controller. The controller takes an ID as an absolute, monitors a model, writes text to an existing image, and outputs it.

    I have created a disc vs. write for every request to run some criteria and if it is already present then using send_data to output it I have not seen much difference between the requests between these two methods.

    Is there any best practice for writing on disk rather than caching the image or dynamically generating it for every request? Once generated, these images are more stable but I would like the option to regenerate it after a certain time interval.

    The best practice is for cached images and allows to serve the webserver.

    Use webserver like Apache or Nginx in front of your rail app, and make sure that you write a picture where the webserver can serve it, so if your train route / dynamic_images / 3.png evaluates for (which calls dynamic_images_controller verb show id = 3 and format = png], that image to be public / Dynamic_image / 3.png and send it to the controller in the send_file sub

    The next time that the file is requested ( /dynamic_images/3.png ), the webserver will happily serve it (cached) and the Rail app Also will not hit.

    For advanced needs,, and cleaning your controller code, have a look at the gem.


    visual studio 2008 - Debug tt templates in VS2008 -


    Is there a way to debug TT files? I have installed SubSonic 3 and all the template storage processors. It remains empty after 'run custom tools'.

    read that the use of both will explain:

  • JIT debugger ( By putting debugger. Brack ( in your template code) and
  • Connecting the Visual Studio process manually to the second example of the studio
  • Second Windows is useful for system users:

    • Vista
    • 7
    • Server 2008
    • Server 2008 R2
    • ...

    SubSonic 3 Repository - SQLite In-Memory -


    Before investing time in revising the SubSonic 3 source, I thought I should ask to ask whether I am missing something simple or not.

    Is it possible to use the subsonic 3 repository with the migration to the SQLite in-memory database? I can not find a way to force the DbDataProvider to keep the connection open so that in-memory secured will not disappear when the connection is received.

    The unit test with the connection string was I was trying to ...

      public class SQLite_Inmemory_SimpleRepositoryTests {Public Sector Job (Public Guide Job) {Received; Set; } Public String JobName {get; Set; }} [Facts] Public Zero SQLite_Inmemory_SimpleRepo_CanStayOpen () {IDataProvider Provider = ProviderFactory.GetProvider ("Data Source =: Memory:; Version = 3; New = True; Pooling = True; Max Pool Size = 1;", "System.Data .SQLite "); Irrespotory repository = New Simple Repository (Provider, SimpleRepository Options. Renewal); {Var job = new job} {JobId = Guid.NewGuid (), JobName = "Job _" + i} for (Int i = 0; I & lt; 10000; i ++); Repository.Add (work); }}}  

    I tried to set a "shared connection" on IDataProvider, but the connection was still closing.

    If not, then I submit SubSonic sources, and changes.

    Thank you! Interesting - Nobody is about to do this other than the way I build a steady IDataProvider;

    I think you can make such a thing by applying it to IDataProvider so you need to set things up - all the execution goes through it. But it is surprising to me whether we explicitly close some things in the calling code - which will be a bad design on my part ... hmmm

    Would like to like this feature ...


    jquery - li:lt(4) is not getting all list items less than the count of 4? -


    यह मेरा HTML है:

      & lt; ol id = "front-page" & gt ; & Lt; li & gt; & Lt; img src = "चित्र / डिफ़ॉल्ट इमेज। Gf" alt = "डिफ़ॉल्ट छवि" / & gt; & Lt; a href = "#" शीर्षक = "शीर्षक प्रविष्टि" & gt; शीर्षक प्रविष्टि & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; img src = "चित्र / डिफ़ॉल्ट इमेज। Gf" alt = "डिफ़ॉल्ट छवि" / & gt; & Lt; a href = "#" शीर्षक = "शीर्षक प्रविष्टि" & gt; शीर्षक प्रविष्टि & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; img src = "चित्र / डिफ़ॉल्ट इमेज। Gf" alt = "डिफ़ॉल्ट छवि" / & gt; & Lt; a href = "#" शीर्षक = "शीर्षक प्रविष्टि" & gt; शीर्षक प्रविष्टि & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; img src = "चित्र / डिफ़ॉल्ट इमेज। Gf" alt = "डिफ़ॉल्ट छवि" / & gt; & Lt; a href = "#" शीर्षक = "शीर्षक प्रविष्टि" & gt; शीर्षक प्रविष्टि & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; img src = "चित्र / डिफ़ॉल्ट इमेज। Gf" alt = "डिफ़ॉल्ट छवि" / & gt; & Lt; a href = "#" शीर्षक = "शीर्षक प्रविष्टि" & gt; शीर्षक प्रविष्टि & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; img src = "चित्र / डिफ़ॉल्ट इमेज। Gf" alt = "डिफ़ॉल्ट छवि" / & gt; & Lt; a href = "#" शीर्षक = "शीर्षक प्रविष्टि" & gt; शीर्षक प्रविष्टि & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; img src = "चित्र / डिफ़ॉल्ट इमेज। Gf" alt = "डिफ़ॉल्ट छवि" / & gt; & Lt; a href = "#" शीर्षक = "शीर्षक प्रविष्टि" & gt; शीर्षक प्रविष्टि & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; img src = "चित्र / डिफ़ॉल्ट इमेज। Gf" alt = "डिफ़ॉल्ट छवि" / & gt; & Lt; a href = "#" शीर्षक = "शीर्षक प्रविष्टि" & gt; शीर्षक प्रविष्टि & lt; / a & gt; & Lt; / li & gt;  

    और मेरी jQuery:

      $ (दस्तावेज़) .ready (function () {$ ('ol # front- पृष्ठ ')। (' ली: ईक (4) ')। सीएसएस ("मार्जिन", "0"); $ (' ओएल # फ्रंट-पेज ')। (' ली: एलटी (4) 'ढूंढें)  

    });

    और जो मैं करने की कोशिश कर रहा हूं, उसमें पहले 3 सूची आइटम हैं (जो "& lt; span & gt; नई & lt; / span & gt; उनके पास जोड़ा गया स्पैन यह अवधि को 0 तत्व पर जोड़ देगा, लेकिन अन्य 3 नहीं होगा?

    मदद के लिए धन्यवाद!

    आपका कोड पहले 4 ली तत्वों में से प्रत्येक के बाद अवधि जोड़ता है क्या आप ऐसा करने की कोशिश कर रहे हैं?


    How to include unit tests in a ruby module? -


    I am trying to include unit tests for the module in the same source file as a module, the model after.

    #! / Usr / bin / env ruby ​​is required 'test / unit' modulino def modulino_function return 0 end end class ModulinoTest & lt; Test :: Unit :: Test series includes modulin df test_modulino_function assert emble (0, modulino_function) end and

    , I can now run the unit-test executing this source file.

    But , I am still running when I have to load / load them from any other script. How can this be avoided?

    Is there another idiotic way to get it with Ruby, unless this practice is discouraged? Personally, I have never heard of anyone trying to do this in Ruby.

    This is definitely not a standard practice, he said that you may be able to take advantage of this trick:

      if __FILE__ == $ 0 # do something .. run the test, one Call method, etc. We are direct   

    If the code is executed directly, then if code is executed in the block , then if it is required by any other library or application it occurs.

    More Ruby moves are here:


    iphone - save selected row in UITableView after reloadData -


    I write a custom jabber client in the iPhone.

    I use it as an engine.

    And I have the USTableViewController with NSMutableArray for the Resistance Contact list.

    When I (or any material it changes) roster (aka contact list) I want to change the UITableView item (add / remove / modify). Therefore, if the user works with the list, then update

      by [item addObject: newItem] in the time list; [Self.tableViewReloadData];  

    User has lost the current selection item.

    So, my question is how is left (if possible, I mean the selected item has not been deleted) Reload Select existing item after data?

    Thx. The easiest way is to:

      NSIndexPath * ipath = [ Self.tableView indexPathford selected]; [Self.tableViewReloadData]; [Self.tableView selectRowAtIndexPath: animated ipath: no scrollPosition: UITableViewScrollPositionNone];  

    windows - Disable "Slow script" dialog in Safari while debugging javascript? -


    I am using a JavaScript debugger built on Safari 4 on Windows (Webkit Web Inspector), but when I ' To keep going through the medium I continue the "slow script" dialogue which I am worried / every few seconds.

    Is there any way to shut it off or prevent me from motivating every few seconds?

    Disable "escape javascript timer" under the development menu


    c++ - Default encoding for variant bstr to std::string conversion -


    I have a version BST pulled from the MSX dom, so it is in UTF-16. I'm trying to figure out what the default encoding is with this conversion:

      VARIANT vtNodeValue; PNode-> Get_nodeValue (& amp; vtNodeValue); String strValue = (char *) _ bstr_t (vtNodeValue);  

    By testing, I believe the default encoding is either Windows 1252 or ASCI, but I'm not sure.

    BTW, this is part of code I

    Thanks!

    operator four * method call _com_util :: ConvertBSTRToString () . Very disappointed, but I think it uses the existing locale setting to perform the conversion.

    Update:

    Internal, _com_util :: ConvertBSTRToString () call WideCharToMultiByte , for all code pages and default character parameters Zero is passing. This is similar to passing CP_ACP , which means that the current ANSI code-page setting of the system (not the current thread setting) is to be used.

    If you want to avoid losing data, you should probably call directly Wide Multibyte and use CP_UTF8 . You can still consider the string as a redundant single-byte string and you can use std :: string , you can not consider the bytes as characters.


    If I use nhibernate to map tables 1:1 with no associates, do I still need dynamic proxy etc? -


    If I just want to keep things very simple, and just POCO 1:

    for example Instead of:

      class class order commands  

    where you have:

      order o = new order ( ); O.Items & lt; - Collection of OrderItems that will query DB by using lazy loading  

    I have to do this manually:

      order o = myDAO.FindById ( 1); Order items i = myDAO2.FindByOrderId (OID);  

    To use this approach, do I need to use the castle.dynamic proxy DLL now and I have to work around a medium trust issue?

    If you are not using lazy loading then you do not need a proxy so far That when you download from nhforge, the assemblies are divided into essential and essential-lazy-loading.


    html - Is putting a div inside an anchor ever correct? -


    I've heard that putting a block element inside an inline element is an HTML error:

     < Code> & lt; A href = "http://www.mydomain.com" & gt; & Lt; Div & gt; We have a problem here, you see, an anchor element is an inline element, and the div element is a block level element & lt; / Div & gt; & Lt; / A & gt;  

    But what if you style the external anchor in the stylesheet as display: block ? Is it still wrong? The HTML 4.01 seems to be on the spec:

    Style sheets provide means to specify the rendering of arbitrary elements, including whether the element is provided as a block or inline is. In some cases, such as an inline style for list elements, it may be appropriate, but generally, the authors are so discouraged from overriding the traditional interpretation of HTML elements like this.

    Anyone else have more suggestions about this issue?

    Depending on the version of HTML you are eating:


    c# - Can Windows Workflow Runtime run 2 workflows at the same time -


    We used the factory / singleton pattern to create workflow runtime.

    When we run workflow we use an AutoResetEvent waitHandle.WaitOne () to wait to complete the workflow.

    If two workflows run at the same time, then they respond to the same AutoResetEvent and receive the return value for both calls, the first call.

    Is there any way to fix this without making a new workflow runtime for every call?

    Thank you

    Shiraz

    Edit

    Here is a simplified version of the code:

      Process of Public Sector: IPOs {Private AutoRate Event Wait Hangal = New AutoRetset (Incorrect); /// & lt; Summary & gt; /// Return values ​​will be & lt; /// & lt; / Summary & gt; Private dictionary & lt; String, Object & gt; ReturnValues; Public Process Carbo Preprocess (Processor Cargo Cargo) {Try {Workflow Runtime Workflow Time = Workflowfitter GatWorks flow runtime (); WorkflowtimeTime Workflow + = new event handler & lt; Workflow End Event Series & gt; (Complete workflow); WorkflowtimeTime Workflow Excluded + = New Event Handler & lt; Workflow determined event event & gt; (Workflow timed); Workflow Runtime Services ExceptionNotHolded + = New Event Handler & lt; ServicesExceptionNotHandledEventArgs & gt; (Workflowmantimize exception exception nothandedhand); Dictionary & lt; String, Object & gt; Parameter = New Dictionary & lt; String, Object & gt; (); // Add Parameters Workflow Instance Workflow Instance; Workflowinstance = workflowtimetime.createflow (typef (process workflow), parameter); WorkflowInstance.Start (); WaitHandle.WaitOne (); Cargo A = (A) Return value [KA]; } Hold (exception e) {LoggingHelper.LogFault (E); throw; } Return cargo; }  

    This workflow factory is based on the step in the Windows Workflow Foundation step book:

      public static class workflowfree {// Workflow Runtime Private Static Workflowtimetime_workflowRuntime = single instance of tap; // lock (sync) object private static object _syncRoot = new object (); /// & lt; Summary & gt; /// factory method /// & lt; / Summary & gt; /// & lt; Returns & gt; & Lt; / Returns & gt; Public Static Workflow Runtime GetWorkflowRuntime () {// In case of multi-threaded // (concurrent) access lock execution thread Lock (_syncRoot) {// Check for Startup Status if provided (for zero == _workflowRuntime) {// Shutdown App Dotman. CurrentDomain.ProcessExit + = new event heredollar (stopwalkerflontemime); AppDomain.CurrentDomain.DomainUnload + = New EventHandler (StopWorkflowRuntime); // is not started, so create example _ workflow storage = new workflow runtime (); // runtime _workflowRuntime.StartRuntime start (); } // Return // Return Singleton Example Return _ WorkflowRertime; } // lock} // Shutdown method static zero StopWorkflowRuntime (Object Sender, EventArgs E) {If (_workflowRuntime! = Null) {if (_workflowRuntime.IsStarted) {try run // runtime _workflowRuntime.StopRuntime ()}; } {ObjectDisposedException} {// has already been dealt with, so ignore ...} // hold} // if} // if}}  

    < Div class = "post-text" itemprop = "text">

    A single Windows workflow runtime can run multiple workflows at the same time. The code you have placed around the runtime, which needs fixing.

    What is waiting on the waiting handle? Why are you waiting? Why are you using the same handle for multiple workflow instances?


    fstream - C++ text file pointer problems -


    I am writing a function that (if the file already exists) increases the number one by one and adding its parameters Work at the end of the file

    Example:

    1. Attachments (49);
    2. Attachments (5,6);

    File content 1: 1 \ n 4 \ n 9

    file content at 2: 2 \ n 4 \ n 9 \ n 5 \ n 6

      int attachment (int oz, int ojatepe) {ifstream infile; Infile.open ("stuff.txt"); If (infile.fail ()) {infile.close (); Offream outfile; Outfile.open ("stuff.txt"); Outfile & lt; & Lt; 1 & lt; & Lt; Andal & lt; & Lt; Obj & lt; & Lt; Andal & lt; & Lt; ObjType; Outfile.close (); } And {int length = 0; While (Infile.eof ()) {int temp; Infile & gt; & Gt; Temporary; Length ++; } Infile.close (); Infile.open ("stuff.txt"); Int fileContents [Length]; Int i = 0; While (Infile.eof ()) {/ * the program does not enter here * / infile & gt; & Gt; FileContents [i]; I ++; } Infile.close (); Offream outfile; Outfile.open ("stuff.txt"); FileContents [0] + = 1; (I = 0; i  

    The program does not enter the loop for a second time, so the content is never copied into the array and then in the file. I'm really sure what the problem is, or how to fix it, any help would be welcome. :)

    Instead of closing the file and reopening (I'm not sure this operation reset Do not use the file position!) And just to start the file "Rewind"

      infile.seekg (0, ios :: beg!)  

    How to display metainformation about single commit in git -


    I want to parse metainformations from git repository. I would like to receive the same information for a committed, like

      git log - spety = format:% a HEAD ^ .. HEAD  

    problem That is, it is not working for the commission in the first repository.

      git show - spety = format:% a HEAD ^ .. HEAD  

    Anything that I want is close to me, except to me the actual difference There is no interest in parsing.

    Any idea how the GIT log works for the first commitment or how to show content content by deactivating the guit show?

    Or, is there any better way to get metadata about the given commitment?

    Provide silent options to suppress the dispute.

      git show - main title  

    For your example, author's name:

      GIT show - Quit - Prite = Format:% a  

    ASP.Net MVC Memberships -


    I want to use AuthorizeAttribute, to control which users are allowed to do my work. I just want to make it clear that my argument is in order

    1. I used to implement my own IPrincipal
    2. I used a security controller for a login operation Credit post
    3. I verified the credentials with a UserService class and assigned the IPrincipal from my UserService class to HttpContext.User
    4. returned to my WebAuthorizeAttribute, which AuthorizeAttribute inherits, checks current HttpContext.User.Identity.IsAuthenticated and HttpContext.User.IsInRole if the user has access to the action to determine.

    What is the normal flow of things? I know that I can get to the membership provider, but I do not need all the functions there, in fact there is the ability to login only with two different roles.

    You have to store the IPrincipal somewhere and restore it with every request. If you use FormsAuthentication, this is a good solution:

    You can find other solutions here:

    And in Proppose many other StackOverflow questions :)

    Edit

    About MyBusinessLayerSecurityClass.CreatePrincipal (id, id.Name):

    You should read this page:

    Specifically this:

    FormsAuthenticationModule build a class of GenericPrincipal and stores it in the HTTP context Generic Principal CTO maintains a Form Identity is a reference to the example which represents the current authenticated user. You must allow form authentication to manage these tasks for you. In your application, the user establishes this property for a custom class that the IPrincipal interface should handle your application PostAuthenticate As is the specific requirements, then the event. FormAuthenticationModule has validated the form authentication cookie and created the GenericPrincipal and FormsIdentity objects, followed by the PostAuthenticate event is. Within this code, you can create a custom IPrincipal object that wraps the FormsIdentity object, and then it HttpContext. The user stores in the property.

    After setting the authentication cookie, the website is automatically managed. All you have to do is wrap it in your ipernist. All this happens when the HttpContext.Current.User property is not empty (this is GenericPrincipal, which you will soon change later). When HttpContext.Current.User is empty then no authentication cookie was created previously and the user was not authenticated.


    c# - Get a collection of all the DataRows coresponding to selected DataGridView rows -


    Is there a direct way to do this, or do I need to select it on DataGridView? Selected, and then access the Data Grid Viewer. DataBoundItem one to make each line?

    DataGridView does not provide a SelectedDataRows and SelectedRows is Linq-enabled, yes, you write a forhash loop Will happen.


    image - Incorrect PNG Colouring (Swapped channels?) -


    Please look at any of the following images:

    I need to create the image below It seems like the first color channels are wrong, but I'm not sure and it can not be cured.

    Can anyone please tell me how to get the image above the image below?

    Thank you.

    Edit: Thanks, red and blue channels swapped!

    My guess is that you swap red and blue colors, maybe a byte sequence problem?


    How to read datetime back from sqlite as a datetime instead of string in Python? -


    I am using the sqlite3 module in python 2.6.4 to store a datetime in a SQLite database.

    It is very easy to insert, because the scalesh automatically converts the string into a string. The problem is, when reading it comes back as a string, but I need to rebuild the original dataet object. How do i do this

    If you declare your column with a type of timestamp, / P>

      & gt; & Gt; & Gt; Db = sqlite3.connect (': memory:', detect_types = sqlite3.PARSE_DECLTYPES) ​​& gt; & Gt; & Gt; C = db.cursor ()> gt; & Gt; & Gt; C.execute ('Table Fu (Bar Integer, Falcon Timestamp)') & lt; Sqlite3 Object object at 0x40fc50 & gt; & Gt; & Gt; & Gt; C.execute ('Insert Foo values ​​(?,?)', (23, datetime.datetime.now ())) & lt; Sqlite3.reer object 0x40fc50 & gt; & Gt; & Gt; & Gt; C.execute (choose from 'foo') & lt; Sqlite3 Object object at 0x40fc50 & gt; & Gt; & Gt; & Gt; C.fetchall () [(23, datetime.datetime (2009, 12, 1, 19, 31, 1, 40113))  

    Look? Both int (columns for the declining integer) and datetime (columns for the declared timestamp) avoid the intrinsic type of monster trip.


    javax.imageio - Problem converting PNG to JPG using Java (ImageIO.write()) -


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

    • 5 जवाब

    मैं imageIO.write का उपयोग कर रहा हूँ () पीएनजी फाइलों को जेपीजी में परिवर्तित करने के लिए किसी कारण के लिए, मेरी नतीजे की छवि में एक गुलाबी परत है मैंने समाधान के लिए दूर-दराज के लिए खोज की है, लेकिन मुझे कोई नहीं मिला कोड पीएनजी को छोड़कर अन्य सभी प्रकार की छवियों के लिए काम करता है।

    मूल कारण एक छोटी गाड़ी रीडर हो सकता है। प्रस्तावित समाधान अलग पाठक पैकेज का उपयोग कर रहा है।

    संपादित करें ऊपर लिंक टूट गया है, लेकिन ऐसा प्रतीत होता है।


    entity framework - Read only Search function. Stored Procedures or IQueryable with POCOs and Ef 4.0 -


    We have some search functionality that can get thousands of results from DB, although it will only be necessary to get the rows The first 10 records displayed in the example when the next page is requested, we hit DB again. It searches our database based on a set of variables and this search can be refined which will result in the other database hits. The question is quite complex.

    We are looking at various ways of doing this that is fitted with our overall architecture.

    The first method is to use a stored procedure, perhaps preparing a list of institutions. This stored procedure can be done quickly and extensively, but better performance will be done.

    The second way is to use Linq to Entites or Entity SQL with Unit Framework 4.0 and will make the code in our conceptual layer and populate the POCO object through IOC. IQueryable has its advantages: / P>

    • Abstract : We are using EF at other places in the application, so we would like to search on the model if possible, if possible.
    • Type security and what we want to do in an object oirentated way, it can properly chain the filter on IQueryable

    Our main focus is with this attitude, we expect Parrlel LINQ to use the units and throw more hardware on it if necessary. A small display hit for a cleaner development pattern is OK.

    We appreciate people's thoughts and recommendations on this .... We are doing a lot of these techniques so that I want to hear the experience of people.

    I have done some performance tests and using a procedure stored in EF 4.0, a unit or a complex Type ado It is almost identical to using SP through Net, so we are going to try this method. The use of built-in EF in the inquiry was slow twice, so we are going to use SP in the critical condition of this demonstration.


    Using Clickonce Deployment with Background intelligent transfer service -


    We are thinking about the deployment and updating strategy for a large framework in our organization. application. Will be in Net 3.5 and will run on Windows XP, Vista and Win 7 machines. I have used clickthrough many times and works well to ensure that anyone has thought about it, or has implemented the BITS feature of Windows with clickous? I think the way BITS upgrades the trickle will make the profile update very user-friendly.

    Any help appreciated.

    The thing is that BITS is used to transfer data in the background, while Clocon There is more or less JIT downloader to install / update / run a DLL / executable.

    Additionally, ClickOn is an out-of-box experience. It already works, while a BITS solution (also using the old Updater Application Block) requires you to roll the framework to update the application.

    Also keep in mind that nothing is saying that the BITS solution will be a "trickle" approach for someone to download this file to a higher priority in a batch and basically simulate the functionality of the click-on , Or anybody can make it to download updates in the background how Firefox updates it.

    Finally, be careful that clickOn has been allowed to apply to click on to do the default by clicking on, or even allowing resources to communicate by default. Read more.


    language agnostic - PHP: Make Site Unicode Compatible -


    How can I conform my site Unicode to support other languages ​​other than English?

    Text "itemprop =" text ">

    IDE / editors such as Eclipse / Notepase ++ or UltraDid are able to). If you output the XHTM you may add:

       & Lt; / Head & gt;  

    To force the browser to use utf8.

    If you are working with XML documents, databases (many of them supporting utf8) or any other source for example, to convert PHP into the documentation, the following functions are utf8:

      string utf 8_add code (string $ data); String UFO 8_decode (string $ data); String icon (string $ in_charset, string $ out_karsat, strings $ str); 

    In:


    javascript - Understanding PPStream -


    यह है

    PPStream.prototype.pps_width = "400px";

    PPStream को कभी भी घोषित नहीं किया जाता है, क्या यह पीपीएसस्ट्रीय वस्तु 'विशुद्ध रूप से' प्रोटोटाइप 'द्वारा उत्पन्न है? मुझे पता है कि 'प्रोटोटाइप प्रॉपर्टी' कैसे काम करती है।

    धन्यवाद।

    पीपीएसटीम है वास्तव में घोषित यह फ़ंक्शन के रूप में घोषित किया गया है, हालांकि, एक नियमित रूप से चर के रूप में नहीं:

      फ़ंक्शन PPStream (id) {var self = this; This.reset = function (pid) {  

    अधिक जानकारी के लिए मोज़िला डेवलपर नेटवर्क (विशेषकर प्रोटोटाइप पर) देखें।


    r - Vertical gridlines in ggplot with discrete x-axis -


    मेरे पास निम्न सेटअप है:

      emp & lt; - संरचना (सूची = संरचना (सी (1 एल, 2 एल, 2 एल, 2 एल, 7 एल, 7 एल, 3 एल, 4 एल, 4 एल, 4 एल, 4 एल, 8 एल, 8 एल, 8 एल, 9 एल, 9 एल, 9 एल, 9 एल, 10 एल, 5 एल, 5 एल, 6 एल) लेबल = सी ("8", "24", "31", "78", "135", "142", "30", "98", "117", "123"), वर्ग = "कारक" , स्कोर = संरचना (सी (1, 2, 14, 3, 5, 17, 18, 20, 11, 13), डीआईएम = 10 एल, .Dimnames = सूची (सी ("8", "24", "30 "31", "78", "98", "117", "123", "135", "142")))), टी = संरचना (सी (6 एल, 1 एल, 2 एल, 4 एल, 7 एल, 9 एल, 3 एल, 1 एल, 2 एल, 4 एल, 5 एल, 8 एल, 9 एल, 10 एल, 7 एल, 8 एल, 9 एल, 11 एल, 9 एल, 1 एल, 4 एल, 1 एल), .लाबल = सी ("8", "24", "40 "," 78 "," 135 "," 142 "," 30 "," 98 "," 117 "," 119 "," 123 "), वर्ग =" कारक ", स्कोर = संरचना (सी (1, 2) , 14, 4, 5, 17, 18, 1 9, 20, 11, 13), डीआईएम = 11 एल, .Dimnames = सूची (सी ("8", "24", "30", "40", "78 V1 = c (3L, 1L, 9L, 4L, 1L, 107L, 2L, 5L, 1, 9, 4L, 1 9, 2, 5L, 3 एल, 1 एल, 2 एल, 1 एल, 6 एल, 14 एल, 20 एल, 1 एल, 4 एल, 1 एल, 2 एल, 3 एल, 2 एल, 2 एल))। नाम = सी ("एस", "टी", "वी 1"), पंक्ति नाम = सी (एन ए, -22 एल), वर्ग = "डेटा.फ्रेम" ओ एंड एलटी; - सी (8 एल, 24 एल, 31 एल, 40 एल, 78 एल, 80 एल, 85 एल, 94 एल, 104 एल, 113 एल, 135 एल, 136 एल, 142 एल, 30 एल, 54 एल, 91 एल, 98 एल, 117 एल, 119 एल, 123 एल, 9 एल, 34 एल, 97 एल, 126 एल, 140 एल, 13 एल, 75 एल, 92 एल, 134 एल, 138 एल, 141 एल, 6 एल, 12 एल, 22 एल, 44 एल, 48 एल, 51 एल, 57 एल, 64 एल, 84 एल, 88 एल, 93 एल, 100 एल, 115 एल, 124 एल, 12 9 एल, 132 एल, 143 एल, 144 एल, 2 एल, 10 एल, 14 एल, 15 एल, 16 एल, 17 एल, 1 9 एल, 35 एल, 3 9 एल, 41 एल, 50 एल, 52 एल, 53 एल, 58 एल, 61 एल, 66L, 67L, 68L, 71L, 72L, 73L, 76L, 96L, 99L, 101L, 106L, 109L, 114L, 121L, 127L, 128L, 131L, 137L, 145L, 146L, 148L, 150L, ​​4L, 18L, 23L, 28 एल, 29 एल, 32 एल, 37 एल, 38 एल, 65 एल, 82 एल, 90 एल, 102 एल, 105 एल, 107 एल, 111 एल, 122 एल, 130 एल, 133 एल, 13 9 एल, 147 एल, 3 एल, 5 एल, 7 एल, 11 एल, 21 एल, 27 एल, 33 एल, 43 एल, 45 एल, 46 एल, 47 एल, 49 एल, 55 एल, 56 एल, 59 एल, 60 एल, 62 एल, 63 एल, 69 एल, 70 एल, 77 एल, 83 एल, 87 एल, 89 एल, 103 एल, 108 एल, 112 एल, 116 एल, 118 एल, 120 एल, 125 एल, 14 9 एल, 151 एल, 1L, 20L, 25L, 26L, 36L, 42L, 74L, 81L, 86L, ​​95L, 110L) emp $ s & lt; - पुनर्क्रमित (कारक (emp $ s), मैच (emp $ s, o)) emp $ t & lt Qq & lt; -ggplot (emp, aes (x = s, y = t)) qq + geom_tile (एईएस (भरें) = लॉग (वी 1))) + थीम_बॉ () + scale_fill_gradient (कम = "सफेद", उच्च = "काला") + opts (axis.text.x = theme_text (कोण = -90, hjust = 0, आकार = 5) , Axis.text.y = theme_text (वज़ = = 0, आकार = 5), पैनल.ग्रीड.मिंर = थीम_ब्नल (), पैनल.ग्रीड.मुख्य = थीम_ब्नल ())  

    यह निम्नलिखित का उत्पादन करता है:

    मैं सिर्फ 142 के बाद और 30 से पहले एक अनुलंब रेखा को शामिल करना चाहूंगा। (ध्यान दें, मुझे इन मानों को एक कारक के रूप में रखना होगा।) मैंने दो विकल्प पर विचार किया जा रहा है:

    • vline: मैं केवल पंक्ति को 142 और 30 पर डाल सकता हूं, लेकिन उनके बीच नहीं।
    • ग्रिड सामग्री: मुझे ऐसा लगता है आदर्श समाधान एक ग्रिड प्रमुख या कुछ को पेश करना है।

    कोई भी विचार?

    मुझे यकीन नहीं है कि यह वही है जो तुम्हारा मतलब है:

      p & lt; - ggplot (emp, aes (x = s, y = t)) + geom_tile (aes (Fill = log (v1))) + theme_bw () + scale_fill_gradient (कम = "सफेद", उच्च = "काला") + थीम (axis.text.x = element_text (कोण = -90, अत्याधिक = 0, आकार = 5), अक्ष। Text.y = element_text (vjust = 0, आकार = 5), panel.grid.minor = element_blank (), panel.grid.major = element_blank ()) + geom_vline (xintercept = जो कि% c ("142", "30") में (स्तर (emp $ s)%) + c (0.25, -0.25)) प्रिंट (पी)  

    ggplot2 आउटपुट


    c# - The speed of .NET in numerical computing -


    In my experience, net net code is 2 to 3 times slow. (I have applied L-BFGS for multivirate optimization.)

    I have detected ads on stackoverflow flow

    the speed is really amazing, the speed is close to the original code How can they do this? They said that:

    Q. NMath "Pure" .NET?

    A. Answer depends on your definition of "pure.NET" to some degree. NMTH is written in C #, as well as a small managed C ++ layer as well. For better performance of basic linear algebra operations, NMAT relied on native Intel Myth Kernel Library (included with NMAT). But there is no COM component, no DLL - just .NET assemblies. Additionally, all memory allocated in the Managed C ++ layer and allocated by the managed stack used by the original code has been allocated.

    Can someone explain me more?

    C ++ / CLI is correct. To complete the picture, just two additional interesting points:

    • NET Memory Management (Garbage Collector) Obviously, there is no problem here because NMath is still dependent on it

    • Performance benefits are actually provided by Intel MKL, which Extremely optimized for many CPUs. From my point of view, this important point is to use direct-forwarding, CIT / C ++ code does not require C # /. Provide better performance on the net, it can sometimes get worse. However C ++ / CLI allows you to take advantage of all the "dirty" optimization options.


    javascript - How to use anyother map like google maps in UIWebView in iphone? -


    I have Google Maps in UIWebView and this routing works perfectly with stuff and everyone. But now I want to load some other webwives and get all the features I get from Google Maps. How can I do this?

    For example: I want to load it into a UIWebView. This is an Italian map. I want to use it the same way as Google Maps works in an iPhone app. Because you are using normal web-based Google Maps in UialWeb and do not have UIMAPKit.

    See it as an implementation of any other Google map using Javascript.

    The manner in which this is done is defining the custom map tile layer for more information.

    Note that next to actual programming, you also need to have real map tiles (and the right to use).


    C# Scripting language -


    This is some strange question.

    I want to provide a scripting language to modify the game. I built for XNA if I were telling these games to PC then I would be able to use C # files only, runtime ( Experiment) as a script and it will be fine - an easy way to improve the game. However, the .net compact framework (which provides xbox) reflections. Support does not support, how can I write a scripting language that takes it into account?

    1. Is there a project already done
    2. Is there a good resource for me to start my own project?
    3. Choose What will be the best language for you? This game is for the script, so it can be quite a small language, as long as

    I know this is an old question, but I had the same needs before and I came to know about it. It appears that it has been developed initially to solve the problem of scripting in XNA games, so it is better.

    From the website:

    Managed scripting engines

    Manage scripts for quick scripts for the need to implement a scripting engine in your solutions Provides easy solutions. Managed scripting comes with a straightforward script engine that can compile & amp; Example scripts on the fly allow locally assemblies in memory or locally installed on hard drives, and dynamically apply methods and access properties during runtime. Manuscript scripting runs on Windows Vista, XP, Linux, Xbox 360 and Microsoft Zune Player, with scripts written in the form of language with plans to add support for either Visual Basic or C # to Ruby, Python and Javascript.

    I have not seen it deep about myself, but it looks like what we want.


    c - printf slows down my program -


    I have a small program to calculate the hash (for hash tables). This code looks very clear, I hope, but there is something unrelated in it that makes me angry.

    I can easily generate about one million hash in about 0.20.3 seconds (approx / USR / bin / time benchmark). However, when I put printf () in the loop, the program is slowed down to about 5 seconds.

    1. Why is this?
    2. How to make it faster and faster? What can be Mmapp ()?
    3. How about stdlibc designed, and how can it be improved?
    4. How can the kernel improve it? How to make the throughput faster on local "files" (sockets, pipes, etc.)?

    I look forward to interesting and detailed answers thanks.

    PS: This is for a compiler build toolset, so do not shy to get information. Although there is nothing to do with that problem, I just want to show that the details give me the interest.

    Appendix

    I'm looking for more Programmatic approach to solution and explanation is actually piping, but my "user" What does not have control over.

    Of course, I'm still testing, which will not be done by "normal." But this fact does not change that a simple printf () slows down a process, which is the problem , I am trying to find an optimal programmatic solution for this.


    Appendix - Stunning results

    Reference time is plain within a TTY The printf () is for calls and takes about 4 minutes to 20 seconds.

    / Dev / pts console) increases the speed of the output for approximately 5 seconds.

    This is approximately equal to approximately 8192 when using setbuffer () in my test code size of 16384: approximately 6 seconds .

    SetBuffer () Apparently does not have any effect while using it: it can be used at the same time (about one TTI about 4 minutes, about one PTS 5 Seconds). / P>

    Amazing , if I'm starting a test on TTY1 And then switch to another TTI , this is only one PTS: approximately 5 seconds.

    Conclusion : The kernel does something that can be accessed Has to be done with and user friendliness!

    Generally, if you are active on TTI, or you switch to any other TTY, then it should be equally slow.


    Lesson : When output-intensive programs run, switch to another TTE!

    Unbuired output is very slow

    By default, stdout is completely buffer, even if connected to a terminal, stdout is given either unbreakable or line-buffer. Try switching to buffering to use setvbuf () for

    stdout , like this:

      buffer [8192]; Setwuf (standout, buffer, _IOFBF, sif (buffer));  

    sql server - Index defragmentation -


    Please tell me to make a process for defragging the index on a daily basis in MS SQL Server 2000.

    Appreciate your answer

    Joseph

    < One of the simplest ways:

      EXEC sp_MSForEachTable 'DBCC DBREINDEX (' '', '' ', 90 ) ''  

    There are many other options where people


  • scripting - How to refresh page on resize? -


    Is there a script to refresh the browser at a page again? More specifically, does the browser emulate the refresh button or F5? I have found two, but whatever I see is not enough;

      & lt; Script type = "text / javascript" & gt; Var currheight = document.documentElement.clientHeight; Window.onresize = function () {if (currheight! = Document.documentElement.clientHeight) {location.replace (location.href); }} & Lt; / Script & gt;  

    and

       

    Problems with both of these appear to reset the page completely, where some users have made changes by using the browser refresh function (for example a specific Like having on the hash) that i need is

    Is there a way to refresh the window with a script similar to clicking on browser refresh? I do not understand why there is a difference, but that's it.

    Thank you.

    Yes, you might want to take a look at some JavaScript events.

    Here's a link to start with the event:

    As far as the page is reloading, you can also do this:

    As far as user values ​​are kept, you can continue them in one session.


    tcl - Encode value as base64 -


    I'm trying to write optimization in the List List Menager (10.2). Language is TCL, which I have very little information about us need to encode a value as base64 (or in fact, whatever obscures the query string parameter), but I can not find it how. Does TCL have a command to do this?

    Your base base can be used to base64 package in hex and back in your data Use these small processes to change require Tcl> 8

      proc BIN2HEX {text} {binary scan $ text h * result; Return $ result} proc HEX2BIN {hex} {return [binary format H * $ hex]} hex [bin2hex $ yourText] set textengine [hex 2 ban $ hex]  

    if you actually Base 64 requires that you can copy / paste the full base 64 file into your code only (remove the "Provides the package")


    sql - find duplicate insert into another table -


    I have a code that loads my data in SQL table; I should know that if there is a duplicate value There is no way to load the data into another table. If so, you can help me my question is:

    "t_DATA_DneFrc (RTN, AccountNbr, first, MiddleName, last name, amount) included in prices ( '" & amp; rcdDNE ("RTN") & amp; "','" & "rcdDNE" ("AccountNbr") & amp; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & amp; # 39; & amp; amp; amp; amp; rcdDNE ("First") & amp; rcdDNE ( "MiddleName") & amp; " ',' '& amp; rcdDNE (" LastName ") and"' 'and Arseedeediani ( "Zodiac") and "')"

    < P> which will insert the data into t_DATA_DneFrc . Now I want to change the query if I enter a duplicate which has the line in the t_DATA_DneFrc duplicate is it possible is?

      'Record Database frmDNELoad.lblStatus.Caption = "Loading data in the database ......" dim lngRecCount long as lngRecCount = 0 rcdDNE.MoveFirst cmdCommand with. ActiveConnection = objConn .CommandText = "t_DATA_DneFrc (RTN, AccountNbr, first, MiddleName, last name, amount) values ​​(included in '" & amp; rcdDNE ( "RTN") & amp; "', '' & amp; rcdDNE ( "AccountNbr") & Amp; "", "" and "Arseedeediani" ( "first name") and "", "" and Arseedeediani ( "Midlnam") and "", "" and Arseedeediani ( "last name") and " ',' '& Amp; Arseedeediani (" Zodiac ") and") ". type Command = Adisimditekst and set new Adiodibi with Arseedeediaarsisi = Ardeediaarsiaarsiad. Rikesset. Aktivconkeshn = Objon. source T = "Select * FD TDATAADNEFRC" .Quser Type = Add Open Dynamic .Kerser Position = AdUseClient .LockType = adLockOptimistic. End of Finish with rcdDNE.EOF lngRecCount = lngRecCount + 1 frmDNELoad.lblStatus.Caption = "Adding Record" Do & amp; LngRecCount & amp; "of" & amp; Arseedeediani. Rikardkount & amp; "for the database." FrmDNELoad.Refresh DoEvents call CommitNew rcdDNE.MoveNext loop frmDNELoad.lblStatus.Caption = "Diani processing complete." frmDNELoad. Refresh End Event Sub CommitNew () 'rcddnefrc .equality. AddNew .Finds with records on DneFrc table added ! [RTN] = rcdDNE.Fields! [RTN] .Fields! [AccountNbr] = rcdDNE.Fields! [AccountNBR]. Fields! [First] = rcdDNE.Fields! [First] .Fields! [MiddleName] = rcdDNE.Fields! [MiddleName] .Fields! [Last name] = rcdDNE.Fields! [LASTNAME] .Fields! [Zodiac] = rcdDNE Field! [Zodiac].  

    You will need to run a second query, which like

    look should
      t_DATA_DneFrcDuplicate (RTN, AccountNbr, first, MiddleName, last name, select the amount, frequencies) RTN, AccountNbr, first, MiddleName, last name, amount, COUNT putting (*) Artian, account Anbiar , first debits from Midlnam, Lastonam by Teediattiadianfarsi group with (COUNT) (*) & gt; 1  

    (This is the Oracle syntax; hopefully it will work for you.)


    ruby - Rails applicaton's rest client post and put method -


    Using Ruby, enter some examples and given for post request. But the client of my Rail application is confused to send me posts and posts. Say, I've developed my Rail app by command: Tracks Scraps generate high scoring games: String Score: Integer , then here is the Highscot Controller 2 function

      class HighScoresController & lt; ApplicationController # 1 # POST / high_scores # POST / high_scores.json DRF # 2 # Patch / Pop / High Score / 1 # Patch / Put / High_Score / 1.Jason Def Update &  

    How to If I follow this example, then I will be using # 2 # # # # # # for these posts. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ItemProp = "text">

    To post to you via API call and request Application_controller.rb needs to be changed.

    Change:

     with protection_from_forgery with: exceptions  

    to:

      with protection_from_forgery :: null_session  

    Scala compile error: value is not member of -


    Sorry for my bad english!

    I'm a newbie in Scala language, I get a project and error with some modifications

    "Scala is not a member of value ... Can some body help me? follow my code:

    Kmmandःskla

      package Comkbaila Simskdomen import Skalakalekshnkmap import redis.clients.jedis.Jedis seal featuring CommandResult object success CommandResult object Failure extends commandResult objection unauthorized spread extends CommandResult attribute command {def captchaValidator: Validator def logger: logging Val property = PropertiesHandler.readProperties (System.getProperty (PropertiesHandler.configFileNameKey))}  

    RedisIcrementCommand.scala

      package com .bla.cms package domain import scala.collection.Map import redis.clients.jedis.JedisPool import dispatch._ import org.apache.log4j.Logger import redis. clients.jedis.Jedis class RedisIncrementCommand (database: Jedis, Val captchaValidator: Verifier, Val logger: log) Spread the command {exec} (parameter: map [string, string]): CommandResult = {match = {captchaValidator.validate (parameter) match {case correct (foot Ms) = & gt; ExecuteInDatabase (case) case left (position) = & gt; LogFinder.get ("Selected Answers") match {string, string} Case some (selected enter) = & gt; Database.incr (Selected Answers) database.sadd (answer, selected enter), logger.info ("can get increase." Option: "+ Enter selected") no case of success => Logger.info ("Falha ao tantar computar incremento. Alternativa não informada.")}}}  

    PollServle.scala

      package com.bla .cm import javax .servlet.http._ import redis.clients.jedis.JedisPool import scala.collection.JavaConverters._ import scala.collection.JavaConversions._ import com.bla.cms.domain.Logging import org.apache.log4j. logger import scala .util.matching.Regex class PollServlet RequiresConnection {Importing com.bla.cms.domain._HttpServlet extends with URLHandler._de F. doPost override (request: HttpServletRequest, responded: HttpServletResponse): Unit = {val parametersMap = new ServletApiAdapter (request, response). Parameter VAL results = new Inkrent Command (request). Execute (Paramitrmap) redirect (request, response, results) }}  

    And when I compile, I found:

      [error] PollServlet.scala: 19: execute com.bla value. Cms.domai is a member member   

    You can do the following:

      < Li>

      command properties

    1. NewIncrease Commands (request ) to redisIncrementCommand change like .

      I like the one that will:

        Properties command {val Captcha Validetetr: validator Val logger: logging Val property = PropertiesHandler.readProperties (System.getProperty (PropertiesHandler.configFileNameKey ) Define Def (parameter: Map [String, String]): CommandResult Def executeInDatabase (Parameter: Map [String, String]): CommandResult}  

    javascript - Is it possible to make the background of FullCalendar calendar events transparent? -


    I'm relatively new to the web and I'm using a full scroller on a personal project and what I try to accomplish I am relatively easy to change. I may have to change some code because I do not think what I want is available outside the box.

    I am using my full version: Enter image details here

    As you can see, I have several "events", so they are a group of events and instead you see the number of incidents that day. So for today, 10 incidents are essential, I just make them groups, the problem is that you have to click above the event to select the cell. I am trying to make it so that event or counting is essentially a background in the background without text rectangle. e.t.c. Check out the screenshots below for what I'm going to do: Enter image details here

    The colorful transparent bus disappears for the event which is what I do not want. I also tried to change the background and border color, rectangular shape still exists. Any ideas or potential suggestions about this? Thanks in advance for your help!

    Not at all, what do you mean, can you show us an example?

    If you want users to click "Troff", you can use CSS

      Pointer-events: none  

    This will ignore the mouse event (such as clicks) on this element, and click one of the following.


    android - Google fit samples not working -


    I am getting mad, please help me .. I'm following the tutorial page, but without success,

  • I have added API to Android Studio
  • I have enabled the API,
  • I've got SHA1 with debug debug keystore
  • I have created a new client ID and I have created a new key in the credential section.
  • Compile and upload on the phone
  • But nothing seems to work.

    I get this stupid error: Connection Results {statusCode = unknown status code 5005, resolution = zero}

    Stupid and complex developer console ..

    Please Help me

    Today it works probably was the wrong packing name.

    Resolve

    Just rename the package. API Client

      Private Wide BuildFiltClient () {fitness client = new GoogleApiClient.Builder (reference) .adp (fitness. AIHTTIAPI) .adpi (fitness. Addens_API) adScope (new scope (Scopes.FITNESS_BODY_READ_WRITE )). ADScope (New area (Scopes.FITNESS_ACTIVITY_READ_WRITE)) .addScope (New area (Scopes.FITNESS_LOCATION_READ_WRITE)) .addScope (New area (Scopes.FITNESS_NUTRITION_READ_WRITE)) .addConnectionCallbacks (new GoogleApiClient.ConnectionCallbacks () {@ Connect (bundle bundle) public Override Zero {Reference Wrapper.getInstance (Reference) .setApiClient (Fitnessclient); (O NClientConnectListener Reference) .onclientConnected (); Logs. E ("Google Fit", "Connect"); } @ Override on Public Empty Connection Connection (int i) {}}). AddOnConnectionFailedListener (new GoogleApiClient.OnConnectionFailedListener) (// Whenever the API Client fails to connect. @Public Zero on Connection (Connection Results Result) {if (! (Resolutions) {GooglePlayServicesUtil.getErrorDialog ( Result .getErrorCode (), Reference, 0). Show (); Return;} If (! AuthInprogress) {try {authInprogress = true}; initially reference (reference, KeyConstant.REQUEST_OAUTH);} hold (IntentSender.SendIntentException E) {}}}}). Build (); }  

    html - z-index for two asp:Chart controls won't work? -


    I want to put two charts on the other with a z-index in a table cell so that I can make a chart visible On. While refreshing the chart, I want to update the data with the chart under the visual chart, then create the Z-index switch to avoid flicker ... but it does not seem to work and I do not know what I do I am doing this:

    This is my CSS

      td.tdchart {width: 800px; Status: Relative; Z-index: 100; Display area; }. Charthead {z-index: 200; Status: Completed; Top: 0; Left: 0; Width: 100%; Height: 100%}. ChartWizil {z-index: 300; Status: Completed; Top: 0; Left: 0; Width: 100%; Height: 100%}  

    Here is a partial ASP page

      & lt; Table & gt; & Lt; TR & gt; & Lt; Td square = "tdchart" & gt; & Lt; Div id = "pChart1" runat = "server" class = "chartwise" & gt; & Lt; Asp: chart id = "chart 1" ... & gt; & Lt; / ASP: Chart & gt; & Lt; / Div & gt; & Lt; Div id = "pChart1" runat = "server" class = "chart hidden" & gt; & Lt; Asp: chart id = "chart 1" ... & gt; & Lt; / ASP: Chart & gt; & Lt; / Div & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;  

    ASP code in Ajax timer

      pChart2.Attributes.Add ("class", "chartisible"); PChart1.Attributes.Add ("Square", "Charted");  

    This is a long shot because I have not worked on a web form in a while Project and I'm unable to run the web app.

    I really think that you do not need 2 identical charts. The code should be repeated to avoid you without any flicker, it is a pain and not efficient for management. Keep your code DRY (do not repeat yourself).

    That being said, I think you should remove the second chart and the first chart will be & lt; Asp: UpdatePanel & gt; .

    Potential Fix

    I noticed that your UpdatePanel is using conditional settings:

       

    If you have enabled this, you will need to manually trigger your asynchronous postback either by calling UpdatePanel2.Update () in your code. Or by setting a trigger, I did not see any of these (but I could forget something).

    I recommend that you add it to the bottom of your second timer:

      ...  & Lt; / Trigger & gt; & Lt; / ASP: UpdatePanel & gt;  

    I believe the update should trigger the timer and update the update panel while updating your chart.

    But please note this is an unwanted fix and I absolutely do something like


    xcode6 - Why might this [Swift] NSObject.addObserver registration not be calling func observeValueForKeyPath() as expected? -


    The problem code is as follows. [I hope] the problem is completely outlined in the above question. Thanks in advance. MJB UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {var some_string: NSString = "One" Fun Application (Application: UIApplication, didFinishLaunchingWithOptions Launch Options: [NSObject: AnyObject]?) - & gt; (Prefetch: "some_string", option: zero, references: zero) self.some_string = "two" return true} View override fonts ValueForKeyPath (keyPath: print_n ("init ...") self.addObserver (for self, String, ofObject Object: Any object, change: [NSObject: OOBEZ], contact: asphosphal pointers

  • , you have to dynamic Keywords must use:

      dynamic variable some_string: NSString = "one"  

    In addition to this, > NSObject , although in your case it will be UIResponder .


    sockets - How to download file from local server in Python -


    परिदृश्य है:

    1. ग्राहक एक फ़ाइल नाम दर्ज करेगा जैसे xyz
    2. सर्वर उन सभी फाइलों को दिखाएगा जिनके पास अलग-अलग फ़ोल्डर हैं।

    ग्राहक 1 या 2 या 3 का चयन करेगा (यदि वहां)। और फ़ाइल डाउनलोड की जाएगी।

    मैंने भाग को खोजा है मुझे फ़ाइल डाउनलोड करने और किसी अन्य निर्देशिका में सहेजने में मदद चाहिए।

    मेरा कोड अब तक फ़ाइल खोज रहा है

      आयात सॉकेट tcp_ip = "127.0.0.1" tcp_port = 1024 बफर_सैज = 200 फ़ाइलनाम = कच्चे_इनपुट ("फाइल नाम दर्ज करें \ n") s = socket.socket (socket.AF_INET, socket.SOCK_STREAM) ) S.connect ((tcp_ip, tcp_port)) डेटा = s.recv (बफर_आकार) s.close ()  

    सर्वर कोड: (यह कोड अब एक फ़ाइल के लिए है) आवश्यक मदद है कि उस फाइल को डाउनलोड और सहेजना है जिसे सर्वर पर पाया जाता है।

      आयात सॉकेट आयात ओएस tcp_ip = '127.0.0.1' tcp_port = 1024 buffer_size = 100 s = Socket.socket (socket.AF_INET, socket.SOCK_STREAM) s.bind ((tcp_ip, tcp_port)) s.listen (1) conn, addr = s.accept () प्रिंट 'कनेक्शन पता:', 1 के दौरान addr: डेटा = Conn.recv (बफ़र_आकार) डेटा नहीं है तो: तोड़ो अन्य: प्रिंट "प्राप्त सर्वर साइड डेटा:", डेटा conn.send (डेटा) conn.close ()  

    < Div class = "post-text" itemprop = "text">

    निम्न उदाहरण है जो दिखाता है कि एक सर्वर से एक फाइल को टीसीपी से कैसे डाउनलोड किया जा सकता है।

    क्लाइंट कोड:

     <कोड> मैं Mport सॉकेट आयात ओएस HOST = 'localhost' PORT = 1024 downloadDir = "/ tmp" filename = raw_input ('अपना फ़ाइल नाम दर्ज करें:') socket1 = socket.socket (socket.AF_INET, socket.SOCK_STREAM) socket1.connect ((HOST, PORT)) socket1.send (फ़ाइल नाम) ओपन के साथ (ओएस.path.join (downloadDir, filename), 'wb') file_to_write के रूप में: जबकि सही: डेटा = socket1.recv (1024) अगर डेटा नहीं: तोड़ file_to_write.write ( डेटा) file_to_write.close () socket1.close ()  

    सर्वर कोड:

      आयात सॉकेट HOST = 'localhost' PORT = 1024 सॉकेट = सॉकेट सॉकेट (सॉकेट.एएफएएनएएनटी, सॉकेट। एसओसीईआरईएमआरएएम) सॉकेट.बींड ((होस्ट, पोर्ट)) सॉकेट.लिटेन (1) जबकि (1): कॉन, एडर = socket.accept () reqFile = conn.recv (1024) ओपन के साथ (ReqFile, 'rb') file_to_send के रूप में: file_to_send में डेटा के लिए: conn.sendall (डेटा) conn.close () socket.close ()  

    नोट: सर्वर कोड मजबूत नहीं है और दुर्घटना होगा जब फ़ाइल मौजूद नहीं है आपको अपनी आवश्यकताओं के अनुसार उदाहरण ऊपर संशोधित करना चाहिए।


    python - How to use Pandas diff() on DataFrame that has multiple groups? -


    मेरे पास डेटाफ़्रेम है जिसमें कॉलम देश , दिनांक है, और उपयोगकर्ता (यानी उपयोगकर्ताओं की संख्या)। मैं तारीख कॉलम पर एक diff करना चाहता हूं, लेकिन प्रत्येक देश के लिए गणना फिर से प्रारंभ करें ऐसा कैसे करें?

    उदाहरण डेटा इस तरह दिखाई दे सकता है:

      दिनांक देश के उपयोगकर्ताओं 2015-03-01 यूएस 3 2015-03-02 यूएस 7 2015-03- 03 यूएस 9 2015-03-04 यूएस 11 2015-03-01 एफआर 4 2015-03-02 एफआर 8 2015-03-03 एफआर 12 2015-03-04 एफआर 16   <पी> अंतर को यह देना चाहिए:  <पूर्व>  2015-03-01 अमेरिकी नाओएन 2015-03-02 यूएस 4 2015-03-03 यूएस 2 2015-03-04 यूएस 2 2015-03-01 फ़्रांस एनएएन 2015-03-02 एफआर 4 2015-03-03 एफआर 4 2015-03-04 एफआर 4  

    जैसा कि टिप्पणियों में बताया गया है, यह एक समूह समस्या है (विभाजित-लागू-संयोजन पैटर्न के लिए दस्तावेज़ में देखें)।

    आपके उदाहरण में, हम चाहते हैं देश के कॉलम से समूह के लिए, फिर उपयोगकर्ता कॉलम पर एक diff करें (आप दिनांक कॉलम पर कहते हैं, लेकिन वह आपकी अपेक्षित आउटपुट से मेल नहीं खाता):

      & gt; & gt; & gt; Df ["new_diff"] = df.groupby ("देश") ["उपयोगकर्ता"]। Diff ()> gt; & gt; & gt; Df तारीख देश के उपयोगकर्ताओं new_diff 0 2015-03-01 यूएस 3 NaN 1 2015-03-02 यूएस 7 4 2 2015-03-03 अमेरिका 9 2 3 2015-03-04 यूएस 11 2 4 2015-03-01 एफआर 4 नाएन 5 2015-03-02 एफआर 8 4 6 2015-03-03 एफआर 12 4 7 2015-03-04 एफआर 16 4  

    ध्यान दें कि एक वास्तविक समस्या में आपको फैसला करना होगा जिस पर आप लापता दिन और इतने पर (और मैं कॉलम पर सॉर्ट जैसे दिनांक में फेंक देते हैं) सुनिश्चित करने के लिए कि चीजें क्रम में हैं, मुझे लगता है कि वे हैं।)


    python - Error building cython with python3 error: 'PyString_AsString' was not declared in this scope -


    I'm having trouble compiling AC extensions using Cython in Python 3. It is compiled and works well with Python 2.7, but Pyro 3.4 gets the following error when building with 3.4 (Anaconda distribution):

      Python setup.py build_ext - Build_ext Building 'module' extension that runs on location gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototype -fPIC -Includes -i / home / user / anaconda / include / python3.4m -c module.cpp -o build / temp.linux-x86_64-3.4 / module.o cc1plus: WARNING: The command line option is valid for "-pro-prototype" ADA / C / OBJC but C ++ rawdata.c Pp: 'int __pyx_pf_7rawdata_13RawDataReader ___ cinit __ (' pyx_obj_7rawdata_RawDataReader *, PyObject *, int, int) 'in the function: rawdata.cpp: 852: Error:' PyString_Asstring 'was not declared in this scope error: Problem of exit of 'GCC' in position 1 failed  

    The problem is that my second module has been written for 3.4. 7 is not really an option.

    Any thoughts on how to get around this?

    So it is found that Python 3 is controlled in Ajman differently, so my The simplest solution for PyString_AsString (s) to s.encode ('UTF-8')


    javascript - How to setup unit testing for multiple require module -


    I am working on a code base, where the code is divided into multiple requirement modules. That is, in each section its main main.js are required.

    I want to set up code coverage for the whole code base using Karma.

    Since each section has its requirejs config, I created a test-main.js for each module.

    And there is more karma. Config load loads - main.js files

    I'm running into issues. There is a conflict between the base URL

    Any thoughts?

    You can chain several karma runners through Karma program . Karma to work it programmatically (which is not clear IMHO - some examples can improve it)

    First of all you need an array of configurations, so you need to call and call the Karma program. / P>

    Create an array of configurations

      function getConfiguration (filename) {return {// You can enrich the template file if you want // example configuration, etc. Add some preprocessor based on. // // If the configuration is not set in template then // Karma launches a single server along with server runner. TRAN: True, // point to configure template: __dirname + filename}; } Configuration to create the function () {return [getconfiguration ('conf1.js'), getConfiguration ('conf2.js'), etc ...]; }  

    Karma program initially

      start the function (conf, next) {karma.server.start (conf, function (exitcode) {// Exit code === 0 OK (! ExitCode) {console.log ('\ tTests ran successfully. \ N'); // Redo again with a different configuration ();} else {// bus Exit error code (ExitCode);}});  

    Karma Runner

      // Use the Async Library to do things as cleaner works async = require ('async'); Var karma = requirement ('karma'); Var confs = createConfigurations (); Async.eachSeries (Confus, startKarma, function (mistake) {if (err) {console.log ('some went wrong in a runner'); else {console.log ('Yay! All runners have ended' );}});  

    Writing list to text file not making new lines python -


    I'm having trouble writing to a text file. Here's my code snippet.

    ram_array = map (str, ram_value) cpu_array = map (str, cpu_value) iperf_ba_array = map (str, iperf_ba) iperf_tr_array = map (str, iperf_tr) opening #with (ram, w ') As F: in # ram_array for: # f.write (s +' \ n ') # open (cpu,' w ') as F: # in cpu_array: write #f + '\ N') (iperf_b, 'Mau') as open with f: for iperf_ba_array s: f.write (s + '\ n') with f.close () open (iperf_t, 'mau' ) S for iperf_tr_array: f.write as f (s + '\ n') f.close ()

    Both Ram and CPU work lossless, but when for iperf_ba A file Write for and write iperf_tr they always look like this:

      [45 9 47383.0, 470 9 760 9.0, 46576113.0, 47041787.0, 472 9 73 9 4.0]  

    Instead

      1 2 3  

    They are both from the global list. Values ​​are added between 1 and 1 in CPU and RAM, but otherwise they see the same pre-processing

    How are they doing here

      file name = "iperfLog_2015_03_12_20: 45: 18_123 _____ tag_33120L06.csv "write_location = self.tempLocation () location = (stit_location) + str (file name)); Df = pd.read_csv (location, name = list ('abcdefghi')) transfer = df.h transfer = transfer [~ transfer.isnull ()] # panda to remove nan transfer = transfer.tolist () Length = integer (lane (transfer)) extra = length -1 transfer [extra] bandwidth = df.i bandwidth = bandwidth [~ bandwidth; gen ()] bandwidth = bandwidth (Bandwidth) bandwidth [extra] iperf_tran.append (transfer) iperf_band .append (bandwith) 
    P> [from the comment]

    You need to use. Extension (list) If you want to add a list to the list - and do not worry: we sometimes class-idiots-I spend all hours pursuing mistakes / debugging;)


    Proper validation is ASP.net -


    I have a field ProductID and another field is ProductName. I would like a validation where the product ID has been entered and the product type If not selected, the user should select the product name (combo box) to click the submit button. What would be the proper way to do this? I do not want to write any script, so can not use custom verifier. How can I write it more? I am using ASP.NET C #.

    Thanks

    You can use jQuery very easily Just wire one click event handler on your submit button. Take a look at this Bela - Click

    JQuery code

      $ ("# btn") ( Val () = "" & amp; $ ("# field2"). Val () == "") {Warning ("Please select field 2"); }      return false; });  

    java - How do I work out the complexity of the following code snippets? -


    I am a beginner and start with algorithm complexity. I am trying to complete the complexity of the following two Java methods, both of which do the same thing though a little faster.

      ArrayList & lt; Person & gt; Filter 1 (person X, arrelisted & lt; person & gt; people) {ArrayList & lt; Person & gt; Friends = New Arrestist & lt; person (); For (person y: people) friends.add (y); For (person y: people) if (! X.knows (y)) friends Reverse (y); Back to friends; } ArrayList & lt; Person & gt; Filter2 (person X, arrelisted & lt; person & gt; people) {ArrayList & lt; Person & gt; Friends = New Arrestist & lt; person (); For (person y: people) if (x.knows (y)) friends. Add (y); Back to friends; }  

    (knows () is a boolean method that corrects truth if xy is a friend, otherwise it is wrong)

    I initially thought that Both filter1 and filter2 go on time (O), but look back at it, it would be fair to say that the filter will take 1O (n + n) time (can it be simplified o?) And Is that filter 2O (n) time because it only messes through people once?

    Or did I miss the point completely?

    Is it correct to say that the filter will take 1O (n + n) time Can it be simplified in O (N)?) And that filter will take 2o (n)

    O (n + n) actually Can be simplified in o (n) but is not filter () hey (n) .

    First of all, a quote about the complexity of time from ArrayList

    Size, is, empty, set, Iterators, and inventory operators operate continuously in time. Add operation runs in continuous time , i.e. O (n) time is required to add n elements all other functions running in linear time (broadly Speaking on)

    Code filter1 () :

      list & lt; Person & gt; Filter1 (person X, list & lt; person & gt; people) {List & lt; Person & gt; Friends = New Arrestist & lt; & Gt; (); For (person y: people) {// hey (n) friends.ed (y); // amortized for constant time} (person y: people) {// o (n) if (! X.knows (y)) {friends.remove (y); // hey (n)}} returning friends; }  

    Therefore, since list.remove () is o (n) , filter1 () < / Code> is o (n + n 2 ) = o (n 2 ) .

    Now filter2 () code:

      list & lt; Person & gt; Filter2 (person x, list & lt; person & gt; people) {list & lt; Person & gt; Friends = New Arrestist & lt; & Gt; (); (Person y: people) for {// hey (n) if (x.knows (y)) {friends.add (y); // amortized constant time}} returning friends; }  

    then filter2 () is o (n) .

    Now, to clear the confusion about two tasks with the same complexity, but in different running times, consider the following functions:

    • H 1 (n) = n = o (n)
    • h 2 (n) = 1000 · n = O (n)

    The fact is that h 1 (n) and h 2 (n) Both o (n) does not mean that they should be moving as fast as each other in fact h 2 (n) running time h 1 (n) more than one thousand Una more. O (n) The complexity of time means only the two functions increase linearly because n increases.

    Big O Definition:

    f (n) = o (g (n)) means < Em> c · g (n) bound to an upper f (n) , thus there are some stable c , such as f (n always ≤ c · g (n) , large enough f

    .

    = N and g (n) = n , we need to find a continuous c so that all In this case, for any C ≥ 1 > N ≤ c · n , so we prove that h 1 (n) = O f < / Em> (n) , f (n) = 1000 · n and g (n) = n , give us a constant C is needed to find sufficiently large for all n , f (n) ≤ c · g (n) in this case , 1000+ n ≤ c · n for any c ≥ 1000 , so we prove that h 2 (n ) = O (n) .


    c# - Azure .ccproj is not supported by this version of application -


    Recent developments of blue cloud services through Visual Studio 2013 Ultimate, everything was working fine last week and I can create a .ccprog file for my cloud service I decided to form my PC on Monday then re-installed VS2013 and Blue SDK v2.5 which I was using before but now when I try and a new blue cloud Service will create the project and the WCF service web role selects saying I get an error saying "This can not be created due to the .ccproj file which is not supported by version of this version. Please use that version which Type project file supports. " I think VS is not accepting SDK, but it is not certain that when I assist the VS site please update your version of VS, but it is already the latest VS 2013.4, any help It seems that in your csproj there is a version of the old Ezur SDK version:

    You should update it.

    A quick step by step here:

      1) Unload the project file (right click on the project, click "Unload Project") 2) Project file Edit (right click on unloaded project, click on "Edit X Sezer") 3) Product version is 2.5 & Lt; Products & gt; 2.5 & lt; / ProductVersion & gt; 4) Change the 2.5 & lt Azure device version; CloudExtensionsDir Status = "$$ (CloudExtensionsDir) '==' '' & gt; $ (MSBuildExtensionsPath) MicrosoftVisualStudiov $ (VisualStudioVersion) Windows Azure Tools2.5 & lt; / CloudExtensionsDir> 5) Save the project file, and project 6) This conversion wizard will activate the resulting changes to your .csdef file, then reload the following schema version attribute:  

    source:


    ruby - Capture Oracle raise_applicaiton_error in Sequel -


    I have a Ruby script that calls a stored procedure in an Oracle DB that has a function that checks whether a table is locked or not. If the table is locked, the process generates a raise_application_error (-20001, ...)

    How can I capture raise_application_error in my Ruby script?

    To do this I have done this:

      # Prevent unit testing before running all test classes ... Join DB incorrect error = zero ... DB puts defenses to stop the call process! $ Message! Message err = $ !! The message "DB is off. Try again in 5 seconds" sleep (5) try again if err.include? "ORA-20001" and # Unlock Unit Test ... DB  


    mdx - saiku Date Difference error -


    I am getting wrong results while calculating the difference between two dates using the sync.

      / *** with question / member remedies. Detdif as DD ('D', CDAT ('20 March 2014'), CDAT ('April 1, 2014'), 3,3). DD, [Cube_AR] / *** output *** / 1 / *** estimated output *** / 30  

    and I usually use double quotation marks around my " D ". DDI (" D "," CDAT ('March 20, 2014'), CDAT ('April 1, 19, 2014'), 3,3) {Remedy DD, measures. DF} [Cube_AR] on the column

    is a strange day as the first day of 3 weeks?


    r - How to control colors and breaks in heatmap using ggplot? -


    I am trying to create a heatmap using the ggplot2 package. I have trouble controlling the color and brake on summer and I have 18 questions, 22 firms and the average value of the firms reacts to the scale of 1 to 5.

    Say I value (0-1) (1-2) (2-3) (3-4) (4-5) color coded. Either different colors (blue, green, red, yellow, purple) or a gradient scale. And also NA values ​​= black brief: How do I choose colors and breaks?

    I would also like to fix the order on the axis for "Question 1, Question 2 ... Q18" Similarly, for firms, at this time I believe that this class is the "factor" which causes this problem.

      & gt; Head (Mind, 20) Firm Question value 1 1 question 1 3.6675482217047 2 1 question 2 3.74327628361858 3 1 question 3 & gt; NA & gt; 4 1 question 4 & gt; NA & gt; 5 1 question 5> NA & gt; 6 1 question 6> NA & gt; 7 1 Question 7 0.352078239608802 8 1 Questions 8 3.04180471049169 9 1 Questions 9 3. 9 5590 9 99 99 10 10 1 Question 10 & gt; NA & gt; 11 1 Questions 1 1 12 1 Question 12 4.265 9 12 9 6778731 13 1 Questions 13 3.95256943635 996 14 1 Questions 14 0.46568627450 9 804 15 1 Questions 15 2.61764705882353 16 1 Questions 16 1.83333333333333 17 1 Question 17 & gt; NA & gt; 18 1 Question 18 0.225490196078431192 Question 1 3.85714285714286 20 2 Questions2 4 & gt; Ggplot (mydf, aes (question, firm, fill = value)) + geom_tile () + theme (axis.text.x = element_text (angle = 330, hjust = 0))  

    Link to the picture of my current plot.

    The root cause of your problem seems to be that value is not a numerical vector The factor I guess is based on the fact that head () output NA values ​​ & lt; NA & gt; , which I think was written in your original spreadsheet, but there is no default behavior for R. The image you link to is the default behavior of ggplot for coloring on a factor; Default coloring for numeric is very close to what you want.

    You can check that the case is actually using the class $ mydf $ Value . If this is actually a factor, then convert it to numeric with the following:

      mydf $ value & lt; -a.numeric (as.character (mydf $ value))  

    Your conspiracy in writing will now return a graph that looks like this:

    You can use, or add, with precise visualization using.

    For your second question, it is quite easy to redirect that order. Optimized from:

      mydf $ question & lt; - factor (mydf $ question, level (mydf $ question) [c (1,10: 18,2: 9)])