Posts

Showing posts from March, 2012

How do I update the password for a Cognos Data Source? -

The DB password has expired and needs to be updated, how do I update the password for the Kogos data source? Can i Under the Clicking on the source name will bring you connection to that data source (the connection may have a similar name to the data source). By clicking on that you can be taken to signon (which can be the same name as well, it has a user icon db with it). Select the properties of signon, select the sinon tab on the property page, there is an entry on "Edit Signin" on that page.

python - How to return an alternate column element from the intersect command? -

I am currently using the following code to get the intersection date column of two sets of financial data. Intersect the difference in the interval of the mortgage gap (seq1, seq2): res = [] # in the seq1 for start xq: # in the date, the date, o, h, l, cl # Scan Seq1 if x in seq2: # normal item? Res.append (x) Returns x = intersect (seta [, 0], setb [, 0]) # Mixed type print x The problem is that only the column for which it Both, i.e., found the intersection of the date column. I want to return it to a different column ARAC, in any way, including the CLS values ​​of each set ... i.e. if the date is both the same then 2X1 array will return to two similar SLS columns. any idea? Thank you. How is it: def intersect (seq1, seq2) : If CEC 1 [0] == CEC 2 [0]: # Return of the date column return (Ceik 1 [4], Seek 2 [4]) # Return with 2-Tulle CLS value

Extending spring's default component factory -

It is a small one: I want to try to change the spring which transforms my beans (this case Instead, instead of instantiating it by creating a proxy) I can not use the JDK dynamic proxy nor the cglib to build the proxy (if this was the case, I could use spring ). In my opinion, the best way to do this is to expand the spring plant of spring (and tell spring to use my factory), but I do not know how to do this on Google. Any thoughts about this? Edit: Actually, the most standard way of doing this is to use a Bean Post Processor (), and wrap that postprocessor. Bean on a proxy If we can not get a better solution around here (and we decide that this is a valuable question), then I will post it as an answer. The way to go is to implement a Bean Post Processor (), and to ensure that beeppost Process wrap the beans on a proxy, on 'Post ProcessbapperInnisation'.

Convert IIS / Tomcat Web Application to a multi-server environment -

I have an existing web application built in the net, running on IIS, which takes advantage of a Java servlet that we Tomcat has to run at 5.5. . We need to scale the application and I am confused about our situation and what we have to do to get servlet running on multi server. Now I have 4 servers which can process each individual process, almost all I think should do that the AGP 13 worker processes are added to the Balanced Worker hosted by three additional machines. . But I can not imagine that it should be easy. What should I do to distribute the tomcat load in additional three machines? Thank you. P> Update: The current configuration is using a workers2.properties configuration file. I am not able to determine the difference between workers and workers from all the documents online. Properties Most examples I have found are configuring workers. Attend properties and workers, and roam to enter the list of workers. List element workers 2. The workers are not included...

Storing large (e.g. image/movie) files in Core Data on the iPhone -

Seeing Apple iPhone Core Data Recipes sample app, they store image files in main data objects, It usually does not seem to be intelligent. Now I also capture the stories on the 3GS. The question is: Is it wise to store images in core data on iPhone, and besides, movies? Additionally, in addition to loading in memory, apparently the design used in dishes (i.e., accumulating the image in a different model) allows "defect" of core data ( Which seems to mean lazy loading), but I'm not sure it's really true. Look here: It seems that normal coco advice is to use different files .... It depends on whether the coreadata is more than capable of accumulating large blobs with good performance. There are large groups: If those blobs are the properties of those entities that can not always be faulty in you, then it is necessary to take caution in order to ensure that whenever you Use what you tell the CD that the qualities are not faulted unless you ask that you ca...

order - jQuery: sliding panels one after the other -

I know that this is a simple one for some of you, please help me! I have 3 panels (divs) which I want to make one slide after clicking on one button. Sliding a panel is easy, but how many divs to slide in order? Thank you. Although I really like it, 'Anonymous Functions' and arguments. The following also works: $ ('# slideDiv'). Click (function (e) {e.preventDefault (); var i = -1; var divList = $ ("slide"); var animation callback = function () {if (++ i Edit: Updated demo page added comment about how to use different animations Gaya.

c++ Input from text file help -

My test file contains data like this: 1 2 3 0 1, 2 3, 4, 0, 4, 3, 2, 0, 0 How do I separate on the basis of data, but I can also separate each section of data from zero. ifstream data ("testData.txt"); String line, A, B; While (gateline (data, line)) {stringstream str (line); Ironingstream in; Ins.str (line); INS & gt; & Gt; One & gt; & Gt; B; Hold.push_back (a); Hold.push_back (b); } How can I separate them from zero? So the lines are important, and the list of zero-delimited numbers is also important? Try doing something like this: std :: ifstream data ("testData.txt"); Std :: vector & lt; Integer & gt; Hold; Std :: string line; Std :: vector & lt; Std :: string & gt; Lines; While (std :: getline (data, line)) {lines.push_back (line); Std :: stringstream str (line); // Read an int and next character until one time (str.good ()) {int val; Four c; String & gt; & Gt; Val & gt; & Gt; C; If (val ==...

Limitations of SQL Server Express -

My hosting provider (Rackspace) is offering a fully managed dedicated server with SQL Server Web Edition () installed . My company handles web development, and there are about 20+ customers using ASP.NET + SQL Server 2005. I'm thinking of cutting costs by setting up a free SQL Server 2008 Express instead. I know about 1 GB RAM and 4GB / database (this is right?) What limits would I like to know: Is there a limit on the number of databases that I have with the Express Edition Can i install Beware of any other limitations? I'm a bit worried about setting up a database backup - with the express edition it can be much more difficult. Any other advice? There are several limitations, especially: bound in the same CPU (in 2012, this limit is near.) 4 GB database size (has been raised) 10 GB SQL 2008 R2 "text-mail" itemprop = "text" And SQL 2012) per database Regarding the number of databases, there is no limitation: 4 GB The size of the ...

php - Accessing $_SERVER['DOCUMENT_ROOT'] value in .htaccess file -

The path I specified in $ _SERVER ['DOCUMENT_ROOT'] should be accessible in the .htaccess file. Is there any way to use it there? I need to point to the file originally kept on the root and require the actual file system path and not the URL path. So instead of using a hard coded value, I want to be able to use a variable. Thanks $ _ server is a PHP variable, whereas .htaccess files are Apache Unfortunately, there is no way to access PHP in Apache's config files. The solution I have seen in many projects is that an installation script has a custom one. Not quite ideal and little work, but this work is completed.

Can I checkout github wikis like a git repository? -

I want to modify and look at the local wiki along with the local editor like MiX, and just like the code in the Google code wiki Can be checked. Is there any way to check gitb wiki? Or does another GIT repository provider provide such a facility? GIT clone https://github.com/user /project.wiki.git or if you use SSH git clone git @ github com: username / project Wiki Git

CouchDB: map-reduce in Erlang -

How can I reduce the work map for Cochinbeal in Erlang? I'm sure Erlang is faster than Javascript. You can use that which is in the top ten on Google for "Couchdb erlang view" The hit and listed on CouchDB

c++ - c ++ String array issue -

I'm just learning C ++ with Java background. Just playing with simple sections now, but for some reason the following compilation will not occur, when the same syntax will make somewhere fine: class carddellar {personal : String suit [4]; String value [13]; Bull Cards Ticken [4] [13]; Int getRand (Int Top); Zero getValidSuit (int * suite); Zero getValidCard (int suite, int * value); Public: CardDelier (); String deal card (); Zero reset (); }; CardDelor :: CardDelier () {suit = {"heart", "club", "spades", "diamond"}; , "Three", "four", "five", "six", "seven", "eight", "nine", "ten", "jack", "queen", " King"}; False, false, false, false, false, false, false, false, false, false, false} {false, false, false, false, false, false, false, false, false, false, false, false, false, false False, false, false, false, false, false, fal...

Sort ruby array by updated_at -

What I want to do is get the latest item from my model and they have sorted an array (first of all Latest items) "updated_at" by attribute. Somewhere there is an error, but I can not find it: @results = Array.new note.field (: all,: border => 3 ,: Order = & gt; "Created DASC"). Do each. Items | @ Ruits & lt; & Lt; Item end picture Find (: All ,: Border => 3 ,: Order = & gt; "Created DASC") Do each. Items | @ Ruits & lt; & Lt; End of item @ result = @ result sort_by {| Results | As a result, .updated_at} You need to compare the sort. ` @results = Array.new note.find (: all ,: limit => 3 ,: order = & gt;" made_at DESC "). Do each. Items | @ Ruits & lt; & Lt; Item end picture Find (: All ,: Border => 3 ,: Order = & gt; "Created DASC") Do each. Items | @ Ruits & lt; & Lt; Item end @ results.sort! {| A, b A.updated_at & lt; = & Gt; B.updated_at} This wil...

Oracle all foreign key references -

I have inherited a schema so that does not have full knowledge / faith in it. I have a project table with Project ID. I is a complete group of other tables that refers to this table via Project ID What I want to do is run to install a query: In the table, there are foreign key references to the project table on Project ID Which tables have a column called Project, ID (in case the foreign key is not set Goes). If this was SQL Server, then I know how to ask metadata, but how do I do it in Oracle? 1) Select the table_name from all_constrains where r_constraint_name = Select your table_name from all_tab_column where [column_name = 'PROJECT_ID'] Your pk / uk barrier on projects] 2) > You want to add an extra bill containing the ovener column. Regards, Rob.

iphone - what is the first step in (NSTimer release and invalidate)? -

Can I send a argument to @selector in NSTimer ? If I want to release NSTimer , then what are the following steps in dealloc [invalid timer]; [Timer release]; [timer release] / P> Because the run loop maintains the timer, since the management of the memory management generally does not need to maintain the reference of the timer, since the timer is passed as an argument When you specify your method in the form of selectors, then you can choose the appropriate repeating timer within that method. If you can. In many situations, you also want the option to invalidate the timer, perhaps even before it starts. In this case, you need to keep the context of the timer so that you can send an invalid message whenever it is appropriate. If you make an undefined timer (see), then you have to maintain a strong context in the context of the timer (in the context enumerated environment, you can retain it) so that it can not be canceled before using it. What does this mean...

xml - Eliminating duplicate same-level elements in XSLT -

I'm looking to display a list of single-level node names, without duplicates. Let me have the & lt; A & gt; & Lt; P & gt; & Lt; C / & gt; & Lt; D / & gt; & Lt; D / & gt; & Lt; / P & gt; & Lt; P & gt; & Lt; E / & gt; & Lt; C / & gt; & Lt; F / & gt; & Lt; / P & gt; & Lt; / A & gt; I want to display C, D, E, F. To get rid of the duplicate siblings from the output, I have found many solutions to the same problem, but I am having trouble in destroying a duplicate "cousin". A possibility: & Lt; Xsl: template match = "/" & gt; & Lt ;! - Select all nodes at a certain level - & gt; & Lt; Xsl: variable name = "lvl" select = "key ('kennodes bell level', 3)" /> & Lt ;! - Step through them ... - & gt; & Lt; Xsl: each selection = "$ lvl" & gt; & Lt; Xsl: Select Sort = "Name ()...

php - entryUUID vs DN -

When you want to refer to an exact ldap entry, do you prefer using the entry UUID or DN? I have a grid. Each item is an LDAP entry. Each line in the grid has a checkbox in which the item has an ID. This entry can be UUID or DN. Which would you use? I would like to use an entityUUd, such as to avoid the circumstances and hook easily selected items, even if the user has changed the CN. In order to use anUUUd, it means repaying and restoring in LDAP backup. Any helpful tips? Thanks User data to support UUID and Steppack your data . Slapcat command export also feature insertion UUIIT.

.net - Programmatically submit a form -

I have seen a ton of sample how to submit a form to the program (in .NET) but none of them I do not even have specific requirements I need. The case I'm working on contains a query string (), some hidden fields and upload file. Did anyone type such a to check a web? If this is the form method, you will need to send all data to the URL. This means that you can just go to and & amp; Field1 = value1 and amp; Field2 = value2 ... etc. (Field 1 is the name of field 2 id or field). This post is likely to post the request method to post you (). However, this does not mention interesting part: What should I write in the request stream? This is (surprisingly) the same, when you apply to the URL when using the GET method: string request string = string.format ("field1 = {0} and Field2 = {1} ", value1, value2); And type this string in the request stream. All this, it should work. (You can do both of them together, for example, you can use the P = update p...

c# - When would I use List<T>.ForEach over a native foreach loop? -

Do the advantages of either approach? If I need to find inventory items and take action on every one, should I use the traditional foreground loop mechanism or go to the list? Matthew Podovsokie @ Codebetter. Has written an interesting article about this. It was thinking of a problem I was trying to solve a loop. In this article, Matthew argues that with clear loop structures you can think of 'how' rather than 'what' What are some good reasons to use one over each other? > For one thing, if you had passed the representative to apply for any reason, you would use it for example, you can make your own list, it can populate etc. And then can apply the representative to each entry. At that point, writing: list. Foreike (action); is more simple than foreach (item items in the list) {action (item); }

inheritance - C++ pure virtual class question -

I am a simple B + tree implementation (very early stage) I'm trying to write. I got some fanksansa with a virtual class is. No need to say is, I am very new to these strategies and I'm running all kinds of problems. I'm trying to create a root node within the classroom bitiarai am. Root node will be a BBranch, which must be obtained from bienoda? I'm getting errors btree.cpp: constructor in the "BT :: :: bitiri (): bitiarasisipipi: 25: error: extract type 'bibiaranca bitiarapipi': 12: note because the following virtual functions "bibiaranca" within the net are: bitiarasipipi: 9: Note: virtual vhoida bienoda :: Dale (anti) bitiarasipipi: member function bitiri :: indesa (Int): bitiai cpp: 44: error: Unrecoverable declared this point Wait here was The code is namespace std use; Class BNode {public: int key [10]; Int pointer [11] ; virtual void Inns (Int number) = 0; virtual void del (Int number) = 0;}; class BBranch: public BNode {pub...

build process - Creating CSS sprites using msbuild? -

Any tooling, or a process concept to generate CSS prints from images of an existing website and the process of build I think the steps will be: Run an image directory Create a single phantom file from all the images in that directory For each image Find any CSS class using that image New pricing Update the CSS class to use the file I am using asp.net so that something in MSBill will be awesome though, I'm getting anything from there, here Till that is coming closer. You can use it to code which BSD is licensed. (See download link on the right hand.)

python - appengine: cached reference property? -

I How can cache a reference property in Google App Engine For example, suppose that I have the following model: class number (db.Model): a = db.ReferenceProperty (a) class a few (db.Model): year = db.IntegerProperty () Then I have many many that only make a point for something : one_few = Few.get_or_insert (year = 2009) Many.get_or_insert (a = one_few) Many.get_or_insert (a = one_few) Many.get_or_insert (a = one_few) Many.get_or_insert (a = one_few) Many.get_or_insert (a = one_few) M any.get_or_insert (a = One_few) Now, if I all wants very frequent in do, then your some value By reading, I will do this: Many for many () Fetch (1000): Print "% s" is% many.few.year The question is: Is many.few If so, is it possible to cache something, because every single unit should be enough for the same lookup every time? As noted in a comment: I know about Memkac, but I'm not sure when I will call the second unit through a reference , Then I can ...

c# - DateTime TypeConverter -

I have the code below to convert the string to type T. It works fine for all other types but gives an error T typetime type. TypeConverter c = TypeDescriptor.GetConverter (typef (t)); Return (t) c.ConvertTo (obj, typeof (T)) I pass like a string obj = "09/09/2009 " This throws error." {DateTimeConverter} is unable to convert 'System.String' to 'System.DateTime'. "} If you know that you are getting a string, you can use TypeConverter.ConvertFromString instead Are there. It works with DateTimeConverter , although I do not know why ConvertTo is not. For example, this works: TypeConverter c = TypeDescriptor.GetConverter (typefime); Console.lightline ((date time) c.ConvertFromString ("09/09/2009")); Alternatively, just works as ConvertFrom : TypeConverter c = TypeDescriptor.GetConverter (typef (Datetime)); Console.lightline ((datetime) c.ConvertFrom ("09/09/2009")); It is going to change from t...

.net - MSBuild Error: The attribute "Remove" in element <ProjectReference> is unrecognized -

I am trying to set up a .csproj file to place a conditional item group that has all the elements in the & lt Will remove; ProjectReference & gt; Item group For example: & lt; Item group & gt; & Lt; Include in the context of the project = ".. .. .. .. .. .. .. .. Projects Registrar \ UCSB.System Registered. Common \ UCSB.See Registrar.Common \ UCSB.See Registrar. Common CPRjas "& gt; & Lt; Project & gt; {1EDDDE57-0181-41B4-B2AE-FB76450F85C8} & lt; / Project & gt; & Lt; Name & gt; UCSb.Sa.Registrar.Common & lt; / Name & gt; & Lt; / ProjectReference & gt; & Lt; / ItemGroup & gt; & Lt; Item Group Status = "$ (On-Build Server) == 'True'" & gt; & Lt; Remove Project Reference = "*" /> & Lt; / ItemGroup & gt; & Lt; Item Group Status = "$ (On-Build Server) == 'True'" & gt; & Lt; Include in context = "UCSb.Sa.Registrar.Co...

css: issue with width and padding of an input in IE -

I have a problem with the width on the input [text] field in IE, all versions. I have a divisor in which clearly set width is 250px. In this device, I have an input text field, which is set to 100% width. This input also has 10px internal left-padding. In IE, it underlines the width as 100% + 10px. I can not detect a technique to disrupt the width of the container. This problem was initially encountered in all browsers, but fixing in FF, Safari and Chrome was very easy by adding maximum width: 100% IE 6/7 does not support it, while IE8 does But it also adds padding in width. I think that the IE box's box also includes the boundary and margin in its calculation of width, so let's assume that I still can not find any way around it. I'm just trying to find a better solution than setting my input width to padding in 240 pixels, because there are many inputs in this form, there is a difference in the container size and I can find a universal solution Want to Here...

project management - Understanding the role of the species known as "PM" -

As a professional programmer I work daily with a species named "PM". Although they usually go from that normal amount, it seems that there are actually many discrete types: product manager, project manager, and program manager. Other species have not yet been overlooked. During the observation and study years, the subtlety of their discrimination started wooing me. I am only able to set my general responsibility: To me, to communicate in the most possible words to the programmer, what do they think that they want to create them, I say to them, probably in the most possible words, when I think That it will be distributed, and they will go away. So my question is that the question of Jarzrot for the Stackworflow crowd: Please see Product Manager, Project Manager, and Program Manager. Please do this by waving your hands, because I can not see them, and it does not help anyway. I try to explain them because I have worked with them. Please understand that the definition...

(Ruby) Converting string values into assignable properties for OpenStructs...? -

I have found a bit of a strange situation. If I was using a hash, then this problem would be easy, however, I am trying to use "openstrat" ​​in Ruby because it offers some good ways. Actually, I think I have a return value "" I have a regular expression: textopts = OpenStruct.new () textopts.recipients = [] Fileparts = fhandle.read.split (" >> FileReport [0] .chomp.each {| L If L = ~ / Reciprint.ACI / I textopets.prashant & lt; & Lt; $ & Amp; Elsif L = ~ / (Server Adress Email Email Address. ***) / i Textopets $ & Amp; = $ And .split (":") [1] end} me $ & amp; In a valid asset for filling "textopts" I have tried "stability" and some other people but nothing works but I think this is possible, but maybe I'm wrong, obviously, if I was using a hash then I just "textopts [ $ & Amp;;] = ..... ". Any thoughts? Keeping the structure of your solution, there is a way to do this:...

Can a java applet manipulate the HTML page containing it? -

I wanted to know if I could write something from the applet on the HTML page with my Java applet. More commonly, what is possible between the two? Thank you. from inside your Java applet // object applet Javascript methods are protected static JSObject appletWindowJSObject = null; AppletWindowJSObject = JSObject.getWindow (this); // Call your Javascript method on page and exit it from the applet. Windways S Object ("My javascript method", "this is what i am"); You can use javascript to roughly html page the page. Html>

xml - C#: XmlTextWriter.WriteElementString fails on empty strings? -

I am using XmlTextWriter and its WriteElementString method, For example: XmlTextWriter author = new XmlTextWriter ("filename.xml", tap); Author.WriteStartElement ("user"); Author. Write element string ("username", InputUser name); Author. Write element string ("email", input email); Writer.WriteEndElement (); Writer.Close (); Expected XML output is: & lt; Users & gt; & Lt; Username & gt; Price & lt; / User Name & gt; & Lt; Email & gt; Price & lt; / Email & gt; & Lt; / User & gt; However, if for example an inputEmail is empty, the result XML I get is as follows: While I expect this to happen: What am I doing wrong? XmlTextWriter ? What is the method to get my expected results in a simple way Your output is correct with an element . You can force Write to WriteFullEndElement () and use the full tag writer.WriteStartElement ("email"); Author.Writ...

transactions - MS Access: Avoiding "Lost Updates" -

We inherited a large access db that has some very weird (and upset) behavior: missing some database updates done. What can we do to avoid it? Is there any setting in access to provide better transaction control? Here are some more details: We have an access user who has write access (number of very limited users - currently only let me leave as second Are on) We have another access user, which is used by many people, whose access is read only. The user who writes the data After leaving the table and / or even applying and re-entering, the changes have become "committed". After some time (usually overnight) changes are lost What could be the reason for this behavior? Our principle is that it is due to some strange behavioral controls within access. The read-only user receives a "unique lock" type of query that is used in a query or form after the user leaves that query / form, ensuring that it is still in the database, in the meantime If the use...

java - change a config.properties file in a jar / war file in runtime and hotdeploy the changes? -

Change a config.properties file in a jar / war file in the runtime and heat the changes? My requirement is as follows, we have "config.properties" in a jar / war file, I have to open the file through a webpage and the user has made the necessary changes for it, I have to update the "config" property "More in the jar / war file it deployed. Can we achieve this achievement? If you can do so, please tell me about the relevant sites / documents so that I I would strongly recommend your architects to reconsider this solution. It also describes that it should be done through JNDI or a similar technique, not through reloading the properties. The deployment should be considered stable - that any web container copy of magic Should not be allowed, and for a few days (in most uncomfortable times) Likely to happen).

c# - How to refresh AzMan access check cache? -

I have created a web application that uses Microsoft Host, and as long as you do not have multiple users works fine. I'm almost 100% sure that Ajman is caching the same thing for many users. To make it a little easier, the problem I am seeing is that the user goes to A site and there is full access to the user, right access is provided and can work just fine. Then user b goes to the site, there is only access access, but because Azman has already seen full access to User A, it also fully accesses User B. I'm creating the client reference when using the AddStringSids method because it is the only way that will work for every situation. Is there a problem in it? We did not keep this problem when we were making client references from a token. I am using the exact code to create the following reference. The application has an IAzApplication2 variable, and ClientContext.SID is a securityIdentifier for the user in question IAzClientContext2 cctx = app.InitializeClientCon...

visual studio 2008 - inserting own image on excel through c# -

Hello I have the following code ... where I generate and paste my own image to Excel worksheet Can you tell me why its background color is always blue? Is it possible to change it somehow to make it transparent or white? (I tried the flag. MaccronPier (), but it also does not work) bitmap flag = new bitmap (200,200); (Graphics G = Graphics. Frame Image) {g.DrawString ("N", New Font ("Wordana", 80, Font Style), New Solidbrush (Color Black), New Point (40, 30)) ; } System.Windows.Forms.Clipboard.SetDataObject (flag, true); Ws.Paste (category, type messing); When I use the following flag.Save ("C: \\ image.png", System.Drawing.Imaging.ImageFormat. Png); The text "itemprop =" text "> I know this is the answer to an old post, but if someone else found it on Google (like I did): BMP does not have background information, so it needs to be changed: memorystream MS = new memorystream (); Bmp.Save (ms, ImageFormat.Png); IDataOb...

sql server 2005 - Verifying Full database backups "WITH CHECKSUM" -

We have a daily maintenance plan in SQL Server 2005 that is full on disk using "back up database task" Backups. "Confirm Backup Integrity" is enabled, but the data aggregation which is understandable is valid only if there is a checksum in the backup media, which was enabled by the "without checksum" option during backup is. From the generated T-SQL, I can see that the maintenance plan is not working like this, apart from hacking code commands manually, how do we specify in this work (if it is actually possible)? After further investigation it appears that the data concentration through drag-drop attributes is called " It is not possible to configure work to verify "with checksum" alone, this command should be added to the T-SQL function of SQL Server Management Studio

c# - How do I pass command-line arguments to a WinForms application? -

मेरे पास दो अलग-अलग WinForms अनुप्रयोग हैं, एपीए & amp; AppB। दोनों .net 2.0 चल रहे हैं। ऐपए में मैं ऐपबी खोलना चाहता हूं, लेकिन मुझे इसके लिए कमांड लाइन आर्गुमेंट्स पास करना होगा। मैं कमांड लाइन में दिए गए तर्कों का कसा उपयोग करता हूं? यह मेरा वर्तमान मुख्य तरीका है AppB में है, लेकिन मुझे नहीं लगता कि आप इसे बदल सकते हैं? स्थिर शून्य मुख्य () {} स्थिर शून्य मुख्य (स्ट्रिंग [ ] Args) {// इस उदाहरण के लिए, हम सिर्फ कंसोल के लिए तर्कों को छपाई कर रहे हैं। के लिए (इंट आई = 0; आई & lt; args.Length; i ++) {कंसोल.प्रकाशलाइन ("आर्ग्स [{0}] == {1}", आई, आर्ग्स [आई]); }} तर्क तब args स्ट्रिंग सरणी में संग्रहीत किया जाएगा: $ AppB.exe firstArg secondArg तीसरा एआरजी आर्ग्स [0] == पहला एआरजी एजीआर [1] == सेकंडएआरजी एजीआर [2] == तीसरा एआरजी

ruby - Why are all Rails helpers available to all views, all the time? Is there a way to disable this? -

Why do I use helpful methods for controlling the views of different controllers? Is there a way to disable it without hacking / patching rail? @ George Sarebar's law does not work as Rail 3.1; There has been a lot of change in the code. However, now it is a better way of disabling this feature in 3.1 railway (and hopefully later). In your config / application.rb, add this line: config.action_controller.include_all_helpers = false This will be. (For those who are interested).

How to implement a kill switch in a native windows program -

We are having problems with potentially hanging programs in some programs, finding and deleting their own programs there One way to do this is to call window calls without using the task manager. This would not possibly mean the involvement of yourself in this program, but no one will see it as a bundle object. What is the best way to go about doing this, I need to dig deeper to stop my program and how should I be shallow to ensure that I do not crash OS Do you? You can create a .bat file and an order Can be inserted. The command will look something like this: taskkill / f / im notepad.exe

php - Oracle Equivalent of MySQL's TEXT type -

What is the column type of MySQL TEXT type in Oracle? If not, how big blocks of text are usually stored? BLOB , varchar (32767) ? If this matters, the Oracle 10 is being accessed by PHP, the historical context is welcome. Blob, colob and NCLBB for binary, character and unicode storage in Oracle is character data type you LOB The storage area can also be specified which allows DBA to recover the storage when necessary (i.e. to put LOB data on separate discs) This page provides a bit more information:

iphone - how to solve this intersting UITextView problem -

Friend, I have a problem in moving the cursor to the first place I have an application Keep adding notes. When the user clicks the "Edit" button, I am launching another screen and want to take notes to the existing text below the text, whereas the cursor is in the first place. This behavior is similar to the email reply screen. Here the email body is connected to the answer screen, while the cursor has started (0, 0) the location of the textView. Can anyone help? How to do this [TextField Be the First Responder]; textField.selectedRange = nsmkrange (0,0); Does this work?

caching - CakePHP cache control for asset files (images, CSS, etc) -

What is the best way to use CakePHP to eliminate headers for image and CSS files? My host does not support mod_expires or mod_headers , so I use these values ​​as a .htaccess file Can not set in There is no cache control for my files right now and many unnecessary requests have been made. What is the best way of pipe requests for asset files through the cake and set the appropriate headers through header () I like the best, not necessarily in cake-specific way, it is made in a code in / webroot Which adds the header, then use the .htaccess instructions for the pipe requests for ./css/ * and . / Img / * Through that file, I was just hoping that some kind of functionality created in cake can already be done :)

css - IE6 Auto margin works? How is this possible? -

I'm just doing a little CSS, and I have this code: #page {width: 950px; Margin: 0 px auto; } I have the ID = "page" I opened my page in IE6, and it just worked. When do auto margins work in IE 6? Can anyone explain to me why does this work? Thanks My performance is BTW: IE 6 does help happens via margin: auto , unless it is in standard standard mode, there is no joke mode. IE6 was the first IE version to support it.

events - Change properties of an unknown object in VB.NET -

I have a sub that handles when the index of 14 combobox changes I am able to insert the sender of the event and there I'm gaining properties from After that, however, I want to be able to change the assets of the real sender instead of the cast. How do I do this? Current code: Private sub combo box index change (as the system. Sender, system, e-mail and system.avantarg) combo box 1 Handles Selected indices, combo box 2. Selected Indexes [etc.] Combo box = Demand for slowcombbox as sender myComboBox.Text Episode "Will" Me Controls (myComboBox.Name). Text = "555-555-555" episode "Bob" Me Control (myComboBox.Name). As you can see, I am currently trying to use me. Control (myComboBox.Name). Text But I get an error: the object reference is not set to an instance of an object. What can I do? The sender parameter (typically) event raised in an event handler In the case of the combo box control in the case of the reference of the o...

jquery - How to modify tabbed interface? -

I have read a tutorial describing making simple tabs: but I want to modify it, and not get the desired result , And that result can be seen on a template: (just click on 'Live Preview') So, I want a content: 1. SlideUp () and FadeOut () together 2. Slidedown () and Faden () together I found an interesting article about a topic: But then, as I said, I do not know how to do it. I now use code: (function ($) {$ .fn.slideFadeToggle = function (speed, easy, callback) {return this.animate ({opacity} : 'Toggle', height: 'toggle',}, speed, ease, callback);}} () (jQuery) $ (function () {$ ('tab-content'). Hide (); $ ('ul .tabs li: first '). AddClass (' active '); $ (' Tab-content: first ') Show (); $ (' ul.tbs lea '). Click (function () {$ ( "Ul.tabs li"). RemoveClass ("active"); $ (this) .Parent (); AddClass ('active'); $ ('tab-content'); Hide;); Var href = $ (This) .attr ('href...

jQuery Selector Question -

I'm actually doing an Ardiion / Sliding menu here, I want to open brother Ule (or displayed) ). Can I simplify it further? $ (this). Parent ("li") Siblings ("li: is (ul)"). Children ("UL") SlideUp ("Sharp"); I have also found that I can not leave children () and do something $ (this). Parent ("li") Brother Sister ("Lee: is (ul) ul"). SlideUp ("Sharp"); "Brother-sister" ("Lee: is (ul)"). Children ("ul")? In the first case, you are selecting list elements which are siblings, unless those list elements are listed as children, you In the second case, you are looking for the brothers and sisters who are listed in the list which are children of the list elements (instant or nested). The problem is that you have a list element brother Looking in the ship The old list is not siblings (only list element siblings). The main thing is that the selector of the siblings method i...

Validation not working on plain objects in ASP.NET MVC -

When I post a controller to the 'model' object (as is generated by LinqToSQL), then I 'ModelState IsValid ', and if any property has validation properties and the value is not valid, then it will be set to' false '. However, ModelState.IsValid is always coming back to 'true' if I am posting a custom object of my own class, even if the properties of that class have validation properties and they are incorrect values has given. Why does this only work with data contact model objects? What about these items that they work with modelstate? Isleveld, while not the normal class? How can I work with normal classes? Controller code: modal code: using the system; Using System.Collections.Generic; Using System.Linq; Using System.Web; Using System.ComponentModel.DataAnnotations; Using MyProject.Website.Validators; Using System.ComponentModel; Public Class Login {Private Login Modes Log Inmode {Receive; Set; } [Required] [email address] Receive pu...

apache - add a server alias to the domain's VHOST? -

I have a VPS that I have hosted a Domain IPO in the sub folder of the www folder. Domain works fine up to home page The moment I am going to other pages, it shows my server [Origin name] / [subdirectory name] I think I need to add a server nickname for VHOST of the domain Can anyone tell me how to do this ?? Are you using Apache? & lt; VirtualHost *: 80 & gt; Try with DocumentRoot "/ path / to / document / root" ServerName1ServerAllase name2 ...

ASP.NET MVC vs. Webforms: Replacing WebForms Controls -

I have read many more posts here, so I get views on Pro vs. Opposition, especially with full control over them ( MVC). My question is in relation to UI controls: In MVC, I have to write all my UI controls (or HTML equivalent). Now it will not be difficult? Due to these third-party vendors due to the fact that it is difficult to write UI control for ASP.NET itself, and is capable of targeting all web browsers, and also that we are able to control UI controls It's better to focus your time on business logic rather than spending a lot of time writing HTML code. I understand that this feature gives us complete control over the final HTML, but it is not counter-productive to do it yourself if it was so easy to write to myself, then this 3- How are all vendors of RD Party now living? We could do all this with webform days of all these years. I'm sure I'm missing something here or a little stupid, but please tell me about what I'm missing in a specific relationship. ...

Generating PDFs in Java using iText. Support for Free flowing text -

We have the following nature's PDF templates that need to be generated by web applications: Sample Paragraph: Dear {customer.name}, Your attorney, {customer.lawyer.name}, has contacted us about your account, {customer.account.number } Requesting an immediate closure of the account. ... The {...} fields given above are for adjusting the various Actor areas which will be placed as placeholders, so that they are populated with data . But the problem is that the field {customer.lawyer.name} can be of different lengths, ranging from 10 to 50 characters, using iText, how can we Are you generating a PDF for the above mentioned template so that the different lengths of the variable can be adjusted? Maybe wrap the text appropriately anywhere? I used iText columns for layout letters. Here's an example from my work, note that I just typed it in the stack overflow, I have not compiled or tested it. Imagine a file where two new lines in the row point to the paragrap...

javascript - How can I implement a confirmation dialog for critical action? -

I'm not proficient in JS myself, so maybe I will take a few hours to find out, so I thought I will ask people to you I have removed / removed links on my site, which are used by the administrator to moderate users and what they post. Since these links have such strong results on the content of the site, I would like to confirm some kind of link, which is a popup on a click of the link. Some additional text should be understood what is going to happen, and the OK / Cancel button then I have a link, for example: & lt; A href = "ban.php? Id = 123" class = "confirm_ban" & gt; Ban John & lt; / A & gt; & Lt; A href = "delete.php? Id = 123" class = "confirm_delete" & gt; Delete post & lt; / A & gt; When this link is clicked, the code should be triggered. If OK is pressed, then ban.php? Id = 123, if the cancellation is pressed, it does not go anywhere A simple JS dialog box will do this. Or if you hav...

php - Login / Logout on an iPhone app -

I want to know about managing user logins and logout on iPhone country apps. For example, every time my app is running, the user must be logged in. What is the "standard" process for the information given in the app and the list of users visiting the website php + mysql? Is there a library to control user login at the remote site? Which solution did you use? Cookies? Php sessions? Any help or links to useful websites will be greatly appreciated. Personally, I get the user to enter my login information once, it is preferred File, then use that saved information when the server has requested to authenticate the user - if your NSURL is using the connection then you can use something like this: - (zero) connection: (NSURLConnection *) connection was receivation Unauti: (NSURLAuthenticationChallenge *) challenge {if ([last daunting challenge] == 0) {NSURLCredential * newCredential; New credentials = [NSURLCredential credentialWithUser: [UserManager getUsername] Pas...

C++ Constructor call -

I have written this small code snippet in C ++, the output is also attached, I can not understand that the constructor Why is it being called only once, while I can prepare two calls for the district. From what I think, the default constructor and overloaded assignment operator should be called on Line 28. Can someone put some light on it: 1 #include & lt; Iostream & gt; 2 namespace css; 3 4 squares ABC (5 four C; 6 public: 7 ABC (8) COAT & lt; "default" & lt; endl; 9} 10 ABC (four c) {11-> C = C; 12 cout Output to G ++ version 4.0.1: ~ / src $ g ++ test.cpp ~ / src $ ./a.out b 0x bffff0ee destructors B 0xbffff0ef defeating The code you call the copy constructor, this definition is: ABC (Const ABC & e): C (AC) {Sioatti & lt; & lt; "copy" & lt; & lt; hex & lt; & lt; & Amp; a & lt; & lt; endl;} and you see output like this: b copying 0x7fffebc0e02f 0x7fffebc0e02e Killer B 0x7fffe...

How is OnSuccess measured for a ASP.NET MVC ActionLink? -

I do not understand how ASPNET functional links work I see that they have onsoot and on file There is an event handler, but I can not find anything that tells how success and failure are determined. I am creating an ASP.NET MVC application and it has an Ajax.ActionLink within that allows me to "vote" on items using AJAX ... corresponding to Digg Like the Actionlink kicks off my controller and method ... everything is working fine here. In my controller I argue that it checks to see if this user has voted first. I want to use "onsoot" and "onfiller" in different ways. If the user has never voted (this is an on-going scenario) and if the user has been voted before running my javascript function, then I want to run it in my Javascript function "PlusOnbuT". " Can anyone explain how failure and auspiciousness are measured? Can anyone explain how I can make this argument ... where I am at a branch Can I run a JavaScript function (in my...

Getting the name & extension of an uploaded file using python (google app engine) -

After I am using a form to upload Google App Engine files and store them in databases. L also want to store the extension for the original file name and presentation purposes. Is there a way of retrieving this data from Post Sever or is it just gathering the client's side and (can be sent as separate fields? For example ) Many thanks Follow the solutions that are dased on the answer below: this_file = Self.request.params ["file_upload_form_field_name"] filename (this_file_name, this_file_extension) = os.path.splitext (this_file) self.response.out.write ("file name:" + this_file_name + "" ; ") Self.response.out.write (" File Extension: "+ + this_file_extension +" ") work snippet self.request.params? [& Lt; File & gt; form element name;] File name

Java covariance -

I am trying to find out. Say I have the following code: class animal {} class mammal animal {} spreads in class giraffe spreads mammals {} ... public static list & lt;? Mammal & gt; Extends Millmills () {Return ...; } ... public static zero chief (string [] args) {list & lt; Mammal & gt; Mammals = matching mammals (); // compilation error} Why is the result of the assignment in a compilation error? The error is something like this: type does not match: can not be changed from the list & lt; Capture # 4-Why? Mammal & gt; For the expanded list & lt; Mammal & gt; According to my understanding of the sect, getMammals () method gives a list which is always mammals Objects should be assigned to me, what am I missing? Because getMammals can return a list & lt; Giraffe & gt; , and if that list & lt; Mammal & gt; , you can add it to zebra adding zebra to a list of giraffe can not be allowed Is that what you can...

sql - LIMIT on a condition in MySql -

I am trying to get information from the table in this form: table_1 JBID (PK) project dis 1 1 2 2 3 3 4 5 5 . . . . . What I am trying to find is a query that will give me 5 lines according to the project. (A limit on the WHERE statement, but not the entire selection) If I use LIMIT, I get 5 results in total. You can create SQL in a dynamic form by using the following query: SELECT GROUP_CONCAT (Separate CONCAT ('Select work, projected, descends from jobs where projected =', projected, 'job limit 5 as per order') '' SEPARATOR 'union') ; Save the result in one variable, and then execute the saved SQL.

reflection - Function pointers in C# -

I think that in some ways (or both) delegate or MethodInfo Qualify for this title However, neither provide syntax eligibility which I see. So, in short, is there any way that I can write the following: function pointer foo = // Whatever, create fuses indicator using the fuses indicator; I can not use a concrete representative (i.e., using the delegate to declare a representative type) because anyone knows the exact till runtime There is no way for the parameter list reference, here I am currently in LINQPad, where B would be (mostly) user-generated code, and such would be the main And so precisely my user, I have to remove I am trying. Call : void main () {a foo = new B (); Foo ["SomeFuntion"] call (). } // defined other methods and classes here interface iFunction {zero call (); Zero call (parameter object [] parameter); } Category A {Private class function: IFunction {Private MethodInfo _mi; Private A _this; Public function (A @ this, legalInfo) {_mi...

vba - Excel VBE inconsistent exports -

I save the file as .bas from .xls I am exporting them to check in an SVN repo. I am facing the following problem which actually causes the change in the cover of variable names in real (or not least relevant) files. Such statements get reproduced / holiday: changes to rngTenors.Cells (i, 1) rngTenors.cells (i, 1) (subtle but still different and it is picked up by different tools used by me and in the noise to hide the actual change on this file which generates it) Any ideas of ways to stop it will be appreciated. I am doing something similar but I have not seen what you are experiencing. I am not using the same export routine, but they look the same at first glance. Some questions 1) Do you have the option clear , and do you have a variable name anywhere in the cell ? 2) If you are committed, make some changes, export the .bas file and submit again, what does the difference look? 3) Do you open and separate .bas files in a code familiar editor (eg: u...

com - Hooking thread exit -

Is there a way to hook the exit of managed threads (i.e. run some code on any thread,?) I have developed the mechanism to extract the thread which works for the some thread Step 1: Develop a 'hook' STA com class which takes a callback function And it says in its destructor Step 2: Make a thread-static example of this object on the thread I want to hook, and convert the object to a unmanaged function pointer to a managed representative. The delegation then becomes a call on the exit of the thread (Since the CLR call IUnknown :: Release all STA Com RCW as part of the thread exhaust). This mechanism works, for example the code using the thread class. However, this does not seem to work for the main thread of the application (this is a console or window app) The 'hook' com object seems to have been removed very late in the shutdown process and the attempt to call the representative fails. (I want to implement this feature so I can run some native com code, wor...

c++ - Avoiding memory leaks while mutating c-strings -

For educational purposes, I am using seestring in some testing programs. I would like to shorten strings with a placeholder like "...". That is, "very long string" will be "enough one." If my maximum length is set to 13. Also, I do not want to delete the original string - so a small string should be copied. This (static) method is below which I came up with. My question is that Should the memory allocated class for my short string be also responsible for freeing it? Now what I do is to store the returned string in a different "user class" and to free the memory that user class. const char * TextHelper :: shortenWithPlaceholder (const char * text, size_t newSize) {char * short = new char [newSize + 1]; If (new size & lt; = 3) {strncpy_s (small, new size + 1, ".", New size); } Other {strncpy_s (small, new size + 1, text, new size -3); Strncat_s (small, new size + 1, "...", 3); } Returned; } The standar...

.net - Convert C# Library To MSTest Project -

I have some classroom libraries with NUnit tests, and I'm VS 2008 I want to change the project to use the MsTest integration. (Right click add exam etc.). Is there an easy way to change it or I need to edit csproj manually. Add the property group to the csproj file & gt; ProjectTypeGuids & gt; {3AC096D0-A1C2-E12C-1390-A8335801FDAB} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} & lt; / ProjectTypeGuids & gt;

php - Splitting a string up into parts -

I have a list of questions in the table, some of which are only for display if some criteria are found. Criteria in one record can be as simple as 4002 = Y, where 4002 is a question number and Y is the answer. If 4002 = yes the question is to be displayed. I have no problem with the only one criteria for the record. But there are such records which are the following criteria: 402 = y or 7003 = y or 905 = y or 7007 = y or 7008 = y or 7010 = or Or 7011 = y or 7013 = y In this case, I will need to evaluate each option to see whether the question should be displayed or not. Other questions will have the same string; Some small, some tall How would I break the best string so that I can evaluate each section at a time and still be able to compare them correctly? I do some extent data, but I do not want that if possible. Is this a regex () task (I'm not yet familiar with it)? I have tried list () , split () and explosion () with less success. Any indication ...

jquery - Multiple same PartialsViews and Json -

The answer may already be, but I am unable to find the correct search string .. .. I have similar observations in almost the same page, as are several examples of the same partial view. Partial view contains a button when pressed shows partial visualization of the product. If I return a full post and all the comments are being updated, then I can do this easily but it is an ugly solution. What I wanted was the button pressed I need Jason call on the server. I then save the comment and pass a new partial view back with a list of new comments. Then I only want to update the comments on that particular product that I had added to the comment. I use this in JavaScript to assign this button; $ (".clsTest"). Unbind ("click") Click (function (evt) { but it only adds it to the first instance of the button, which is getting to everyone. I think that I have some important elements here. I am asking this question correctly. I have no I'm not ev...

iphone - load image in web view from a .html file -

मैं .html फ़ाइल से iphone वेबदृश्य में एक छवि कैसे लोड कर सकता हूं? आसान NSString * bundlePath = [[NSBundle मुख्य बंडल] बंडलपाथ]; एनएसड्राएल * बंडलबरेस-यूआरएल = [एनएसयूआर फ़ाइल URL विथपाथ: बंडलपाथ]; एनएसएलॉग (@ "वेबव्यू% @", बंडलपाथ); NSString * filePath = [[NSBundle मुख्य बंडल] pathForResource: @ "सूचकांक" टाइप की: @ "एचटीएमएल"]; एनएसडीटा * एचटीएमएलएडेटा = [एनएसडीटा डेटाविथ कंटेंटऑफ़फाइलः फाइलपाथ]; NSString * html = [NSString stringWithContentsOfFile: फ़ाइलपाठ एन्कोडिंग: NSStringEncodingConversionAllowLossy त्रुटि: शून्य]; यदि (htmlData) {[webView लोडडेटा: html डेटा MIMEType: @ "text / html" textEncodingName: @ "UTF-8" baseURL: bundleBaseURL]; } अब अपने html में आप बस छवि को के रूप में संदर्भित कर सकते हैं।

XPath query for empty namespace xmlns="" -

What XPath do I use to query the information node in the XML below? I have tried various expressions in XMLSpy but nothing works. & lt; Root xmlns = "tempuri.org" xmlns: p = "http://nonamespace.org/std/Name/2006-10-18/" xmlns: xsi = "http: //www.w3.org/2001/XMLSchema -instance "& gt; & Lt; Item xmlns = "" & gt; & Lt; Info & gt; Blah blah & lt; / Info & gt; & Lt; Date & gt; 2009-07-27 00: 00: 00 & lt; / Date & gt; & Lt; / Item & gt; You can do this & lt; Xsl: stylesheet version = "1.0" xmlns: xsl = "http://www.w3.org/1999/XSL/Transform" xmlns: a = "tempuri.org" & gt; & Lt; Xsl: template match = "/" & gt; & Lt; Xsl: Select the value = "a: root / item / info" /> & Lt; / XSL: Templates & gt;

vb.net - WPF - Animating gridlength in XAML -

I was just wondering whether it is possible to animate the grid height using pure XAML? I looked at this tutorial: But it seems that there is a need to write a custom function. Is it possible to do this only by XAM? The box is not possible because there is no such class as a grid-length animation (double animation Compare with) If such a class is in existence (you, Microsoft or third party) then there will be a pure xml solution.

regex - Regular expression library that returns all matches for multiple patterns in one run for C++? -

I'm looking for a regular expression (or some other) library for C ++, which I would like to specify several patterns Will allow, run on a string and return matching locations of all patterns. For example: pattern {"abcd", "abcd"} string {"abcd abce abcd"} Result: matches ABCD matches: 0-3, 11-14: 5-9 Is there any such library address? I recommend that: Promotion: express One of the possible solutions: string text = "abcd abce abcd"; Constant Const sregex abcd = as_xpr ("abcd"); // static - fast sregex abce = sregex :: compile ("abce") // compiled sregex all = * (keep abcd | keep (abce)); What is smack; If (regex_match (text, what, all)) {smatch :: nested_results_type :: const_iterator begin = what.nested_results (). Begin (); Smatch :: nested_results_type :: const_iterator end = what.nested_results (). End (); (; It! = End; it ++) {if (& gt; regex_id () == abcd.regex_id ()) {// You match the ABCD // ...