Sunday, 15 June 2014

asp.net - Using IIS 7 Redirect Module or coding your own -


What is the difference between using the IIS redirection module to redirect. Just play with your own coding and response kintext? It does not matter to me, they both do the same thing and it is very easy to use the redirect module in IIS because it is relatively redirected anyway! As this code is doing, it is a global. AS says:

App. response. Status = "301 move permanently"; App response. Adhider ("location", new location);

Am I not right? You can do the same thing in 2 different ways! IIS or code! Use IIS only to web.config in your app:

  & lt; HttpRedirect enabled = "wrong" destination = "http://www.domainToRedirectTo.com/" exact destination = "false" httpResponseStatus = "permanent" />  

Good and simple! Accurate determination is false, so it will be redirected to a destination based on a relative basis.

I have to listen to arguments against using one side versus one side because I do not see any argument that would benefit in any way. Both satisfy the same goal.

The way you put it, there is no difference. A coded version allows you to respond to input on the runtime and to redirect people to different pages - use this code for a login.aspx page Can be unsuccessful -page.aspx or login- succesfull-page.aspx . If it's just hard-coded no difference

Remember that the redirects do not mean the sign of permanent rehabilitation of the URL only. . You may want to redirect people to a temporary message (redirect code 307) - for example, if you are working for Apple and Steve Jobs is giving a key word - that is, "Steve Jobs has a redirection to the store. Is giving the main word and we are updating the store "page in this example to give a switch a blow and update your entire web-form to the configuration files of all the IIS servers Instead of choosing the change through runtime logic. Each redirection has its own purpose.


python - Is RLock a sensible default over Lock? -


Threading module in Python provides two types of locks: a common lock and a recantent lock I think if I lock it Should I always like RLock on lock; Mainly to prevent deadlock situations.

In addition, I get two points, when lock on an RLock is preferred:

  • There is a more complex internal structure in RLock and therefore poor performance Could.
  • Due to some reason, I want to restart a thread through lock.

Is my argument correct? Can you tell other aspects?

two points:

  • Officially Python version (2.4, 2.5 to 3.1) is much slower than a lock lock, because locks in C and RLox in Python apply (this will change to 3.2)
  • A < / Li>

Bottom line, I can release it from any thread (not necessarily the thread that receives it), while an RLock should be released from the same thread, D only a Suggests using Arelk if it coincides with the words that you are looking for, otherwise default glued locks.


asp.net - Running a query in Page Load a bad idea? -


I am running an asp.net application in which I added a [insert] global / page_load query / update query. Therefore, every time the user hits any page on the site, he updates the database with his activity (session ID, time, hit on the page). I have not implemented it yet, but this is the only suggestion that I take care of how many people are currently on my site.

Is it going to kill my database and / or IIS for a long time? We believe that the site is average between 30,000 and 50,000 users at a time. I can not lock on top of a database hit continuously with every single page hit for my site every single user. I am worried what will happen, though this is the first time that I have tried a solution in this way, so I can become very crazy.

Disable it.

Create a DLL that handles the update, and the page load is a fire and forgets with the parameter.


javascript - jQuery - remove list items based off of time -


I currently have a page in which there is an anonymous list that is initially populated by my DB inquiry into the list, Each list item has a time stamp and text, if Javascript and AJAX are to be used, then this page updates dynamically without any inventory every 10 seconds, if the new data has arrived.

What is the easiest and most effective way to remove items from the list from the list, more than 24 hours old?

My tendency is to do the following:

  1. In the js file, load all list items in an array in an unreserved list
  2. To get data during the data, if the data comes back, then add those objects to the array also
  3. Each time the matching () function is called, it also removes a distant data () function Which removes all items that are older than 24 hours

In addition, I have a javascript Attempted to remove the correct way of adding list items to the script array is a code here that I am trying to add to all the list items in an array:

  var list = new array ( ); $ (".listname") Each (function (i) {list.push ($ (this));});  

To delete list items from the array, I expect to use it:

  list.pop (); Why do not array first (oldest first), then use   

? This will remove the first item in the array, as described.


parsing - Lexer written in Javascript? -


I have a project where the user needs to define a set of instructions for the UI that is completely javascript Has been written in I have the ability to parse a string of instructions and then have to translate them into instructions. Is there a library to parse 100% javascript? Or a generator that will be generated in javascript? Thanks!

Something like that, maybe?

The first available parser development system for JS / CC is - Dividives It has been developed, both for the purpose of producing productive compiler development system and how to normally do the bottom-up parsing Pars table generation is done, with the intention of creating an easy-to-use academic environment for those interested in it.

Both platform-independent software associations: a regular expression-based generator from the input character stream to a personal token and a parser generator , parse tables Calculating the formation of a stand-alone, working parser for a given specification and free grammar referenced to JS / CC is defined in an individual meta language, and the individual semantic code is defined as To Milit can be evaluated on the cut rule.

JS / CC is fully written in ECMAScript , it can be executed in many different ways: platform-independent, browser-based JavaScript Embedded on the website, as a Windows Script host application, as a compiled JScript.NET executable, interpreted by Mozilla / Rhino or Mozilla / Spiderman, or V8 shell script on Windows, * n Bus, Linux and Mac OSX. However, for productive execution, it is recommended to use command-line versions. This version is capable of collecting a full compiler from the JS / CC parser specification, which is later stored in the .js Javascript source file.


flex - How to make a property bindable? -


I have a class like this. The property is based on "ipboard" filed "ecboardid", I have found that when Accced changes, UI controls do not see that "ipag" has also changed. So, how to make this property binding? PUBLIC class encoder EventDispatcher {public worker ecboardid: String; / * -......................................... Methods ..... ..................................... * / public function copyFrom (newEncoder: encoder): zero { Ecboardid = newEncoder.ecboardid; This.dispatchEvent (new event ('isPagChanged')); } [Bindabal (event = "ipt switch")] Public function found ipag (): boolean {if (this.aconbird! = Null) {if (this .onlyboardid.search ('xxx')! = -1) {return False; } Back true; } Other {return false; }}}

Edit:

If I change the property to a static job,

 < Code> [bindable] public class encoder event dispatcher (public worker excibid): string; / * -......................................... Methods ..... ..................................... * / public function copyFrom (newEncoder: encoder): zero { Ecboardid = newEncoder.ecboardid; This.dispatchEvent (new event ('isPagChanged')); } Public static function isPag (string excreb): boolean {if (ecboardid! = Null) {if (ecboardid.search ('xxx') = -1) {return false; } Back true; } Other {return false; }}}  

Tie this way:

  visible = {encoder.ispag (encoder.acbddid)}  

works? Will the encoder see a change in a boobed?

I do not think you can only read properties Bindable, because the Flex changes continue the incidents To call the setter method for a property uses. For the properties of the object, see the section on binding.


c++ - Is there an occassion where using catch all clause : catch (...) is justified? -


Every time I have caught all the statements:

  try {// some code } Hold (...) {}  

In this always has been misused

Arguments against using cache All sections Are clear This will include anything that contains OS exceptions such as Access violation, since the exception handler can not know who it is working with, in most cases the exception is ambiguous log message or some incompatible message box Will appear in the form.

then hold (...) seems natural evil

but it has still been implemented in C ++ and other languages ​​(Java, C #) applies the same technique. So in some cases it is fair use?

The argument against using cache is clear all sections, these OS exceptions such as access The violation will catch anything because the exception handler can not know what the behavior is with it, in most cases the exception will appear as a fuzzy log message or some unorganized message box.

And if those same exceptions aren

hold (...) presenting at least my self message box (And starts customizing) logging, saving crash dumps, etc. ).

I think the Destructors have proper use of hold (...). I can not throw devastators - well, I mean, they can throw, but if a district without any progress Because of the exception of the thrown during the pile, the program ends, so they should not allow the exceptions to be avoided. It is generally better that instead of ending the program, the exceptions continue to be uninterrupted first.

Another situation is in a worker thread that can work arbitrarily; Normally you do not want an unexpected accident if the worker throws an exception. The worker provides the opportunity to clamp (...) semi-cleanliness and closure in the thread.


html - Do IE Conditional Comments slow down page load? -


I am creating "CSS hacks" "conditional comments" vs "recent logic" This question is out of the stack overflow community is.

  & lt ;! - [if IE] & gt; & Lt; Link type = "text / css" rel = "stylesheet" href = "yi-specific.css" /> & Lt; [Endif] - & gt;  

By using IE conditional comments the main argument it appears that you are adding additional HTTP requests to each page, thus slowing down your page's performance

Except for the reason of the maintenance of several stylesheets versus maintenance of stylesheets, I am able to find any real-world metrics I is not though it is a legitimate in itself Is there a discussion), is anyone here? What is the purpose of recession using conditional observations that you have been able to, or any other data, can be able to point me in the direction?

This conditional comment is not about actually , this conditional compilation Is like

An IE browser should appear on your page as

  and   

(with a small bit of additional processing to evaluate the status of the comment)

Any non-IE browser will simply see a comment.

Only potential performance effect is that the IE browser will need to evaluate conditional comment status (which is going to be negligible), and then going to include another CSS file. Of course other Browsers just see normal files and ignore comments completely.

The question is that the IEEE 5Kb standard-) 2Kb "hacks" file, and everyone else is receiving just 5Kb files; Versus a 7Kb file showing it with blackjack CSS. Depending on the various factors including the speed and latency of the network, the size of the file, the number of resources used on the page, it can have a noticeable effect on the IE case (this can certainly be faster than non- For IE user agents).

With all the display questions, you will have the effect of your code to see the profile in your environment - but in general guidelines I expect that the effect for IE, Increasing a small display for all other browsers, as well as feeling fuzzy, be able to write "appropriate" CSS in your actual file and then fix IE separately.


Comment out N lines with sed/awk -


How can I comment lines from a certain pattern and n lines?

  int var1; Int var2; Int var3; Int var4; Int var5;  

I want to comment on 3 lines including var2 (and not according to their content!):

  int var1; // int var2; // in var3; // int var4; Int var5;  

GNU sed

  sed '/ ^ int var2; $ /, + 2s ^ // '  

c# - accessing tabcontrol from myclass.cs -


Why can not I use tabcontrol from within myclass.cs?

Tabcontrol is in form1.Cs and my code which tries to create a new tab page in myclass.cs I have also tried to install tabbed property publicly but it is not working is.

just

once you do this and you have Form myform = new form ();

You will be able to:

/ P>

myForm.myTAB.TabPages.Add (myTabPage);

(You will definitely have to create tab page.


asp.net - System.Drawing: GDI+ is not properly initialized (​internal GDI+ error​) -


Text after "

An ASP.NET web site randomly raises this System.Drawing error:

System.Runtime InteropServices.ExternalException: System.Drawing.Bitmap..ctor (Stream stream) System.Drawing.ToolboxBitmapAttribute..cctor ()

  exception information: Exception type: TypeInitializationException Exception Message: Starter type 'System.Drawing.ToolboxBitmapAttribute' left the exception. Stack trace: On system. Reflection.CustomAttribute._CreateCaObject (void * pModule, void * pCtor, byte ** ppBlob, byte * PEndBlob, Int32 * pcNamedArgs) system. Reflection.CustomAttribute.CreateCaObject (modules, RuntimeMethodHandle ctor, in IntPtr & amp; system. Blob, blob Intpitr Ind, Int 32 and designated Aargs). reflection. Custom attribute Gate Kstmtm properties (module decorated module, Int 32 decorated metadata token, Intros Pejkount, runtime type Attributfiltr type Boolean course, Benihartebl, Ailist derived attributes) on the system. Reflections: CustomAvit.Get Custom Property (runtime type type, type runtime type, Boolean heirs on system). System Time Type The system on System.ComponentModel.TypeDescriptor.TypeDescriptionNode on the Gate Custom Property (type of system type, Boolean heirs) on System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetAttributes System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetAttributes () System.ComponentModel.TypeDescriptor.GetAttributes (type componentType) System.Web.UI.ThemeableAttribute.IsTypeThemeable (type) on SystemTypeDescriptor.System.ComponentMod System.web.on.Control.ApplySkin (page page) on system.ComponentModel.TypeDescriptor.GetAttributes Type) but on WebkUIkControlkInitRecursive (control namingContainer) System.Web.UI.Control.InitRecursive on SystemkWebkUIkControlkInitRecursive (control namingContainer) on SystemkWebkUIkControlkInitRecursive (control namingContainer) to ( control System.Web.UI.Page.ProcessRequestMain, Boolean includeStagesAfterAsyncPoint (namingContainer on Boolean includeStagesBeforeAsyncPoint))  

Why? I think this is a .NET Framework error (I'm not really trying to create any image).

I found a temporary solution: Restart IIS and delete temporary asp.NET files ("% WINDIR% \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP. NET files "). But when this error output is in the web-server, temp is not sufficient ...

by chance We have done this on one of our servers today. This is a known problem in ASP.NET, a hotfix for it.


c# - Emulating ShowDialog functionality -


मैं एक आवेदन (c # + wpf) लिख रहा हूँ जहां सभी मोडल शैली संवाद को UserControl मुख्य विंडो को कवर करने वाले पारभासी ग्रिड के शीर्ष पर। इसका मतलब है कि केवल एक विंडो है और यह सभी फर्म अनुप्रयोगों का लग रहा है और महसूस करता है।

एक संदेशबॉक्स दिखाने के लिए, वाक्यविन्यास के रूप में है निम्नलिखित:

  CustomMessageBox b = नया कस्टम मैसेजबॉक्स ("हैलो वर्ल्ड"); C.DialogClosed + = () = & gt; {// शेष फ़ंक्शन} // यह मुख्य विंडो देखने के मॉडल के लिए सुन लिया गया एक ईवेंट उठाता है, // संदेश बॉक्स को प्रदर्शित करता है और बाकी प्रोग्राम को बाहर कर दिया जाता है base.ShowMessageBox (ख);  

जैसा कि आप देख सकते हैं, न केवल निष्पादन का प्रवाह वास्तव में उलटा है, लेकिन क्लासिक। NET संस्करण की तुलना में इसकी बहुत ही सीखी बात है:

  MessageBox दिखाएँ ("हैलो दुनिया"); // बाकी फ़ंक्शन  

जो मैं वास्तव में देख रहा हूं वह base.ShowMessageBox से वापस नहीं जाने का एक तरीका है, जब तक कि संवाद बंद होने की घटना को बढ़ा नहीं दिया गया है यह, लेकिन मैं नहीं देख सकता कि यह कैसे जीयूआई धागा फांसी के बिना इंतजार करना संभव है और इस प्रकार उपयोगकर्ता को कभी भी ठीक पर क्लिक करने से रोकता है। मुझे पता है कि मैं ShowMessageBox फ़ंक्शन के लिए एक पैरामीटर के रूप में एक प्रतिनिधि कार्य ले सकता हूं, जो कि निष्पादन के व्युत्क्रम को रोकता है, लेकिन फिर भी कुछ पागल सिंटैक्स / इंडेंटिंग का कारण बनता है।

क्या मैं कुछ स्पष्ट लापता या वहाँ ऐसा करने के लिए एक मानक तरीका है?

आप कोडप्रोजेक्ट पर लेख और एमएसडीएन पर आलेख पर एक नज़र डाल सकते हैं। पहला लेख आपको मैन्युअल रूप से अवरुद्ध मोडल संवाद बनाकर चलता है, और दूसरा लेख दिखाता है कि कैसे कस्टम संवाद बनाने के लिए।


javascript - String Dot String (Mail without Domain) RegEx -


Really stuck on this simple regex. It needs to validate the string, which will be a match without "@ domain.xxx".

It must fulfill the following rules:

  • No string
  • A string (letter only) should end.
  • The two strings must be separated from a dot.
  • There should not be any numbers or symbols in the full string.

I was trying something like ... / ^ [az] + $ / ^ [.] + $ / [Az] + $ / I ... but not success

  / ^ [azza-z] + \. [AZA-Z] + $ /  

ASCII will work for letters.

Try International Letter (äá etc) if you also want to allow

  / ^ [^ \ w \ d _] + \. [^ \ W \ d _] + $ /  

[^ \ w \ d _] means any letter which is a non-alphanumeric character Not a number, and not an underscore ".


Best plugin development practices to avoid polluting jQuery namespace? -


I have created a jQuery plugin that allows the user to interact with a tree (creating, updating, deleting the node) gives. There are at least one dozen ways to interact with the tree. Ideally, I do not want to pollute the jQuery namespace with all these tree-specific methods because I now offer an extra opportunity for a namespace collision in every way. I just want a method to activate the plugin and so I'm looking at the refactor.

  $ ('ol # tree'). Trees (options) // Just a single jQuery method invoice ('Li # Item 6') // ... However, we have this subsidiary method $ ('ol # tree'). Adendod (node) // ... and this is a $ ('li # item2') extension branch () // ... and this one, etc.  

What are some practices to highlight an active DOM element and an interface for its sub-do not contaminate the Japanese namespace?

I have worked to save the returning jQuery object while creating a tree.

  var tree = $ ('ol # tree') tree () .;  

The object of this tree will be expanded to include methods only. Unfortunately, the tree is being manipulated regularly, it is the risk of having the position of that object Sends out the synchronization with the status of parent dom entry and its sub-elements. I'm not sure that trying to maintain the state in that object is worth it, since there will always be a current situation in the DOM.

I have considered using a namespace (via John Raisig):

How do you control this problem? Can you talk to some existing plugins that address this problem whose code I could learn?

Small and crisp name! Not boring trees , but for example Niketry (Hey, this is just an idea)! Put the interface in the name. Like this:

$ ("ol # tree"). Nicetree.appendNode (node); $ ("Ol # tree") nicetree.item ("Lee # ITEM2") expandBranch () ..

Another idea is this object that comes back as your offer, but do not update this object. This object is only a reference to the real object or dome, it adds a layer of indirection and it can not be acceptable for you.

I would like both solutions as a plugin user, but I like the first one.


c++ - error C2027 and error C2227 -


मुझे सी 2027 त्रुटि मिलती है: अपरिभाषित टाइप 'ब्रिज' का उपयोग

और

त्रुटि C2227: '-> प्राप्त' की बाईं कक्षा / स्ट्रक्चर / यूनियन / सामान्य प्रकार

लाइन पर * कनेक्शन 1-> प्राप्त (नया संदेश, 2);

 < कोड> # शामिल करें & lt; stdio.h & gt; # शामिल करें & lt; stdlib.h & gt; # शामिल करें & lt; iostream & gt; # परिभाषित MAXHOST 10 # मैडेपोर्ट 5 परिभाषित करें # मैग्नल 8 परिभाषित करें # MAXBRIDGE # 5 परिभाषित करें MAXLANBRIDGECON 2 नामस्थान std का उपयोग कर; कक्षा ब्रिज; क्लास होस्ट; क्लास संदेश; वर्ग सिमुलेशन; वर्ग लैन; क्लास संदेश {/////////////}}; कक्षा होस्ट {लैन * lan1; Int आईडी; Int nextMessageTime; जनता:     ///////// }; वर्ग लैन {ब्रिज * कनेक्शन 1, * कनेक्शन 2; इंट ब्रिज कनेक्शन; होस्ट होस्ट सूची [मैक्सहोस्ट]; Int आईडी; Int hostCount; सार्वजनिक: शून्य कनेक्ट (ब्रिज * कॉन्स्ट न्यूब्रिज) {if (bridgeConnection == 0) {connection1 = newBridge; } यदि (पुल कनेक्शन == 1) {connection2 = newBridge; } पुल कनेक्शन ++; } शून्य प्राप्त (संदेश नया संदेश) {* connection1- & gt; प्राप्त (नया संदेश, 2); }}; क्लास ब्रिज {///////////////////}}; शून्य मुख्य () {सिमुलेशन newSim; newSim.create (); वापसी; }  

पहले सभी पद सही हैं, आगे को घोषित करने के लिए परिपत्र को रोकने के लिए उपयोग किया जाता है शीर्ष लेख फ़ाइलें पुल वर्ग को आगे घोषित किया गया है, ताकि आप लैन की अपनी कक्षा परिभाषा के भीतर उस प्रकार के संकेत निर्दिष्ट कर सकें। चूंकि पॉइंटर्स के पास सभी समान आकार हैं, यह ठीक है।

जब यह इस क्लास का इस्तेमाल करने की बात आती है तो कंपाइलर को ब्रिज क्लास के बारे में और कम से कम इसका आकार जानना होगा। लेकिन इसके अलावा कोई अन्य जानकारी नहीं है कि पुल नामक एक वर्ग है।

समाधान या तो हेडर शामिल करना होगा जहां पुल परिभाषित किया गया है (यदि आप ऐसा करते हैं तो कक्षा पुल की परिभाषा को हटाएं), या ले जाने के लिए अपने खुद के कार्यान्वयन फ़ाइल में लैन :: कनेक्ट () और लैन :: प्राप्त () का कार्यान्वयन LANCpp और इसमें पुल शीर्षलेख शामिल है, जो शायद साफ समाधान है।


user interface - What is the rationale behind UI namespace in Qt? -


UI file creates 2 squares with the same definition in the process of creating user interface code from QT.

  class UI_CustomeUIClassFromUIfile {// code is generated from UI file via UI} Namespace Yuri {class CustomeUIClassFromUIFile public: UI_CustomeUIClassFromUIFile {}; } Using namespace UI;  

What is the reason for having 2 squares in the UI namespace and without another one without namspace? Is it for the compiler to support, in which there is no support for namespace, there is a macro like QTNAMESPACE.

The macro is QT_BEGIN_NAMESPACE, which is used if you compile QT to stay inside someone Are there.

For 2 sections, I think you answered it yourself You can use either Ui_XXX or Ui :: XXX . I always prefer the Ui :: method, but for every one.

So I think there is no real answer to me as a logic other than choosing a programmer.


Quickest way to insert into SQLite using C API? -


I want to include a lot (let's say millions) as soon as possible in the database. Since I'm calling from C, I thought there might be a shortcut to do this in the API. I can not help, but I think that the string from the data is created and the string is written back, all in one call, it is least efficient.

Is there no way to insert data into SQL strings? Ready statement is the only way?

I am looking for the se-specific methods of inserting data in the most efficient way, not general database tips

Start a transaction in the code, and a committed commit will be in all inserted memory before being written to disk. (How much memory is available to you, and depending on how much data you enter it may have to be trudged) This is going to boost you to the biggest exposure you will see.

Otherwise, if one is included in the same table, to prevent the text processing overhead, after each one is inserted, then reboot the one line in one of your data at the same time. However, compared to transactions, this would be relatively minor, most of the time your inserted disk will be written in ...


C# - Sorting using Extension Method -


I want to sort a list of people

  list & lt; Person & gt; Person = new list & lt; Person & gt; (); person. Add (New Person ("John", "Barnald", 45000.89)); person. Add (new person ("Mark", "Drake", 346.89)); person. Add (new person ("Bill", "Watts", 456.8 99));  
     
Public Enum Comparison Option {P> How to go sorting using lambda expression What is it?
  Public Stable List & lt; Person & gt; Sort People (this list & lt; person & gt; lst, compare option opt1, sort order order) {lst.Sort ((p, op1, op2) => {lambda expression can be implemented here} ); }  

It looks like you call the sort method on list & lt Trying to; T & gt; which is a comparison & lt; T & gt; Represents. This will require little work because you have to first define a consistent comparison function

The first step is to select comparison option value

  private Stable comparison & lt; Person & gt; To write a comparison function on the basis of. Create (Compare Optimization Opt) {switch (opt) {Case comparison option. Byfirst debit: (x, y) => X.FirstName.CompareTo (y.FirstName); Compare matter option. Child name: (x, y) => X.LastName.CompareTo (y.LastName); Compare the caseFeatures Bilassari: (x, y) = & gt; X Salary - Y. Salari; Default: throw a new exception (); }}  

By default this task will be sorted in ascending order. If you want it to fall, then just deny the price. So now the sorting people can be written by following

  public static list & lt; Person & gt; Sort People (this list & lt; person & gt; list, compare option opt1, sort order order)) Original Origin = Create (opt 1); Var comp = Original; If (ord == SortOrder.Descending) {comp = (x, y) = & gt; - (Original (X, Y)); } List.Sort (COMP); }        Edit   

version that is 100% done in Lambda

  & Lt; Person & gt; Sort People (this list & gt; person & gt; list, comparison option opt1, sort order order)) list. Abstract ((x, y) => {int comp = 0; switch (opt) {Compare matter comparison (y.FirstName); Compare case attributes: BellName: comp = x.ListName.CompareTo (y .LastName); Compare the caseFeatures: Biosari: COMP = x.Salary.CompareTo (y.Salary); Default: throw a new exception ();} If (ord == SortOrder.Descending) {comp = -comp;} return Comp;}); }  

javascript - How do I pass the image object into the onclick function being assigned to it? -


Sorry, if that question is confusing, then I'm learning JavaScript myself, I'm dynamically generating image thumbnails and When the user clicks on the thumbnail, I want to enlarge the image. My code looks like this for creating image code and assigning onclick function ...

var imageTag = "& lt; img onclick = \" enlargeImage () \ "class = \" Thumbs \ "Src = \" "+ photoURL +" \ "/" /> "; Document.getElementById ("image-thumbnail"). InnerHTML = imageTag;

With the code above, my thumbnail is displayed and when the user clicks on it, the enlargeImage () function is called . My question is, how can I use an image object clicked inside the enlargeImage () function? Tried to reach the this object inside the function, pointing to that image that was clicked, but this was referring to the whole page, not the The image was clicked. I want to be able to change the src attribute, as well as changing the style attributes of the image thumbnails. I should also note that there will be many images after all, so I need this dynamic behavior is.

Thank you very much for your help!

There are some ways to do this: The simplest way is to change the AA parameter to enlargeImage () Add it to the function and when you call it, pass it this reference.

  var ImageTag = "& lt; img onclick = \" big size (this) \ "square = \" thumb \ "src = \" "+ photoURL +" \ "/> ; ";  

Then in the function ...

  function big size image (IMG) {alert (IMGSRC); }  

How to make the browser back button work for a Flash-based Website? -


Can the browser back on some previous frames when clicking the back button in the browser? Similarly, can the fresh button be used to refresh the same frame and should not go back to the starting frame again?

It depends on how you make it. First of all, you have to import something called SWFAddress. To use SWFAddress, you need to make sure that you are embedding your flash using SWFObject, not just the object / ambit tag.

SWFAddress lets you add anchor tags to your URLs. This allows you to change the URL in such a way that the browser can understand without refreshing the page. For example, if my app is on www.mypage.com/flash and I set up SWFAddress I can set it so that when I press the button to go to the page, the following happens:

< Ol>
  • SWFAddress varies my URL to www.mypage.com/flash.html # Page 2
  • Javascript SWFAddress files notice this change and notify the flash.
  • Flash says, "Oh, look, the URL is changing and someone is paying me" Page 2 "- What do I want to do with that?
  • You can set a switch statement that will allow Flash to respond to these events in an intelligent, predictive manner - for example, you can say "if url changes in 'page2', Goto and sitop (2)" If you are running things, then it is the same.
  • I do not necessarily have to Frames will be doing, however - what you really want is the functions of controlling the behavior of the functions. Instead of pasting all of you, page 2 content in frame 2, you create the function goto page (2) And put their logic there.

    As far as one frame is to refresh, then it depends on how you code it - but if someone in the browser refreshes it The browser window will always refresh. With SWFA Picture, however, if you have set it correctly, it will always take you to the destination that you have linked to anchor tag.

    Does this help ? Any questions?


    php - How to extract emails from full headers -


    I have some emails that I have opened with PHP and now need to get the sender's email address. Can I tell which function should I use for it? I already have email with PHP open

    Edit: Is this a difficult question or I do not understand it adequately?

    Do I use preg_match to get an email address? Opening materials?

    Some mail send library, while Zend_Mail can parsed raw email Zend_Mail_Message must be able to do this by passing your raw email to the object. (Note: I have not seen reading a raw message, which I have seen.)

      $ message = new Zend_Mail_Message (array (), $ filename); $ Sender = $ Message- & gt; GetHeader ('to');  

    If you need all the sender, then better to use a good RegEx, however, if you will test other headers / body / mime parts, then one The library will be worth it.


    sql - MySQL function to find the number of working days between two dates -


    Excel has a NETWORKDAYS () function that finds the number of business days between two dates.

    What is the same function for MySQL? Because holidays combine complexity, so there is no solution to deal with holidays.

    This expression -

      5 * (DATEDIFF (@E, @ S) 7) + MID ('0123444401233334012222340111123400012345001234550', 7 * WEEKDAY (@S) + WEEKDAY (@E) + 1, 1)  

    Start date @ S and end date @ E Calculates the number of business days between

    is not before the date of commencement of the expiration date (@E) (@s). It is compatible with DATEDIFF that the same start date and expiry date gives zero working days. Ignore holidays.

    The string of digits is constructed as follows. Create a table of early days and expiration days, the lines will start on Monday (WEEKDAY 0) and the columns must start with Monday. Fill the left-to-right right-hand side with all 0 (i.e., Monday and Monday, Tuesday and Tuesday, etc.). To start with a diagonal every day (always be 0) and one day at a time, fill the column on the right. If you land on the weekend (non-business day) column, the number of business days does not change, it is done from left. Otherwise, the number of business days increases by one when you reach the beginning of the line at the end of the line end and continue until you reach the diagonal again. Then go to the next line.

    For example, do not say business days on Saturdays and Sundays -

      | MT TWT FSS - | -------------- M | 0 1 2 3 4 4 4 T4 0 1 2 3 3 3 W | 3 4 0 1 2 2 2 T | 2 3 4 0 1 1F | 1 2 3 4 0 0 S 1 2 3 4 5 0 S 1 2 3 4 5 5 0  

    Then insert 49 values ​​into the string in the table.

    Please tell me if you will get a bug.

    -Executed Correction table:

      | MT TWT FSS - | -------------- M | 0 1 2 3 4 4 4 T4 0 1 2 3 3 3 W | 3 4 0 1 2 2 2 T | 2 3 4 0 1 1F | 1 2 3 4 0 0 S 0 1 2 3 4 0 S Improved string: '0123444401233334012222340111123400001234000123440'  

    Expression of improvement:

      5 * (DATEDIFF (@E, @S) DIV 7) + Mid ('0123444401233334012222340111123400001234000123440', 7 * WEEKDAY (@s) + WEEKDAY (@E) + 1, 1)  

    Converting C++ Bit Pattern to Java -


    I am converting a C ++ program into Java and completely trapped in the following method, Blown up. Would you love to explain that what this method is doing?

    Tall TSBC :: GetSignedValue (Constant Ndita String and Values) {Fixed NDataString s; S = value; Long multiplier (1); Size_t lane (S. lane ()); If (lane! = 0) {if (s [0]> = (four) 0xB0 & amp; 0] [lt; = (four) 0xB9) {S [0] & amp; = 0x7F; // bit pattern: 01111111 multiplier = -1; } And if (S [lane-1]> gt (=) 0xB0 & amp; [Lennon-1] & lt; = (four) 0xB9) {S [Lane -1] & amp; = 0x7F; // bit pattern: 01111111 multiplier = -1; } Second multiplier = 1; } Second multiplier = 1; Return s.ToLong () * Multiplier; My initial Java version:
      Get long personal property (last string value) {byte [] bytes = value.getBytes (); Int length = bytes. Lamps; Long multiplier = 1 l; If (bytes.exe; gt; 0) {if (bytes [0]> = (four) 0xB0 and bytes [0]  gt; = (four) 0xB0 and bytes [length - 1] & lt; = (four) 0xB9) {bytes [length - 1] & amp; = 0x7F; // bit pattern: 01111111 multiplier = -1; } Second multiplier = 1; } Second multiplier = 1; Return long. Arrays.toString (bytes) * Multiplier; }  

    Am I correct?

    It is taking a byte string (i.e. no text) and for this a long execution of this multiple Depends on things, and looks broken: It is removing the sign bit from two different places. Another issue is unnecessary non-reintercing (due to static variables).


    asp classic - Debugging ASP Stored Procedure Calls -


    मैं एक SQL Server 2005 संग्रहीत कार्यविधि को कॉल करने के लिए निम्न कोड ब्लॉक का उपयोग कर रहा हूं। समस्या यह है कि कॉल अंततः असफल हो जायेगा। मैं असफलता के मामले के बारे में अधिक क्रियाशील जानकारी कैसे प्राप्त कर सकता / सकती हूं? मैंने असफल इनपुट के साथ एसपी का परीक्षण किया है और मुझे कोई समस्या नहीं मिली है। यह एएसपी पक्ष पर एक त्रुटि को इंगित करता है।

      सेट rsOrderItems = Server.CreateObject ("ADODB.Recordset") rsOrderItems.ActiveConnection = MM_SkateSeason_Connect rsOrderItems.CursorType = 0 rsOrderItems.CursorLocation = 2 RsOrderItems.LockType = 1 rsOrderItems.Source = "{dbo.upOrder_InsertNew ('' और amp; MM_OrderString & amp;" ')} "त्रुटि पर फिर से फिर से शुरू करें rsOrderItems.Open अगर (rsOrderItems.State) और फिर असफलता InsertOrder =" आदेश विफल 2 "अंत यदि  

    कनेक्शन ऑब्जेक्ट में एक त्रुटि संग्रह है जिसके माध्यम से आप स्पिन कर सकते हैं:

     प्रत्येक त्रुटि ऑब्जेक्ट के लिए MM_SkateSeason_Connect.Errors डीबग। प्रिंट "वर्णन:"; ErrorObject.Description debug.Print "संख्या:"; ErrorObject.Number अगला 

    php - Zend_Paginator; is it optimized? -


    I'm going to use the Zend_Paginator class in my project. I found examples of class on the Internet, one of them is

      $ sql = 'Select' from 'table_name'; $ Result = $ db- & gt; Get all ($ sql); $ Page = $ this- & gt; _getParam ('pages', 1); $ Paginator = Zend_Paginator :: Factory ($ results); $ Paginator-> SetItemCountPerPage (10)); $ Paginator-> SetCurrentPageNumber ($ page); $ This- & gt; View-> Paginator = $ paginator;  

    On the first line, it will actually pick all the rows from table_name what if I have 50000 lines? It would be very disabled.

    Is there any other way to use Zend Pageant?

    Regarding this problem, you may be interested in this section of the manual: ( Quotation, Zor Khan) :

    ... database adapters require more detailed explanation
    Contrary to popular belief, to calculate these adapters database Do not get all records from Instead, the adapter adds the original query to create the corresponding COUNT query
    legs Greater then execute COUNT query to get the number of rows.

    This requires additional rounds of databases to travel, but bring the whole result set and multiply it by using count () It's fast.
    Especially with large collection of data

    (There is more to read on that page - and there is an example that should give you more information)


    The idea is that you will not bring all the data yourself , but you should use the Zend_Paginator adapter to access your data.

    This adapter will be specific to " data that is brought through SQL query ", and how it will be found directly on the database side - which means that only the required Which is being brought, and not initially all the data like you.


    asp.net - Crystal Report Viewer Accuracy -


    I have several crystal reports that I am displaying in the viewer in an asp.net web page. These reports have been very advanced with tables and charts on them. What we have seen is that these lines take on the self, often outside the pixels in the preview, or from the bottom of the page Running is not a problem when you run reports in the Crystal Designer app, only web preview is anyone seen or solved in the past?

    However, while exporting to an ASP.NET web page, I have HTML, PDF and other outputs Faced with similar formatting problems.

    Most of the time, I think that while the line looks in line with others, it does not happen, when this happens, generally I first click the zoom drop down on the design screen from 100% to 400 I convert to% and verify that they are actually in line

    apart from the "Format" menu you can be sure that the objects are in the same size and the same line of vertical or horizontal form "Ally" And "shake sizes can use" menu option.

    I have seen it on the screen right where we have seen, but the reason for showing some items separately in the export is if they are not standing properly.

    Just throw it out. Hope it helps.


    JQuery Plugin Help -


    I am trying to develop a JQuery plug-in that would access an external XML feed and display the results. Even I have so far:

    Include HTML header

      & lt; Script language = "javascript" src = "jquery.rss.js" type = "text / javascript" & gt; & Lt; / Script & gt;  

    JQuery Ready

      & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ("# rss"). RSS ({count: 6, loading_text: "loading"})}}; & lt; / script & gt;  

    plugin (jquery.rss.js)

      (function ($) {$ .fn.rss = function (o) {var s = {count: 6, loading_text: Null;}; if (o) $ .exende (s, o); this return. (Function () {var list = $ ('& lt; ul class = "rss" & gt;') .appendTo (this) ; Var loading = $ ('& lt; p class = "desc"> 
    IMG src = "loading.gif" height = "19" width = "18" range = "0" & ​​amp; Gt;
    '+ s.loading_text +' '); var item = 0; var url =' http: // www. Example.com/feed.xml; if (S.loading_text) $ (this) .Append (loading); $ .et (url, {}, function} {if loading (sloading_text) is loading.Riv (); $ ('forecast', data) each (function (i) {var title = $ (this). Type ("title"). Text (); var description = $ (this) .find ("description"). Text (); list.append ('& lt; li & gt;' + title + '-' + Details + '& lt; / li & gt; '); Item ++; If (item == s count) last; }); }); }); }}) (JQuery);

    As long as I do not try $$, everything works correctly. I've verified using the alert () that the correct url is being called from the $ $ .get request.

    Hopefully I am not far away and a Jaguar guru can tell me where I am going wrong. Thanks in advance for your help!

    You can not cross-domain AJAX requests or develop server-side proxies (same Posted on the host) that route your request to the Underground or look at the API that supports JSONP.

    Also see -


    asynchronous - JavaScript code improvement -


    I'm just not a big javascript performance guru, am I thinking now, can I compact the following code now? It is not written in the form of packing or compression, but in the way it is written.

      (function () {var jq = document.createElement ('script'); var a = document.createElement ('script'); var cm = document. CreateElement ('script') ; Var ga = document.createElement ('script'); var domain = 'http://example.com/'; jq.src = domain + 'jquery .1.3.2.js'; a.src = domain +' Jquery.alphanumeric.js '; cm.src = domain +' common.js '; ga.src = (' https: '== document.location.protocol?' Https: // ssl ':' http: // www ')' .google-analytics.com/ga.js'; ga.setAttribute ('async', 'true'); document.documentElement.firstChild.appendChild (jq); document.documentElement.firstChild.appendChild (cm) ; Document.documentElement.firstChild.appendChild (a); document.documentElement.firstChild.appendChild (ga);}) ();  

    Cheers people!

    as it is written, and performance is unrelated, but it is more compact, Writing correctly:

      function append script (url, async) {var el = document.create element ('script'), root = document.documentElement; El.async = async; El.src = url; // Insert an IE6 bug (http://bugs.jquery.com/ticket/2709) Avoid using root.insertBefore (L, root.firstChild); } Ependascript ('http://example.com/js/jquery.1.3.2.js', Incorrect); Ependascript ('http://example.com/js/jquery.alphanumeric.js', incorrect); Ependascript ('http://example.com/js/common.js', Incorrect); Ependascript (('https:' == document.location.protocol? '// SSL:' 'www') + '. Google-analytics.com / ga.js'), true);  

    assembly - MIPS program! need help- i m not sure if i m doing it right -


    Trying to write MIPS program which can check the set of ten single digit numbers (positive, zero, or negative), which can

    Below is my MIPS program

     . Data signals: .asciiz "Input Score:". Different 2 HR_Neg: .asciiz "\ n Negative Score:" 2 Align HR_Pos: .asciiz "\ n Positive Score:". Different 2 HR_Negsc: .asciiz "\ nNumber of Negative Score:". 2 HR_ Posc: .asciiz "\ nNumber of positive scores:". 2 align: hr_coma: .asciiz "," .different2hrrrrrk: .asciiz "\ n \ n" .line 2 neg: space 10 .control2 position: .space10. Global Chief Text Main: li $ t0, 0 la $ t1, no, $ t2, 0a $ t3, position $ t4, 0l $ t5, 0l $ t6, 0 loop: li $ v0, 4 Add $ 1, $ T1, $ 4, $ T0, $ T, 1BL_and F: $ 1, $ 1, $ 100, SW $ v0, Add 0 ($ T3) $ T3, $ T3, 4 ADI $ T2, $ T2, 1 L_end: ADI $ T4, $ T4, 1 BLTU $ T4, 15, Loop # Output numbers li $ v, 4 dollar IN0, hr_ngc csll $ v 0, add 1 $ a0, $ t, 0 sscll $ v, 4a $ a0, hrpose system Mas $ v0, add 1 $ a0, $ t2, 0 syscall #output negative score, $ v0, 4 la $ a0, hr_ neg syscall la $ t1, neg lw $ a0, 0 ($ t1) li $ v0, 1  

    Please enter some comments in your code, interested can try to understand what to do Is trying.

    In addition, there is a typo in the code in which you have a reference to a label HR_NJCC and HR_NGC, from which I think that when you say "it does not run" you really mean that it is not

    Step 2 - Actually get it to execute

    Step 3 - Now you can start debugging

    Some such terrain You can see:

    how much room you have. The place you told, is this enough?

    What are you using to evaluate bltu instruction + ve and -ve right?

    How does your program end? - Does something look missing?

    The following comment:

    Hey, with the details of the problem, I suspect that some of the code written by you is saved in this project. I am referring to numbers 15 and 50.

    You know, when we can estimate how much you know and do not know, then it is very difficult to provide useful help. More detailed questions, more answers can be answered. And in response to that other question some advice is clearly still applicable.


    javascript - where can I learn about how do developer browser bookmarklets (language, framework, IDE, techniques etc)? -


    How can I learn the developer browser bookmarkmark (language, framework, IDE, technology etc.)? Maybe they are more than a JavaScript development thing?

    For example, let me give examples of what I am looking for:

    and

    >

    Thanks

    ?


    vim: Executing a list of editor commands -


    Is there a way to list the editor command? I want to execute a series of 'global' commands, and there is some sample of commands so I would like to use the list of ideals (regex search and options), and then instead of typing them into each command will run.

    Thank you!

    (Update: s / buffer / register / g)

    If you want to run all the commands that you want to run in a register, then you can execute the register? For example, if you have a file:

     : g / dd / ya  

    Pre> ABC DPTD DD DD

    / former>

    Attach this yanks to all the lines with a DD and a

    register if You are on the first line of the file, and type:

      @ one  

    Then 2 lines will now be removed, and the file should be visible: < / P>

      ghi dd dd  

    wcf - How can I send fault on a duplex channel? -


    Client and a server communication in duplex mode Client has a universal service (action = "*") because contract callbacks.

    I think that the server is able to send blame to my client.

    How can I

    About any kind of setting In the

      action = NotificationData.NotificationAction  

    NotificationA data is a messagecontact class in which Property is MessageId

      [MessageContract] Public class notification data {public const string notification acne = "http: //gfader.com/copied-from/tomasz.janczuk.org"; [MessageBodymember] Receive public string message { Set; } [Messebomember] Public Date Time Send Time {Receive; Set; } [MessageBodyMember] Receive public email messages {email; Set; }}  

    Code on client:
    if MessageId == 500 -> error from server


    Prolog: Finding the second largest element in a list -


    I know how to find the largest element in the list & mdash; There is no problem, but me second the biggest element?

    Say that is the second largest (+ list, val) and if wall is the second largest element in the list

    If there is a tie for the biggest, then the second largest is ...

    One way to do this (n) is first, initially, ( slne / 2 ). Given that we are after the second largest element, we will assume that you have the input list (number) with at least two lengths. I first remove the things by comparing the relative values ​​of the two elements and the current maximum And as the current 'second largest' record (as previously suggested, by Priyank), call ( Slne / 4 ) to call any other predicate for calling:

      Slane ([E0, E1 | Es], res): - E0 & Gt; E1,!, Slen (SE, E., E1, Race). Slane ([E, E1 | AS], Race): - Slane (SE, E1, E., Race). Secondly, now we have got the starting point of the reference, through the rest of the list (if any) and by returning the second largest element (less than MAX), ( Slay / 4 ). 

    Base case: No more elements left! We have ended Next case: We can get a new local maximum at the beginning of the list:

      Slane ([], _, res, res)  

    P>

      Slane ([E.SE], Max, _SecMax, Res): - E & gt; = Max,!, Slane (SE, E, MAX, race)  

    (Note that we throw the second second largest (secondend) because we believe that Max is equal to or Was equal to it) Next case: We are not getting a new local maximum, but we find a new 'second best':

      Slane ([E.E.S.], Max, SecMax, Ridge): - E & gt;  

    Final case: Throw down other values, because they are irrelevant - look at the rest instead:

    < Pre> slane ([_ | Es], max, cicamax, res): - slen (se, max, cemax, race).

    That's it. Personally, I like the solution of Juanjo, mainly because it is a line of code, and the performance difference between o (n log n) and o (n) can also be negligible for large input ( Also keep in mind that dsort / 2 does not appear in all PROLOG implementations - for example, in SWI-PL, you can try msort / 2 instead Are).


    asp classic - ASP "Operation not Allowed" error occured while eecute Request.Form method -


    I have run the following script to increase the file size for upload e: \ inetpub \ adminscripts cscript adsutil.vbs set w3svc / ASPMaxRequestEntityAllowed size

    After running the command. I am getting this error ...

    Request Object Error 'ASP 0104: 80004005'

    The operation is not allowed

    P>

    / ewqms370 /common/indexintermediate.asp, line 63

    ... for this code here:

    change strUserName = (Request.Form ("txtUserName")

    What value did you get from AspMaxRequestEntityAllowed property? Remember that it should be specified in byte so that you want to double check it. Why would it possibly be appropriate to open your metabase file? To ensure that your script has been updated accordingly. On IIS6 you can open metabase.xml which is located in c: \ Windows \ System32 \ Inetsrv, double-check it to "AspMaxRequestEntityAllowed" Find the line.

    Specifies the maximum number of bytes allowed in the AspMaxRequestEntityAllowed entity entity if a content-length header is present in the ASP request and specifies the amount of data over the value of AspMaxRequestEntityAllowed IIS returns an error response, it is related to property function MaxRequestEntityAllowed, but ASP is specific to the request.

    Official Documents in MSDN:


    java - Sampling in visual vm -


    Can anyone explain the science behind the sampling functionality?

    I would have thought that gathering the amount requires an instrument for profiling the application for the CPU spent on each particular method, but it does not appear that visualvm is doing any kind of equipment. , So I'm curious to know how it has been done.

    It seems that the new Visualum - templates plugin display and memory data dump threads periodically Gathers together on the monitored application for the memory histogram. Check for more details.


    asp.net - AdSense: How to keep Ads updated with logged in user content -


    I want my ads to work as Gmail, so it will show ads according to user's content.

    I use AdSense site authentication and it works fine, I can see the crawler reading the page.

    I have configured my site in the following ways:

    Whenever the user redirects to a page, then I have added the ID so that the request is: X? Id = 123

    And when the crawler user entered the same page, it shows a list of links to the same page with a different ID (according to each link id shows different user content ):

    X? Id = 1

    X? ID = 2

    X? Id = 3 ....

    It worked great !! For example, if the user entered the car's content then he got a car ad.

    But after some time it stopped working, even if the crawler continues to read pages, but ads are not relevant to user content.

    Is there any way to update the ad?

    I use it: ASP.NET MSSQL 2005

    thanks

    Is a non-authenticated, non-JavaScript-running bot running, which is looking at references on these pages? Use Google Webmaster Tools () to know what googlebot sees on your site


    iphone - How to change the name of the application without having to rewrite the code? -


    I want to rename the application, but do not want to overwrite the code.

    Anyone can help me with this problem ....

    Thanax Advance

    You can rename the application executable, which aggregates your app target. The simplest way to do this is:

    1. Extend the "executable" section
    2. Highlight the executable that you want to rename
    3. Click again to start editing, and type the name you want. Alternatively, you can update the bundled display name to info.plist, but it is actually replacing your build product, and here and here:


    linux - How to know when a schedule() call is returning because of a signal? -


    In a device driver for some PCI hardware, I have a ioctl call that waits for the incoming PCI bus barrier using wait_queue_head_t Schedule () .

    By calling and soda, then the irq_handler function awakens. This function when the PCI bus is interrupted, everything seems to work properly.

    My question is how to distinguish whether the schedule () call is returning it due to my irq_handler function, or because some signal Have been sent?

    Do I have to handle it with the flag in the irq_handler function?

    schedule call:

     After  (after the signal_pending (current), some with this type of rows : Class = "post-text" itemprop = "text")) {retval = -EINTR;  

    Install Windows service for a Sharepoint application -


    I have written a Windows service to send mail to users in a Sharepoint list based on certain conditions.

    The development server is a stand-alone sharepoint installation and the Windows service works fine. However, there are applications (SharePoint) and databases (SQL) on different servers in production environments.

    So when Windows tries to open the service list, it says "database" can not open the "WSS_Content80" login login. Login failed. "Let me know how to proceed. I have been killed on this issue for a long time ..

    This issue is quick and dirty To resolve from what you can do to allow users to grant content to your SharePoint application's database, which is running Windows services.

    But you want to do it in a systematic way, I recommend you write Timer Job for SharePoint . Not only here permission is taken care of automatically but you can apply it to multiple web applications even if you want it and manage it easily.

    The best article on the subject is or


    java - What causes JVM exit code 10? -


    The Eclipse RCP Analysis running on Mac OS X 10 is crashing with Java Exit Code 10. What it means, and What could be a possible reason?

    Additional Information:
    eclipse.buildId = unknown
    java.version = 1.5.0_20
    java.vendor = Apple Inc.
    BootLoader Constants: OS = Macaux, RF = x86, WS = Carbon, NL = FIEFI - Command Line Arguments: -OA MacCaux-Carbon

    - Wim-XMS 256 M-XMS 650 M- Exabyte

    Some other information from the .crash file:

      Process: Java [2215] Path: / usr / bin / java Detector: Java version: ??? (???) Code Type: X86 (native) Parent Process: Eclipse [2214] Date / Time: 2009-11-12 13:19:45 45.263 +200 OS Version: Mac OS X 10.5.8 (9L 31A ) Report Version: 6 Anonymous UUID: B2FA3949-E261-4B4E-A924-316E6C17CD3E Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Code: 0x000000004 Crash Crashed on cebeb160: 0 Application Specific Information: Java Information: Version: Java HotSpot (TM) Client VM (1.5.0_20 -141 mixed mode) Virtual machine version: Java HotSpot (TM) client VM for Macox-X86 (1.5.0_20-141), 13A Pattern 2009 10:28:19 GCC 4.0.1 (Manufacture of Apple Inc. 5465) Exception Type: Simply Error (0xa) PC = 0x96d903cd  

    And here's some thread 0 detected Has gone:

      threads crashed: 0 Com.apple.QD 0x96d903cd _SetDstBits32BGRA + 8 com 1 .apple.QD 0x96d83c55 DevRgn + 301 2 com.apple.QD 0x96d83a65 StdRgn + 671 3 Com.apple.QD 0x96d837c0 CallRgn + 50 4 com.apple.Hitoolbox 0x9512d356 MyDrawwing Process + 101 5 Com. Epipal.com QD 0x96db1569 COMMUNITYWICE LOOP + 9 18 6 COM. Apple. HIT Blobbs 0x9512 D3 FC Invert Miregraine + 164 7 Com. Apple. Hotbox 0x9512 D8 DC Shura Drag Heat + 4318 Com. Apple. HITLLX 0x95172fa9 CTextensionDrag :: ShowDragFeedBack (TCharOffset, OpaqueDragRef *, unsigned char) + 32 9 com.apple.HIToolbox 0x9517318d SectactationDrag :: DraginWindow (Opaquergirf *, unsigned char) + 331 10 com.apple.HIToolbox 0x951731f4 Sect Accidental Drugs: Drag Tracking ( Concise, OpaqueDragRef *, Unsigned Four, Unsigned Four) + 80 11 com.apple.Hitoolbox 0x951874b3 OpaqueTXNObject :: DragraTracking (Small, Outline *, Unsigned Four) + 119 12 com.apple.Hitoolbox 0x951874f4 CEasyTextDrag :: ClientDragTracking (short, opaque Udrof *, * unsigned char) + 56 13 com.apple.Hitoolbox 0x95173 EA Seat Draction :: H IDrag Vithin (Aparicrgraf *) + 46  

    The user was dragging items into the application and left Was it, it seems that this may have some native library problems with this?

    Which version of Java are you using, and with which settings?
    A similar accident is reported, and it seems that the JVM version, and even like the settings:

      -vmargs -Xms128m -Xmx256m -XX: PermSize = 128M -XX: MaxPermSize = 256M  

    Try at least

    (Note: The so-called mentioned in the comment is only to tell you that the exit code is programmatic or OS -Versible, which you do not tell much. And I do not know about eclipse-specific exit code)


    c# - secure web service -


    I am going to create a web service that is passing confidential information on the network.

    What would be the best way to secure the web service? How do I know who the information requesting information is, what it is, and this is not another application that is using another username and password?

    Use WCF for your web service! There are several safety capabilities in it:

    You can

    • secure your customers through the certificate - only those people have the right certificate Calls will be allowed to be processed

    • Protect your customers by viewing them in your internal Active Directory domain - Only those AdWords accounts will be allowed to process their request along with < / P>

    • Custom User / Protect your client with password, you can see against anything you want (this is the most flexible, but also the most complex choice, and if you get some disturbances then provide the most probability for failure )

    Plus, with WCF, to secure the transport between your customer and the service, or to encrypt and sign messages forward and forth Wikal As one.

    See all things as a great starting point for WCF.

    If you are serious about programming WCF safely and safely, then hold a copy of the book by Juval Lovie - this is Bible F or WCF.


    asp.net - Get Hidden Field Value -


    मेरे पास GridView परिभाषित किया गया है:

      & lt ; Asp: GridView आईडी = "myGridView" AutoGenerateColumns = "false" runat = "server" OnLoad = "myGridView_Load" ऑनरॉ कॉमांड = "myGridView_Command" OnRowEditing = "myGridView_RowEditing" OnRowDeleting = "myGridView_RowDeleting" DataKeyNames = "आईडी" & gt; & LT; कॉलम & gt; & Lt; एएसपी: बाउंडफिल्ड डेटाफिल्ड = "आईडी" दृश्यमान = "गलत" / & gt; & Lt; एएसपी: बाउंडफिल्ड डेटाफिल्ड = "जन्मदिन" दृश्यमान = "गलत" / & gt; & Lt; एएसपी: बाउंडफिल्ड डेटाफिल्ड = "फर्स्टनेम" हैडर टेक्स्ट = "प्रथम नाम" / & gt; & Lt; एएसपी: बाउंडफिल्ड डेटाफिल्ड = "अंतिम नाम" हैडर टेक्स्ट = "अंतिम नाम" / & gt; & Lt; asp: TemplateField हेडर टेक्स्ट = "अन्य" & gt; & LT; ItemTemplate & gt; & Lt; asp: LinkButton आईडी = "editLB" runat = "सर्वर" टेक्स्ट = "संपादित करें" CommandName = "संपादित करें" / & gt; & Lt; asp: LinkButton आईडी = "deleteLB" runat = "server" text = "delete" commandName = "हटाएं" / & gt; & Lt; / ItemTemplate & gt; & Lt; / एएसपी: TemplateField & gt; & Lt; / कॉलम & gt; & Lt; / एएसपी: GridView & gt;  

    जब कोई उपयोगकर्ता संपादन बटन को क्लिक करता है, तो मुझे जन्मदिन कॉलम का मान प्राप्त करना होगा। इसे करने के लिए, मैंने निम्न प्रयास किया है:

      संरक्षित शून्य myGridView_RowEditing (ऑब्जेक्ट प्रेषक, GridViewEditEventArgs ई) {GridViewRow पंक्ति = gvUsers.Rows [e.NewEditIndex]; दिनांक समय जन्मदिन = (दिनांक समय) (पंक्ति। सील्स [1]। पाठ); // काम नहीं करता}  

    मुझे पता है कि इस तथ्य के साथ कुछ है कि स्तंभ दिखाई नहीं दे रहा है कॉलम छिपा हुआ होना चाहिए। लेकिन मुझे उस मूल्य की आवश्यकता है & mdash; मैं यह कैसे कर सकता हूँ?

    समस्या यह है कि जब बाउंडफिल्ड < / कोड> गलत पर सेट है कॉलम ग्राहक को प्रदान नहीं किया गया है इसके बजाय काम करने के लिए HiddenField को इसके बजाय TemplateField में उपयोग करना होगा।

      & lt; एएसपी: TemplateField & gt; & LT; ItemTemplate & gt; & Lt; asp: HiddenField आईडी = "हिडनफिल्ड 1" रनैट = "सर्वर" मान = '& lt;% # Eval ("जन्मदिन")% & gt;' / & Gt; & Lt; / ItemTemplate & gt; & LT; EditItemTemplate & gt; & Lt; asp: HiddenField आईडी = "हिडनफिल्ड 1" रनैट = "सर्वर" मान = '& lt;% # Eval ("जन्मदिन")% & gt;' / & Gt; & Lt; / EditItemTemplate & gt; & Lt; / एएसपी: TemplateField & gt;  
      संरक्षित शून्य GridView_RowEditing (ऑब्जेक्ट प्रेषक, GridViewEditEventArgs ई) {GridViewRow पंक्ति = GridView.Rows [e.NewEditIndex]; छिपे हुए छिपा हुआ छिपा हुआ = (छिपी हुई फ़ील्ड) पंक्ति। सील्स [0] .FindControl ("HiddenField1"); दिनांक समय जन्मदिन = कन्वर्ट। ToDateTime (hidden.Value); }  

    संपादित करें

    उपरोक्त विधि अभी भी तालिका में स्तंभ को रेखांकित करती है, इसलिए आप एक खाली कॉलम के साथ समाप्त होते हैं। यह काम करता है, लेकिन सबसे अच्छा समाधान नहीं है, यहां एक तरीका है कि जन्मदिन फ़ील्ड छिपाना है लेकिन फिर भी इसका मान रोव संपादन ईवेंट हैंडलर में मिलता है बस ध्यान रखें कि जन्मदिन अभी भी क्लाइंट में प्रदान किया गया है, सिर्फ प्रदर्शित नहीं।

      & lt; शैली प्रकार = "पाठ / सीएसएस" & gt; .ide {display: none; } & Lt; / style & gt; & Lt; एएसपी: बाउंडफिल्ड डाटाफील्ड = "जन्मदिन" & gt; & Lt; आइटम शैली CssClass = "छिपाना" / & gt; & Lt; / एएसपी: BoundField & gt;  
      संरक्षित शून्य GridView_RowEditing (ऑब्जेक्ट प्रेषक, GridViewEditEventArgs ई) {GridViewRow पंक्ति = GridView1.Rows [e.NewEditIndex]; दिनांकटाइम जन्मदिन = कन्वर्ट.ToDateTime (row.Cells [1]। पाठ); }  

    Advanced search with distances using NHibernate and SQL Server Geography -


    I got an existing advanced search method which is a collection survival FormCollection checks Search criteria, and if present, adds a criteria for search such as

      public IList  

    I have also found basic distance searching to find out how far every residence is from the search criteria HBM for the query

      & Lt; Sql-query name = "Residence.Nearest" & gt; & Lt; Return alias = "residence" class = "residences domain. Estimate, residence" /> & Lt; Return-scaler column = "distance" type = "float" /> SELECT R. *, dbo.GetDistance (: point, R.Coordinate) AS R distance Distance from R & lt; Distance by 10 orders & lt; / Sql-query & gt;  

    I had to define a function to calculate the distance, because there was no way to get NHibernate to avoid colon geographical function:

      Create Function dbo.GetDistance (@firstPoint nvarchar (100), @secondPoint geometry) returns returns Geography :: STGeomFromText (@firstPoint, 4326) .STDistance start float (@ secondPoint.STAsText ()) / 1609.344 end  

    and the repository calls the named query as such:

      return session .GetNamedQuery ("Residence.Nearest") .Setstring C ( "point", String.Format ( "POINT ({0} {1})", latitude, longitude). List ();  

    So my question is: I have two How to add (or start with scratch), so I can filter advanced search results to include only residences within 10 miles of search location?

    Update I've tried to use NHibernate.Spatial with the following code:

      criteria.Add (SpatialExpression.IsWithinDistance ( "coordination", the new coordinates (latitude, longitude), 10));  

    but SpatialExpression.IsWithinDistance returned a System.NotImplementedException .

    have you seen? This can provide an easy solution to your problem.

    optional ICriterion is to implement your own - if you get the AbstractCriterion if it is not too difficult and Target your special database platform. After this, you can combine your distance function with other parameters.


    php - regular expression to match an empty (or all whitespace) string -


    I want to match a string that can be any type of whitespace character (especially using PHP I'm here). Or in any way to say that a string is empty or only white space will help!

    T This requires regular expression, just use:

      if (tr ($ str) === '') echo 'empty string';  

    mysqli - MySQL Select- Show Result based on mapped tables -


    I have 2 mysql table, the first table activity a patient activity level as an integer Archives, maps the second table of each integer with details. I am trying to make a selected question which gives details of the patient's activity rather than the integer value.

      Activity table ID | Pied | Bath | Cognition | Housekeeping | Dressing | Food | Meals 1 | 20 | 4 | 4 | 2 | 6 | 8 | 4 2 40 4 | 2 | 4 | 4 | 6 | 6 mapping table value. Details 2 | Free 4 | Min 6 Medium 8 Maximum Required Query Id. CID | Bath | Cognition | Housekeeping | Dressing | Food | Meals 1 |  has seen using mysql [case] [1] but it does not seem to work. I have also reviewed these two stack overflow questions [Question 1] [2] and [Question 2] [3] They really did not look like I was watching. Any help would be appreciated.  

    The following code uses your mapping table to display the correct code. Select the MYSQL documentation ID on the selection, PID (Select value from mapping where value = A. bathing) as 'bath', (select description from mapping where value = one adapter) as 'cognition' (In the form of 'dressing' (select value from mapping where value = A.priding) as 'feeding', select description from mapping as 'housekeeping'. (Select description from mapping where Value = a.meal) from 'food' activity As


    java - Android How to getLat() and get Long() -


    itemprop = "text">

    im if a user is sending me an email long and lat and im getting to NullPointerException:

    < P> attempt to invoke the virtual method 'double android.location.Location.getLatitude ()' on a null object reference

    I think that with the method getLastKnownLocation () no status Start emulator because null returns? ?

    If so, how can I do this in any other way

    Here is my code:

      Public class MainActivity Extension Activity {Button BtnSend; TextView txtview; String email = "superman@hotmail.com"; String position; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_main); Find Txtview = (TextView) ViewById (R.id.textView); BtnSend = (button) findViewById (R.id.button); LocationManager lm = (LocationManager) getSystemService (context.LOCATION_SERVICE); Location Location = lm.getLastKnownLocation (LocationManager.GPS_PROVIDER); Double latitude = location. Gelititis (); Double LNG = location.getLongitude (); Position = double.string (latitude + lng); BtnSend.setOnClickListener (New View.OnClickListener) {@Override Public Zero onClick (see v) {String [] for = {"batman@hotmail.com"}; Intent to sendMypos = new intent (Intent.ACTION_SEND); sendMypos PutExtra (for Intent.EXTRA_EMAIL,); sendMypos.putExtra (Intent.EXTRA_SUBJECT, "Minimum Status"); sendMypos.putExtra (Intent.EXTRA_TEXT, status); sendMypos.setData (Uri.parse ("mailto:")); SendMypos.setType ("Message / RFC822"); startActivity (Intent.createChooser (sendMypos, "email klient"));}}); }  

    }

    Clear to me:

      Use of Android-permission: name = "android.permission.INTERNET" & gt; ; & Lt; Uses / Permissions & gt; & Lt; Usage-permission Android: name = "android.permission.ACCESS_FINE_LOCATION" & gt; & Lt; / Usage-permission & gt;  

    I think methid getLastKnownLocation is blank because the emulator does not start the position ?

    Yes, or the provider is disabled, or the device has never been used since the device was rebooted, etc. getLastKnownLocation () can easily come back to null .

    If so, how can I do it any other way?

    You get getLastKnownLocation () . All you have to do is check the result for null and do not use it indiscriminately.

    In fact, you are welcome to try to fix a space by powering the GPS briefly. / P>

    However, you can not force users and devices to give you space. If the user chooses to disable the GPS, then it is the user's choice. If the device can not get GPS fixed, then you can not force the user to transfer that has GPS access. And so on


    html - How to make a centered, responsive CSS circle within a Boostrap div? -


    नीचे JSfiddle देखें:

    मेरे पक्ष में 3 कदम हैं, इसलिए माता-पिता & lt; div class = "col-xs-4" & gt; । प्रत्येक चरण को एक साफ चक्र की तरह दिखना चाहिए जो केंद्रित है (जिसे मैं आंतरिक डिवेल प्लेसमेंट के साथ हासिल करने की कोशिश कर रहा हूं) इसके अंदर किसी संख्या के साथ।

    क्योंकि आपकी चौड़ाई अज्ञात है (100%), आप पैडिंग प्रतिशत का उपयोग करके ऊंचाई निर्धारित करना चाहते हैं, क्योंकि प्रतिशत पैडिंग की चौड़ाई से गणना की जाती है।

     < कोड> .circle {पृष्ठभूमि: # 515151; -मोझ-सीमा-त्रिज्या: 50%; -विबिट-सीमा-त्रिज्या: 50%; सीमा-त्रिज्या: अधिकतम; पाठ संरेखित करें: केंद्र; सफ़ेद रंग; चौड़ाई: 100%; padding-bottom: 100%; ऊंचाई: 0; स्थिति: रिश्तेदार; } .circle- कैप्शन {प्रदर्शन: ब्लॉक; बाएं: 0; ऊंचाई: 1 एएम; स्थिति: पूर्ण; सही: 0; शीर्ष: 50%; मार्जिन-टॉप: -5em; } & Lt; div class = "circle" id = "step-1-default-image-box" & gt; & Lt; span class = "circle-caption" & gt; 1 & lt; / span & gt; & Lt; / div & gt;  

    ऊर्ध्वाधर केंद्रिंग इस के साथ मुश्किल हो जाती है, इसलिए आपको टेक्स्ट के चारों ओर एक और आवरण जोड़ना पड़ेगा, जो आप पूरी तरह से स्थिति में रख सकते हैं।

    किसी और ने सिर्फ एक उत्तर जोड़ा यह और इसे हटा दिया, लेकिन मुझे लगता है कि ऐसा करने का सबसे अच्छा तरीका है।


    java - Removing white-space from a pdf using PDFBox -


    I'm calling Fedex API to generate a shipping label. The API returns a byte array, then I By typing in a PDF:

      files.write (paths.get ("xyz.pdf"), imgbits); // IMGbits I have feedback from the FedEx API  

    However, when I open the file, I think the actual label is only 2/3 wide by width and 1/2 at the height Is the reason for the whole PDF because of which I am getting a lot of white space in PDF.

    Can this white space be extracted in any way by using the PDF box? Or is it possible to remove white space when saving the byte array in a PDF file?

    Thank you.


    2 or 3-way merge of word or pdf files -


    So I'm not sure that it exists, so I'm asking for some help from intelligent people for stack overflow .

    I'm looking for a 2 or 3-way (preferably) document merging tool that works great with MS Word documents or PDFs. I have many documents, pages from these documents and I want to merge together the sections and merge them into one document.

    I thought that the best way to do this is to do 3-merge ways to help me merge the tools. I have taken a look at the following merge tools:

      Compare to Arxis merge 4 Compare it Compare it! Delta Valkar 2.1.1 Diff Merge Exam Diff Pro 7.0 Mult Smart Synchronized WinMerge UltraCompare  

    None of these are in accordance with my requirements Most PDFs and Word docs can not read. Anything that can do, only the ultra compiler can save the changes. However, compare only importing text (all images are lost) and changes. Are saved in RTF format, so I lose a lot of formatting. I want to save back to the original format.

    Has anyone used a device that can merge explicitly by allowing the importation of classes and / or PDF documents to the sections / pages?

    You can add multiple RTF / DOCX / DOC documents in a visual using the TE editing control Invisible control, and then save the composite document as a single RTF or DOCX formatted document. Supports control images, tables etc.


    c - How to read lines from a text file and store as char array? -


    text after "itemprop =" text ">

    I have an input text file with some instructions and, line 7, start with several lines of text. Something like this:

      Hi gBroThuo oWdbmna EO MT ce oneain, nDustuh o Ade DS, bpopoonf oneigno abro WMT eiw N, Yrtyt hlil T .s Ble a meyboefr rtIhoyod WLA rimw yidehl. KES, Oyn L of Fu! AcMadmdnae nddmh ITA behsctr RFT iHdo "L, sie G" Hu, N eoaecMBt- - h  

    I need to be stored in a text to store characters < / Code> array (including new line characters). What functions have I read and can use four arrays to store a single to this text?

      four filebooks [Maxfile]; FILE * f; Int c; Size_t i; If (f = fopen ( "file name", "r")) {(i = 0; i & LT; (MAXFILE - 1) & amp ;! & amp; (c = getc (f)) = EOF ; ++ i) FileBuf [i] = C; Fclose (f); } And malfunction ("file could not be opened");  

    Edit:. You said you wanted to leave 7 lines for the first time

      integer x; Four line [MAXLINE]; For (x = 0; x & lt; 7; ++ x) fgets (line, maxline, f); / * Leaves the first 7 lines, so now the file indicator will point to data after 7 lines * /  

    regex - detect any combining character in Java -


    I'm finding a way to find out that in the Java string there is a character "is a combination letter" or not ,

      String Khmer CombiningWeil = New String (new byte [] {0 by 0xe1, (byte) 0x9f, (byte) 0x80}, "UTF-8"); // Unicode 17c0  

    represents one I have tried "\\ p {InCombiningDiacriticalMarks}" but it does not apply to these special combination characters Or even if there is some comprehensive list in the combination of all Unicode character blocks, can I still be able to create a regex for them? According to

    , there are several blocks for combining letters.

    There are many useful functions in Java, try:

      string codePointStr = new string (new byte [] (byte) 0xe1, (byte) 0x9f, (byte ) 0x80}, "UTF-8"); // Unicode 17c0 System.out.println (codePointStr.matches ("\\ p {MC}")); System.out.println (character. COMBINING_SPACING_MARK == character .get (CodePointStr.codePointAt (0));  

    (correct print in both cases)

    In this case, (and related regex \ p {Gc = Mc} ) Both refer to "Mark, Spacing Magnizing" which basically connects any character that is Connects to the previous character while adding width too.

    Other regular expressions that may be useful: For \ p {M} if you type the letter getType ( ) , you can behave in the same way that its type is COMBINING_SPACING_MARK or ENCLOSING_MARK , or NON_SPACING_MARK .

    ENCLOSING_MARK is a surrounding character, like a circle - also adds the width of the character with which it connects.

    Latin alphabet diacritical combination digits, etc. (Which basically goes up or down, and does not add any width to the character).


    java - Binary search and insert -


    I stumbled over a problem with my coding and I can not see where it is wrong.

    I am working on a program where I need to use binary search, after which an inserted item should be sorted after execution, but this is not the case at this time.

    My code is as follows:

      // array 103, 102, 101, 105, 106 public entry entry (int ITID) {int [] newItems = new Int [ Items.length + 1]; ItemPos = Arrays.binarySearch (item, 0, item number, item id); If (item POS & lt; 0) {itemPos = -imemos- 1; } System. Arrayopy (item, 0, new item, 0, item length); Item = new item; Item [item grid + 1] = eyecide; ItemsLength ++; System.out.println ("Item Status:" + ItemPoice); System.out.println ("Items:" + Arrays.toString (item)); System.out.println ("item length:" + objects lang); Return items POS; }  

    Now when I run my code the output is:

      Item status: 0 items: [103, 102] Item Lelentity: 1 item Item: [103, 101, 0, 105, 106] Item: [103, 101, 0] Item Length: 2 Item Condition: 2 Items: [103, 101, 0, 105] Item Length: 3 items Status: 3 items:  

    The only problem I have is that the array is not resolved (and it returns zero when it is 102, but maybe this is the same sorting problem is). I appreciate it very much if someone tells me in the right direction.

    Greetings,

    Alfred

    You may want Find out how binary search works You will find that work for it, items are being searched should be sorted This is the place that misleads the inserting position.


    Excel how to use CUBE functions without access to OLAP tools -


    I do not have access to PowerPivot or OLAP connections to the server using Excel 2010.

    I am trying to create a dashboard to display the ranked data and allow the user to filter by 3-4 different criteria. If the statements were nested long then I was able to work it out. But the required filter criteria is getting too much that I can not stick to this method.

    I did some research and got a good olap tool, so that the pivot table can be converted to formula. But I do not have access to the computer on the computer, and I am new to MS-BI, I am thinking that no one can use the functions of using the cubic function without any connection or any other ideas to build the dashboard Can share with Thanks a lot!

    To use Excel's cube functions, your data source should be either Microsoft Analysis Services Database (Multi-functional or tabular) or higher with Excel data model (Excel 2013 and higher) or Excel 2010 and PowerPivot You can not use the cube function with data in Excel worksheet categories. You can get some flexibility in your dashboard layout with regular Pivot Tables possibly with the GETPIVOTDATA function; There is a need to do some work later.


    regex - Which characters to escape when using RegExp object in JavaScript? -


    I have regex ^ \ (\ d + \) which matches the number of parentheses It is designed for what it hopes and does.

    I want to extend it which is used to match the digits in brackets, followed by a string that comes from a variable. I know that I can crimp a RegExp object to do this, but I'm having trouble understanding what to do to get this work done. Has anyone explained this to me?

    When you RegEx , you have a literal signaling

    / ^ \ (\ d + \) /

    But when you use RegEx constructor By using, you will have to double these symbols:

    var re = new RegExp ("^ \\ (\\ d + \\)");

    :

    There are 2 ways to create a RegExp object: To indicate a literal notation and a constructor string, the parameters of the controller function are quoted in quotation marks Using the parameters of the literal notation, do not use quotation marks.

    ... When the regular expression remains constant,

    ... when you change the regular expression patterns, then you use the constructor function> or you do not know the pattern and Getting it from another source, such as user input

    Now, if you have a variable, then it is good to stick to the constructor method.

      var re = new RegExp ('^ \\ (\\ d + \\)' + variable);  

    It is mandatory to avoid slash because it is a self-evacuation symbol.


    how do I know if my sort worked in excel vba? -


    itemprop = "text">

    I enter the following macro when sorting data:

      sub-sort_sheet_test () ActiveWindow.ScrollRow = select 1 ActiveWindow.ScrollColumn = 1 range ( "A1: AB40905") ActiveWorkbook.Worksheets to Sort.SortFields.Add ( "flurry_an_output.csv") Sort.SortFields.Clear ActiveWorkbook.Worksheets ( "flurry_an_output.csv") key .. . = _ Range ( "AB2: AB40905"), SortOn: = xlSortOnValues, Order = XlAscending, _ DataOption = XlSortNormal with ActiveWorkbook.Worksheets ( "flurry_an_output.csv") Sort .SetRange Range ( "A1: AB40905") . .Header = xlYes .MatchCase = false .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End  with the End Sub 

    I have my own function to normal use of the other sheet. etc .. wrote:

      function long line as sort_sheet_last_column (string as Shit_nam) dim rows 1 1 = Get_Rows_Generic (Shit_nam, 1) get number 'f sheet dim columns1 As rows integer columns1 = range (find_last_column (SHEET_NAME)). Column 'sheet dim sort_range range as the dim key_range range worksheet (SHEET_NAME) set with sort_range as in the number of columns received = .Range (.Cells (1, 1), .mail (line1, column1)) set up: set part made full use of sheet key_range = Krenjh (Ksel (1, column 1), Kmel (row 1, column 1)) = key_range, SortOn :: = xlSortOnValues ​​with the end, in order: = xlAscending, DataOption: = xlSortNormal .SetRange sort_range .Header = xlYes .MatchCase = false .Orientation = xlTopToBottom worksheet (SHEET_NAME) .Sort .SortFields.Clear with .SortFields.Add key. SortMethod = xlPinYin. Finish the end with the end function  

    It starts reorganizing the rows based on the right key, but how do I know that my version is 1) working on all (it's difficult Is aware that more than 40,000 rows have been properly ordered, a D2) How do I know that all other data are in their proper order?

    I always use sheets. Range. Not Simplified Sheet Summary

      lLastRow = Last used line (shMain) shMain.Range ("A1: W" & LLastRow) .Sort Key1: =. Range ("B2"), _Order 1: = XLAScaching, _Header: = xlYes, _CustomCustom: = 1, _MCCC: = Incorrect, _Ormentation: = XLopTotobotm, _Dataionation1: = XLSOR Normal  

    There was no problem sorting this category and you can add Key2, Order2 and DataOption2 to sort by several columns


    javascript - when added spin (spin.js) - web page lose functionality -


    कृपया, मुझे स्पिन फ़ंक्शन ( spin.min.js स्क्रिप्ट का उपयोग करके) के बारे में सहायता चाहिए।

    जब मैं इसे अपने वेब पेज, वेब पेज लॉग की कार्यक्षमता में जोड़ा, तब समस्या दिखाई देती है - मैं किसी भी लिंक पर क्लिक नहीं कर सकता और माउस के साथ कुछ भी चिह्न नहीं लगा सकता मुझे नहीं पता कि समस्या क्या है, कृपया मेरी मदद करें।

    शरीर टैग में टाइप करें

      & lt; script src = "js / vendor / spin.min.js" & gt; & lt; / स्क्रिप्ट & gt;  

    HTML

      & lt; div class = "लोडिंग-आउट लोडिंग" & gt; & Lt; div id = "spin" & gt; & Lt; / div & gt; & Lt; / div & gt;  

    सीएसएस

      .लोडिंग {पृष्ठभूमि: # F7F7F7; चौड़ाई: 100%; ऊंचाई: 100%; स्थिति: तय; शीर्ष: 0; बाएं: 0; Z- इंडेक्स: 500; .लोडिंग आउट {-webkit-opacity: 0; -मोझ-अस्पष्टता: 0; अस्पष्टता: 0; -वेबकिट-संक्रमण: सभी 1s आसानी; -मोझ-संक्रमण: सभी 1s आसानी; -एम-संक्रमण: सभी 1s आसानी; -ओ-संक्रमण: सभी 1s आसानी; संक्रमण: सभी 1s आसानी; # स्पिन {मार्जिन: 0 पिक्स ऑटो; स्थिति: पूर्ण; बाएं: 50%; शीर्ष: 50%;  

    jquery

      $ (फ़ंक्शन () $ (विंडो) .लोड (फ़ंक्शन () {// फ़ेडआउट लोडिंग $ ('लोड हो रहा है')। AddClass ('लोडिंग-आउट'); // लोडिंग सेटटिमेय छुपाएं (फ़ंक्शन () {$ ('लोड हो रहा है')। Hide ();}, 800);});  

    1. आपकी सीएसएस परिभाषाओं को {} में संलग्न होना चाहिए। अभी यह केवल { }
    2. अपने jQuery के अनाम फ़ंक्शन में {} अनुपलब्ध है। $ (फ़ंक्शन () / * विंडो लोड बदलें से $ (फ़ंक्शन () {/ * window load * /})

    देव उपकरण कंसोल की जांच करें कि क्या कोई भी है त्रुटियाँ। यह भी हो सकता है कि आपका जेएस भारी मात्रा में मेमोरी ले रहा है और ब्राउज़र अभी भी JS को निष्पादित कर रहा है, जब आप इसके साथ इंटरैक्ट करने की कोशिश करते हैं।
    यदि आपके पास jQuery का कोई भी स्क्रिप्ट जो $


    delphi - How do I display a different value in a TDBComboBox than what is in the database? -


    I have my TDBComboBox now just a database field has been tilted in which only one y or Can be N .

    I should do it a little bit, and show it like yes or no instead How can I do this?

    The solution was for me:

    1. Switch to the form in Design view
    2. Database Value
    3. YesNoCDS
    4. As a TClientDataSet with two fields (yes called noceds)
      • DisplayValue
      • Right-click on and create the Dataset
      • Add data to YesNoCDS in FormShow .
      • Code> Event (It looks like a hip, but I do not see any way to do this in the design view)
      • Create TDATOSOS on a form called Hanoodes and create your DataSet < / Code> YesNoCDS
      • On YesNoCombo, set ListSource on YesNoDS, and then set DisplayValue and KeyField to list fields Database Values ​​

    swift - When if/else condition is true, executes code in true and false blocks -


    In fact, something strange is happening, and I do not understand how it is possible. I'm new to fasting, so I'm missing something, if I need to, I can post more codes, but what I am doing, how can this be done?

      if sender.on {txtNumMavericks.hidden = false} else {txtNumMavericks.hidden = true}  

    In this case, the sender is a switch when the switch Is false, then in the second part of the block, as expected, but when it is true, it executes both the top and bottom statements (txtNumMavericks is visible and then disappears immediately). I found it if I put a breakpoint on the single statement through code with F5.

    If you just want to toggle the properties that you have to do, add an exclamation mark "!" Follow the real estate front:

      txtNumMavericks.hidden =! TxtNumMavericks.hidden  

    xcode - Core Data Problems? -


    I am trying to use CoreData but I already have my project Went through setup and forgot to check the box to use it

    There is no way to implement the use of core data when the first core data The box was not checked?

    If I start a new project, then I have to move a lot of information and it takes time so I would not like to be on the same project nor would I like to be new.

    If you want your existing project setup template to set up you, then the fastest way is to create just a new project as an example and select the Core Data Tick box. Open a new project and review the AppDelegate.m file and press the code to start the core data stack. This is approximately 80 lines and there is a comment calling the Core Data Stack.

    Take it to your existing project and put it in your own adelat file. In addition to your existing project, add the Cordata Framework, then add it to a new file (File-> New File-> CoreData), named "Data Model" file under Core Data. This file is used to define the equivalent of your data schema. You choose to use it graphical control.

    Then use your sample project to review the way to access the core data stack by reviewing the sample view controller.

    Note: Some people are not fond of how Apple sets the core data stack in AppDelegate.m and you will find many comments about it and how to do it better, if you search for it (I It must be forced to disclaimer). GitHub also has some third-party libraries which can help you in this regard. (Magical record, SLCardacetracks, etc.).

    Hope that helps! Good!


    jquery - Get json from another domain using #.getJSON -


    I am trying to get json on my web page, but the problem is Jason on 127.0.0.1:8111 and I Json callback is required to use but after receiving the data from the localhost: 8111 I am getting a syntax error Unexpected symbol ':'. Here is the code

      var wtAPI = 'http: // localhost: 8111 / indicator? Callback =? '; $ .jsonp ({url: wtAPI, type: "GET", callbackParameter: 'callback', datatype: "jsonp", success: function (JSON) {console.log (JSON)}, error: function () {warning ('Error')}  

    Also tried the standard

      $. GetJSON (...)  
    < P> But the way this is usually not working cuz of different domains

    and here is my JSON

      {"legal": true, "Speed": 70.410828, "Pedal": -0.0,05,646, "pedals1": -0.0,05,646, "pedals2": -0.0,05,646, "pedals3": - 0.0,05,646, "pedals4": -0.0,05,646, "pedals5": -0.0,05,646, "pedals6": -0.0,05,646, "pedals7" : -0.0, 05,646, "pedals8": -0.0,05,646, "stick_elevator": 0.1,40,2 9 4, "stick_ailerons": 0.0,00,214, "vario": 15.9, 53 , 083, "altitude_hour": 74.11, 24, 939, "altitude_min": 74.11, 24, 9 9, "bank": 0.0, 36, 605, "turn": -0.0,00, 850, "Compass": 46.54542 2, "clock_hour": 9.44 million, "clock_min": 27.0 million, "clock_sec": 30.0 million, "manifold_pressure": 1 .3,30,175, "rpm_min": 674.0 million, "rpm_hour": 2,674.21 99 71, "oil_pressure": 88.618,057, "oil_temperature": 88.6,18 , 057, "water temperature": 96.471817, "mix": 1.000000, "fuel_prepress": 8.834542, "gear": 0.500000, "gears_lamp": 1.000000, "flaps": 0.500000, "tr Mir ": 0.170344," Throttle ": 0.883454," Weapon 1 ": 0.000000," weapon2 ": 0.000000," prop_pitch ": 0.9, 70864," supercharger ": 0.000000," radiator ": .9, 74 , 724}  


    java - How to get the response time of a json web service request? -


    I request a post for a web service below and I need to answer every web service.

    Your help has been greatly appreciated. To get time in nanoseconds, wrap around your request:

    long startTime = System.nanoTime (); // ... code is being measured ... long response time = system NanoTime () - startTime;

    Remember that it will capture any processing time, so the actual network response will be over time. But it would be useful to compare between different requests.


    Batch-Run FOR loop through cases. -


    I have the case which sets the variable, this case is chosen based on user input. When the case is executed, the variable is sent to the one: RUN label, where they are pushed through some code.

    What do I want to do: When a user enters "ALL" for input, each goes to the loop which runs through each case: RUN label. I'm not sure whether you can design four loops to go in all cases. I'm totally open to suggestions.

    Thanks

     SET / P Process = "Choose a process to run:" 

    2> Call the NUL: Jump to% PROCESS% #: CASES If the error 3 calls: all # if the label does not exist, ECHO has gone exit / b: PROCESS1 set runProcess1A = yes runProcess1A = yes runProcess1B = not set runProcess1C = set yes Goto run: PROCESS2 Run runProcess2A = Yes set runProcess2B = yes set runProcess2C = Yes Goto Run: run PROCESS3 set runProcess3A = Yes runProcess3B = not set runProcess3C = Not set Goto set: All RAM codes need to run through all cases (process 2 PROCESS2 and PROCESS3). : RAN rim if process 1a == yes, ETC

    postprice itemprop = "text"> Do something.

    This is what you want to do

      Rem believe that a number between input 1 and 3, or the word will be fully prepared / p process = "a process to run Select: ". SET P1 = Yes No Yes SET P2 = Yes Yes Yes SET P3 = Yes No If not, "% Process%" == "All" (%% for Z IN (1 2 3) / F "TOKENS = 1-3 "%% (! P% Process%!) In %% (set runProcess% Z% A = %% run of groupProcess% Z% B = %% b set runProcess% Z% C = %% C) and ( (%!% P% Process%!) For% / F in 'TOKENS = 1-3'% (set runProcess% Process% A% = %% Run of Process% Process% B = %% B RunProcess% Process% C =%% C)): Run ...