Posts

Showing posts from April, 2013

c# - VS2008 Express no longer opens projects after VS2010 express Phone -

So I have installed a New April release of VS2010 Express for Windows Phone 7 and now VS2008 Express C # no longer opens . Csproj files. I have suffered a loss because of this, because I have not changed anything in the file. I am currently uninstalling Windows Phone 7 so that I can open my file again. I am feeling a bit, although I need to uninstall the 2008 and it needs to be restored to work for everything. In the future how do I win 7 7 to win 7 interception with Express Express for 7 phones? You can change the file association without restoring the apps. If you open Visual Studio 2008, then go to Tools-> Options, there should be a button for "Restore File Association".

MAMP Mysql in Terminal -

I have installed the MAMP on the MacBook Pro Leopard OS. Phpmyadmin is working fine, but I used to practice mysql terminal Or would like to use bash. I have a problem with it. When I use: mysql -h localhost -us root-p "/" mysql -h localhost -us root " ... This returns the following error: Error 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: yes / no ) Please suggest any possible solution!.): When you login with phpmyadmin, what is the credential / host is this login? - Fra Incinso Soto 2 hours ago

Linux, C++ audio capturing (just microphone) library -

I am developing a music game, it's like a singer star but you will have to play instead of singing. It is called, and it is still in the initial development phase In this game, I capture the microphone input, then run a simple FFT analysis and compare the result to the typical recorder frequencies Is getting the note played like this. In the beginning, the audio library I was using was, but I do not remember why I switched, which I am currently using. The problem is that, from time to time, it crashes randomly or stops capturing, such that no sound is coming from the microphone. My Question , what is the best option for capturing microphone input on Linux? I just have to open, read and stop the flow of bytes from the microphone. I am studying, and (joint) surprising thing: I do not think that PortAudio is a very good API for operating systems like Unix. So, what would you recommend me? Port audio is another odd option with another option I personally It

nstableviewcell - Multiple Lines in NSTextFieldCell -

How can I have multiple rows in my NSTableView in NSTextFieldCell? This means that there are several lines of data: Ex Stack overflow turns into www.stackoverflow.com : Stack Overflow www.stackoverflow.com The part of the solution involves telling the cell that the text can be wrapped, and tell the table that the row height is different. Receiving details is a difficult problem, or at least it was written in 2005 when it was written.

asp.net - How do I check if selected value of the ListBox is not selected in C#? -

This code will display the selected value from the list. Like if I select Item 1 , then I will get the following output: You have selected item 1 . Label1.Text = "You have selected" dropdown list 1. Selected value " "; But if I do not choose anything and I click the submit button, then I will get: you have chosen To display what should be "You have not selected anything. Please select at least 1 item." Update: I am using ASP. Net Webform Update: Answer below is actually false (Omitted for history) Once you use the selected index property, nothing is selected, the first thing will be selected immediately in the list, and return zero. The first thing in the list is "dummy item", and SelectedIndex == 0 . Check for, however, only DropDownList . Correctly SelectedIndex == -1 will show other controls obtained from ListControl (i.e. ListBox or RadioButtonList ) Here is an incorrect answer : selected in

numpy - how to set a fixed color bar for pcolor in python matplotlib? -

I am using pcolor with custom color map to plot a matrix of values. I set my color map so that the lower value is white and the higher value is red, as shown below. All of my metrics are priced between 0 and 20 (inclusive) and I should always be as pure and always pure white as always, even if the values ​​of the matrix that do not spread the entire range, for example, if in my matrix There are values ​​between only 2 and 7, so I do not want it to be white as 2 and 7 as red, but color it as the range is still 0 to 20. How can I do this? I tried to use the "Tix =" option of darbar but it was not working cdict = {'red': ((0.0, 1.0, 1.0) This is my current code (suppose that is the value to be plotted in "my_matrix"): cdict = {'red': ((0.0, 1.0, 1.0), (0.0, 1.0, 1.0), (1.0, 0.0, 0.0)), 'blue' (0.5, 1.0, 1.0), (1.0, 1.0, 1.0)), 'green' : (0.0, 1.0, 1.0), (0.5, 1.0, 1.0), (1.0, 0.0, 0.0))} ​​my_cmap = matplotlib.colors.LinearSe

c# - Is it advisable to have an interface as the return type? -

I have a set of classes with the same task but with different arguments. However, the function of each class can return many objects. Is it safe to set the return type as the interface? Each class (using all the same interface) is doing this with different business logic. Validate secure IMs like return; & Lt; - This is an abstract class in public boole. IsValid () & lt; - It is in an abstract class {return (validateReturnType.GetType () == type (success)); } Public IMessage valid () {if (name.Length & lt; 5) {validateReturnType = new error ("name must be 5 characters or more."); } Other {Valid return = new success ("name is valid."); } Return valid; Return type; } Is the return type of the function tested at any loss of the unit? Apart from this, is it considered a bad design that it is necessary to work for them to work for them to succeed? In this example, Valid () should be run before IsValid () or other IsValid () will always return fals

sapply and concurrency in R -

Hello, Someone asked me a question today and neither did I know the answer nor did I find it in the documentation. This person asked me simply whether the functioning function in R was making a concurrent call to the function which you want to apply to the list, or if the calculation is done sequentially. Does anyone know the answer? What about rapply (recurring version of this function)? Thanks, Jeremy I believe that The function is executing sequentially. If you want a parallel version of [ lapply () ], you can see mclapply () in the package.

silverlight - Keyboard Controls? -

Hello World I'm building financial software working on a touch panel machine. I have created a keyboard control for user input, I want to open the Start menu by clicking on the window button on my keyboard. How is this possible? You can not send keystrokes to a OS from a Silverlight app, nor do you execute the shell operation. Just remember that SL applications run in a browser. If you were able to work as keystroke emulation, then this would be a serious security problem. Cheers, Alex

Model-View-Controller in JavaScript -

tl; Dr: How does the MVC implement in a clean way in Javascript? I am trying to implement MVC in JavaScript. I have goggle and reconstructed my code from countless times but I have not found a suitable solution. (The code just "does not look right"). Here's what I'm just saying about it. It's incredibly complex and it's a pain to work with (but I was better than a heap of earlier codes). And look, glitch, if you are really brave: // create a "main model" "var main = Model0 (); function Model0 () {/ / Create an associated view and save its methods in "View" var view = View0 (); // Create a submodel and it is a function // Pass that "Submodel View" model subview "theme model 1 = Model 1 (Subview) {view.subviewify (subview);}); // Return model methods that can be used by // controller (on change handler) Return {'updateModel1': function (newValue) {model1.update (newValue)); }}; } Function Model1 (MES

iphone - What's the point of having to provide a cacheName for NSFetchedResultsController? -

NSFetchedResultsController * frc = [[NSFetchedResultsController alloc] initWithFetchRequest: fetchRequest managedObjectContext: एमओसी sectionNameKeyPath: शून्य cacheName: @ "रूट "]; हमें कैश नाम के बारे में क्यों सोचना है? यह निर्णय कितना महत्वपूर्ण है? अगर वहाँ दो NSFetchedResultsController ठीक उसी cacheName का उपयोग कर उदाहरण हैं तो क्या होगा? क्या वो वजह बन रही हे? है कि सिंगलटन सामान किसी तरह का? कोर एनिमेशन के बारे में सोच, वहाँ भी यह अजीब animationID पैरामीटर है, लेकिन एक साथ एनिमेशन के दर्जनों के लिए सटीक एक ही बात करने के लिए इसे स्थापित कर सब पर एनिमेशन चोट नहीं करता है। तो मुझे लगता है कि यह शायद एक ही बात यहाँ है ... या नहीं? यदि आप एक है, तो UITableView वस्तुओं के सैकड़ों के साथ कि कैश बहुत महत्वपूर्ण है के रूप में यह मिलीसेकेंड सेकंड से लोड समय बदल जाएगा। चाल यही है कि कैश एक NSPredicate के साथ एक है यदि आप इस विधेयक को बदलते हैं तो कैश को फिर से बनाया जाएगा आप बदलते हैं तो NSPredicate लगातार तो कैश बेकार है। आप एक तालिका का मानना ​​है कि इ

language agnostic - What's the correct way to expand a [0,1] interval to [a,b]? -

Image
Many random number generators return floating numbers between 0 and 1. What is the best and correct way a and b integer between itemprop, for example a = 2, b = 5 [- --- + ---- + ---- + ----] 0 1/4 1/2 3/4 1 Modes to 2 3 4 5 Formula with problem Int ( Rnd () * (B-A + 1)) + A It is that your Rnd () generation interval is on both sides, thus both 0 and 1 are possible outputs And Formula 6 returns when Rand (1) is exactly 1. In a genuine random distribution (no pseudo), the probability of 1 is zero I think it is quite safe for the program like: r = Rnd () If r is equal to 1 MyInt = B other MyInt = Int (r * (BA + 1)) + A Endif Edit Just one quick test: Set our work: f [a_, b_]: = if [(R = random real []) == 1, B, create a table with 10 ^ 5 numbers in [10]: [/ b] C Ode> table = sort [match [table [f [1, 100], {300000}], first in [137]: = {max / @ Table], check out the minimum [first / @ table]} [137] = {100, 1} lets see the distribution:

c# - how can i store value in button at runtime? -

I have a problem, I have some dynamic buttons. And I want to store the integer value in it. And get that value on that button how can I get that button Thanks Advance Date DataView dv = New DataView (dtCat, "PK_CATEGORY_ID IN (" + Credits.Toastring (+ "0)", "PK_CATEGORY_ID", DataviverRotateContentRO); Foreign Currency (Datourv VVR RDV) {// Messebbox. Show (RR [0]. Ostring () + "------------" + RR [1]. Ostring ()); Button b2 = new button (); //b2.Name = rr [0]. Ostring (); B2.Name = ""; B2 Heights = 200; B2 With = 200; B2 Margin = new thickness (0, -100, 0, 0); B2 Horizontal alignment = horizontal alignment. Left; B2.Content = rr [1]. Ostring (); B2 Background = system Windows Media. Brush.punk; B2 Click + = new routing event handler (B2 click); Btncanvas.Children.Add (b2); Canvas SetLeft (B2, B. 2. With * i); I = i + 1; MessageBox.Show (RR [0] .toString ()); B. 2.Tag = RR [0]. Ostring (); } Zero B2_Click (Object Sender, Route

git global config issue -

Anyhow, user.name and my global git for user (msysgit ) Settings When I try them and change them, I can not get the : //.gitconfig If I git I try to u: //.gitconfig via bash and I get a permission denied C: \ Users \ & lt; My username & gt; There is no reference to git in \ . I have tried to uninstall it, my file system for all references to GIT and I can not find any of the registry (though Windows file search is nonsense). What's going on? Even after re-establishment, this people will still see the details of global settings thanks < P> Global gitconfig is stored at the $ HOME location (in the GIT Bash session). Do you have $ HOME (or% HOME% in the DOS session) referred to as u: \ . If so, then just set HOME =% HOMEPATH% (if you have HOMEPATH defined in Windows 7 as defined), and you < Em> should be able to use its global Git configuration / resume update. OP says: My % HOMEPATH% is set to \ Will that set

nhibernate - saveOrUpdate(Object) method of Hibernate -

When I went to do hibernate to extend use saveOrUpdate (Object) method How do I know that line updates or new line Has been added to the table ??? Return method to save zero Orapdet (object), so this method is not able to know the results after the call. Please help me. As I understand your question and comments. You can create an event listener and two interfaces can apply: IPreUpdateEventListener, IPreInsertEventListener eq public class AuditEventListener: IPreUpdateEventListener, IPreInsertEventListener {public bool OnPreUpdate (PreUpdateEvent @ Event) Your stuff is wrong here; } Public bool OnPreInsert (PreInsertEvent @event) {// your stuff returns here incorrectly; }} But I think this is ridiculous. Using ORM means that you do not care strongly about and made to work all the work unit. If you actually insert and only save the need to update () or Update () access methods, this way you will really know how to operation.

Compare odt files in svn -

I use svn to store a revision of my specification files written with owat (OpenOffice.org) . I can not find a way to compare different versions of my ODT files, it complains that they are binary. Is there any device or plugin to compare the ODT files in the SDN repository? Use this as: oodiff -u myfile.odt and if This is a file that is in an SVN workspace, it will compare the current version on a server and with the display the difference in the path of the text in the console (installation of odt2txt is required.)

c# - How can I determine whether or not to add project items using IWizard? -

I am generating unit rappers in VS2010 based on dynamic objects in a CRM system. Apart from the unit code, I want to add an EntityBase from which all the institutions get it. If the file is already present in the project, then it should not be added. I am using an IWizard implementation to give the generator name, object, etc. In the IWizard implementation, to determine whether to add items or not, if it is already present in the project? Public Code EntityWizardImplementation: My code is not yet (complete) IWizard {Public Opening Before Opening File (Project Itam Project Itam) {/ / note : There is nothing here} Public Zero ProjectFinishedGenerating (Project Project) {Note: Nothing here. } Public Zero ProjectItemFinishedGenerating (ProjectItem projectItem) Nothing Public Winner RunFinished (Nothing here: Nothing here) Public Zero Runstart (object automation object, dictionary & lt; string, string & Gt; ReplacementActive, Wizard Runcand Runkid, Object [] Custom Perm) {t

Data Access from single table in sql server 2005 is too slow -

The script of the table below is very slow to access the data from this table. Go to set QUOTED_IDENTIFIER on ANSI_NULLS GO CREATE TABLE [dbo]. [Email] ([id] [int] identified (1,1) NOT NULL, [DateCreated] [datetime] NULL restriction [DF_Emails_datecreated] default (getdate ()), [UID] [nvarchar] (250) Impedance Latin1_General_CI_AS zero, [the] [nvarchar] (100) Impedance Latin1_General_CI_AS zero, [to] [Nvarchar] (100) cOLLATE Latin1_General_CI_AS nULL, [subject] [nvarchar] (maximum) cOLLATE Latin 1_General_CI_AS nULL, [body] [nvarchar] (maximum ) COLLATE Latin 1_General_CI_AS nULL, [HTML] [nvarchar] (maximum) COLLATE Latin1_General_CI_AS nULL, [Atacmentkount] [int] zero [date] [datetime] to zero) [primary] It takes 50 seconds to fetch query data After Land. ID unique cluster non-exclusive Non-unique non-compressed Tabls currently has 180000+ records. There can be 100,000 records per month, so it will slow down during the time. Will partition dat

R: optimal way of computing the "product" of two vectors -

Assuming I have a vector r rnorm (4) and a matrix w dimension 20000 * 200: w < - I want to calculate a new matrix M dimension 5000 * 200; matrix (rnorm (20000 * 200), 20000,200) Code> m11 & lt; - r% *% W [1: 4,1] , m21 & lt; - r% *% W [5: 8,1] , m12 & lt; - r% *% w [1: 4,2] etc. (i.e. calculating four to four-fourth productive sections and product). What is the optimal (speed, memory) way of doing this? Thanks in advance. This seems to run fastest for me: array (R% *% array (w, c (4, 20000 * 200/4)), c (5000, 200))

date - iPhone CoreData: How to group fetched results by day? -

I have a NSDate property called 'time I am developing an iPhone app with CoreData one of my entities' it Time stops in minutes / seconds As my sections, I want to see the date of the day. So if "2010-06-14 8:00 'and' 2010-06-14 11:00 'entries, I want to group them' 2010-06-14 '. Currently I just do as your Anubagnam using "time": NSFetchedResultsController * aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest: fetchRequest managed object Contaks: Manditobjektcontekt Anubagnamkipath: @ "time" Kasnam: @ "root"]; What is the trick of the group for the time of day? Or do I have to use something like plain SQL and " Group by date (time, '% Y-% m-% d') "? It this were resolved like: Added method - ( NSString *) Day; An implementation with my unit class like this: - (NSString *) day {NSDateFormatter * dateFormatter = [[[NSDateFormatter alloc] init] autorel

Python singleton pattern -

Can anyone tell me why this is incorrect as a singleton pattern: Class preSingleton: def __call __ (self) Returns: Singleton = Precisionton (Single) = Singleton in fact Singleton A = Singleton () B = Singleton () Print a == B.A.Ver_In_A = 100 B. B = 'Hello' print A.var_in_b print b.var_in_a Edit: Print the code above: True 100 very much Ywad Part II Maybe it's better? Singleton (object): def __new __ (CLS): Returns CLS A = Singleton () B = Singleton () Print a == B.A.Ver_In_A = 100b.val_in_b = 'Hello' print a.var_in_b print b.var_in_a Edit: Print the code above: True to 100 Thanks again. Making a really simple in singleton A. Python is a trick that the module should do your encapsulation for you and Do not create a category. The module will be started only once The module will not be started until it is first imported Any attempt to import again will return an indicator to the current import And if you want to pret

svn - Committing broken code to the repository for the purpose of backing it up -

I was just talking to another developer (more senior than me) and trying to explain it That we should implement continuous integration through cruise control. He told me that this will not work because he changes the code that does not compile it for repositories at all times for the purposes of support. And that indicates automatic failures only will be noise. Making garbage in repo seems bad for me but I had a loss of words and did not know what to say. What is optional? What is the best practice to support your code on another machine without adding a group of redundant amendments? BTW, our version control system is SVN and it will probably not change any time soon. To be ready to develop and test in branches and hopes that branches work in the main line Have to do. Constant integration for new modification to build and validate depends on the server main line (Says Trunk in SVN).

C++ Virtual Destructors -

Prototype classes I place the dishes in this way: Virtual ~ MyClass (); When the classroom is finalized in a library, I saw that I can not add 'virtual', is it normal, and whether virtual is kept in mind or should I Do something wrong? For example; When I try to do this, I get a compiler error: Virtual MyClass :: ~ MyClass () {} Instead of doing this My question is: virtual Is there no need to include the distructor to write a destructor, still behaves as a virtual destructor (because it is virtual as a prototype)? "post-text" itemprop = "text"> virtual is used only as part of the member function declaration within class definition If the member is defined outside the definition of the function class, then the virtual keyword is not placed there.

How to disable GET requests to JSP page? -

I am fixing some old flaws and as part of a flaw, I need to make sure that some requests are only being posted is a form instead of JSP page application for a gET request, which presents another JSP page data do (I know against its wrong and MVC but it's too late to fix ), Because it is a JSP page Land, so we do not or can post requests so we can get request. In the case of malicious users, read the form and http: // host: 80 / somejsp.jsp? Param = value and param = value can send request as a GET from the browser. In that case, it becomes a violation, I need to ensure that a GET request has not been processed in a way to do this, follow the steps below in jsp page - if (request.getMethod (). equals ( "gET")) {// the user reroute is not because it is a valid REQ} are there any other advantage The way? two solutions: a Lt; Security-lock & gt; is an empty & lt; Auth-constraint & gt; & lt; Url-pattern & gt; * jsp and & lt;

osx - Building a project with eclipse takes forever on windows -

Does anyone know why eclipse (use of ant) ​​to create a project on a window box for more than an hour Does it take time to create Mac only in 3 minutes? I have checked my eclipse.ini file and it is the same as the Mac and Windows implementation can be.

logging - where can I find mysql logs in phpmyadmin? -

Where can mysql logs (errors, queries, etc.) get in the phpmyadmin interface? Open your PHPMyAdmin, do not select a database and Binary Log tab Find out. You can select different logs from a drop down list and press the Go button to view them.

geometry - Minimum distance between two rotated rectangles with different angles -

How can I calculate the minimum distance between the two rectangles? It is not easy for rectangles, those who do not have an angle (i.e. 0 degrees one), but rotated rectangular with any different angle I do not know How to do it? Can you recommend any kind? Whitfloor (Try taking a point from a rectangle or else check it inside the other rectangle). There are several ways to do this: The following is a method ( not the best , but easy to explain). <1> A1 , A2 , A3 , A4 - rectangle number, T < / Code> - Some other point. Count the squares for the triangle: S1 = (A1, A2, T) , S2 = S (A2, A3, T) , < Code> S3 = S (A3, A4, T) , S4 = S (A4, A1, A2) . Let the S_rectangle be a rectangular square. Then T is located within the rectangle S1 + S2 + S3 + S4 = S_rectangle . Reactangle one another, then follow these steps. Calculate the coordinates of all 8 digits of 2 rectangles. Minimize all 4 * 4 = 16 pairs of digits (points from differ

c# - How i can to create my custom AJAX DataGrid for ASP.NET? -

मैं अपने कस्टम AJAX DataGrid को ASP.NET के लिए कैसे बना सकता हूं? धन्यवाद। पेजर के साथ पूर्ण ASP.NET Ajax ग्रिड बनाने के माध्यम से आपको चलेगा।

jquery.clone() and ASP.NET Forms -

I have a page where I want to add multiple, dynamic users to a record in a database. Here is some initial page: & lt; Div id = "record" & gt; & Lt; Div id = "userrecord" & gt; Name: & lt; ASP: text box run = "server" id = "ozname text box" & gt; & Lt; / Asp: text box & gt; & Lt; Br / & gt; Phone number: & lt; ASP: Text Box Runat = "Server" ID = "Ozphone Number Timebox" & gt; & Lt; / Asp: text box & gt; & Lt; Br / & gt; & Lt; / Div & gt; & Lt; / Div & gt; and jquery: $ (function () {$ (".button") button. (Click) (function (event) { Addnew (); event.preventDefault ();})}}) function addnew () {$ ('# userrecord'). Clone () AppendTo ('# record'); } So my question is how do I use in ASP.NET, to select all the data in this form and for every # user within the #records for the record division Adding a unique record

web services - Way to get a timezone from a zip code? -

Anyone detects a web service or shows something from there that I can give a zip code and time Can I return the area? Or is there something that I need to write to myself? If yes, then how to do it, but there is no sign or guide? I use Visual Studio 2008 and C #. I had only one problem: we bought a subscription and provided schema (among other items) timezone Is just loaded in the SQL and we were off for the race.

linux - How do I use python to hit this command and return the result? -

$ whois abc.com I used to hit Python I want to use this command, and then give the result a string of text. How can I do this? You can use, for example: subprocess Import Popen, PIPE Output = Popen (["/ usr / bin / whois", "abc.com"], stdout = PIPE) .communicate () [0] Stdout = PIPE parameter stdout to write in a temporary pipe instead of the power console (if you do not want it, remove the stdout parameter].

android - How to display data in TextView -

I have a view in which there is a text box where the user enters the data, when submitted clicks, I Display in input and other boxes. Find the last edit text Edit = (edit text) VViBiID (RID.); MText = (TextView) findViewById (R.id.timepicker_input); How can I do this, please help < Code> Last Editing Text Edit = (edit text) VVIBID (RID.); TextView mText = (TextView) findViewById (R.id.timepicker_input); MText.setText (. Edittext.getText () toString ());

multithreading - C# Step by Step Execution -

I am creating an app that uses APIs and places one format in another format converter. I have a way (actually one click event) that does this: Private Wide Button ScanAndParse_Click (Object Sender, EventArgs e) {short scan_result = scanner_api.Scan (); If (scan_result == 1) parse_api.Parse (); // This will check for a saved image on the disk scanner_api store, and then change it. } The problem is that if condition (scan_result == 1) is evaluated in the medieval period, then it just does not work. I do not return the CLR until the API returns the convenient results. Note Just doing something like this: Private Zero Button ScanAndParse_Click (Object Sender, EventArgs e) {Short scan_result = scanner_api.Scan () ; MessageBox.Show ("result =" + scan_result); If (scan_result == 1) parse_api.Parse (); // This will check for a saved image on the disk scanner_api store, and then change it. } This works and displays results. Is there any way to do this, how? T

xml - In Python ElementTree how can I get list of all ancestors of an element in tree? -

मुझे "get_ancestors_recursively" फ़ंक्शन की आवश्यकता है। एक नमूना रन हो सकता है & gt ; & gt; & gt; डंप (tr) & lt; anc1 & gt; & LT; anc2 & gt; & LT; तत्व & gt; & Lt; / तत्व & gt; & Lt; / anc2 & gt; & Lt; / anc1 & gt; & Gt; & gt; & gt; Input_element = tr.getiterator ("तत्व") [0] & gt; & gt; & gt; क्या कोई मुझे इस के साथ मदद कर सकता है? ElementTree (v1.3 या बाद के संस्करण) के नवीनतम संस्करण में, आप बस इनपुट_element.find ('..') कर सकते हैं पुनरावर्ती रूप से हालांकि, पायथन के साथ जहाज़ वाले एलीमेंटट्री में यह कार्यक्षमता नहीं है, और मुझे एलिमेंट क्लास में कुछ दिखाई नहीं देता जो ऊपर दिखता है। मेरा मानना ​​है कि इसका मतलब है कि आपको इसे कठिन तरीके से करना होगा: तत्व वृक्ष की एक संपूर्ण खोज के माध्यम से। def get_ancestors_recursively (ई, बी): "तत्व पेड़ ई में बी के पूर्वजों को ढूँढता है।" वापसी _get_ancestors_recursively (e.getroot (), बी, []) def _g

perl - Access to Apache::DBI from DBI -

Use Apache :: DBi database handles from a Perl script (which is not running under mod_perl) possible? I am pooling a database for my Perl scripts, I have a growing number of database sources (Oracle / Miskel) and scripts. Using some ideas such as SQLRelay, database link and pooling, using Oracle10XE, and converting all scripts into SOAP calls etc. is becoming more and more viable, but if Apache :: DBI re- There was a mechanism to use so I can fight it a bit. I do not have any non-Pearl requirements, so we do not have the same functionality as a php / jdbc implementation or working with it. Thank you Firstly it helps to remember that DBI / DBD Not a wire protocol, but an API on different data sources. Since you want to connect to different pools of database connections with different processes, this is not appropriate, and there is also a strange option (they are both rappers on DBI). You are looking for something that lets you connect several processes to handle a sh

iphone - Autorelease with elements in a UITableViewCell - memory leak -

Image
In my 'cellForRowAtIndexPath' method for a UITableView rep, I am allocating a cell if it does not exist, after and so I am making this cell, I have a new activity like spinner: UIActivityIndicatorView * actView = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: UIActivityIndicatorViewStyleGray] autorelease]; I'm using leaks to detect memory leak in my program, and for some reason, it's coming in as a leak, even if it is autoreleasing. The cell itself is autorelasing. Is anyone coming in the leak as a leak device, and how to deal with these problems? It's leaking only if I add it to the contents of the cell view. If I can just make it and let it stay, leakage is not reported to any problem. In addition, if it helps, this history leaks is displaying for this memory spot. It seems that at some point will it get the message to keep extra? This is not being done in my code. < P> is the cell being released? If not, then are

java - What Log4j alternative logging libraries are available? -

What logging libraries do you recommend as an alternative? Do these libraries work with Spring and Hibernate? Whether they are compatible with it or slf4j let you use all other logging frameworks at once Allows Juli, Commons, Log4j etc. As an output framework to use with slf4j instead of Log4j, I suggest the logbin that is written and maintained by the creator of Log4j.

c - problem with fork() -

I am writing a shell that parses the input and parsing process to read the parent and executes with execvp. The main method's pseudocode: do {pid = fork ()); Print pid; If (P & lt; 0) {error; Go out; } If (P & gt; 0) {wait for the child to finish; Read input; } And {call function to parse the input function; Go out; }} While returning status; What happens is that I do not ever feel like entering the hair process (printing pad is always positive, I do not ever enter it). However, if I do not call the parse function and just exit, then I optionally enter the parent and child. Full code: int main (int argc, char * argv []) {four input [500]; Pid_t p; Int firstrun = 1; Do {p = fork (); Printf ("PID:% d", p); If (p & l; 0) {printf ("faulting error"); Exit (-1);} If (P & gt; 0) {Wait (zero); Firstrun = 0; Printf ("\ n";); Berboo (input, 500); Fflush (stdout); Read (0, Input, 499); Input [Stellen (input) -1] = '\ 0'; } A

serialization - When do we need to use .NET Remoting? -

When do we need to use NAT Remoting? What is the use of serialization in .NET remoting? If you have to call remote and transparent tasks. Serialjobable objects should be used as logic because they require reconstruction on the other side of the line.

C++ pointers and constructors -

संभव डुप्लिकेट: अगर मेरे पास कोड का यह स्निपेट है ए a1 (i); ए 2 = ए 1; ए * पा 1 = नया ए (ए 2); क्या कोई कृपया बताता है कि अंतिम पंक्ति क्या है, यह ए 2 की प्रतिलिपि बनाता है और इस नई ऑब्जेक्ट के लिए पॉइंटर है pa1 या यह सिर्फ a2 के लिए सूचक बनाता है, धन्यवाद अग्रिम में अंतिम पंक्ति एक नया ऑब्जेक्ट A बनाता है, जिसके लिए pa1 अंक, और इसकी सामग्री A2 के समान है । मेरा मानना ​​है कि यह उदाहरण तर्क के साथ एक कन्स्ट्रक्टर (प्रथम पंक्ति), एक प्रति कन्स्ट्रक्टर (दूसरी पंक्ति) और एक अन्य कॉपी निर्माता (अंतिम पंक्ति) का उपयोग दर्शाता है। अंत में सभी तीन ऑब्जेक्ट्स की एक ही सामग्री होगी।

css - Is there any guide on "When to use display:block when :inline and when :inline-block" and why? -

Any good article on when to "when do you use display: block Know: inline and when : inline-block "and why? And when we have to override the performance:? For any HTML tags / element via CSS? inline - treats the element as if it is an inline of the text Was the part. Width and height are meaningless blocks - treats the element in the form of rectangle width and height can be specified inline-block - an element flows through the text inline, but the width and height are to be specified. Any of these elements by default also For example: & lt; Span & gt; , & lt; Em> , & lt; Strong & gt; -> / div>

How could i send a html5 sqlite database from an iphone? -

I am developing a webapp for ipad / ipod and using customer's side database. I want my webpage to work primarily offline and users should be allowed to fill the database and at a certain point I want to send my database to the server and send all the information to be processed. The problem is that I can not find a suitable way to send my table to the server to fill my database with one sent from the iPhone. Does anyone have a clue? I will suggest posting JSON to your server. If you can read the data from the client-side database in the JSON object form, take it and post it on your server, then allow the server to manage the mapping in your datastore.

error handling - VB.NET: question about "using" block -

कोड पर विचार करें: त्रुटि गोटो त्रुटि Handler पर sr का प्रयोग करें StreamReader = New StreamReader ( ओपनफ़ाइल) str = sr.ReadToEnd sr.Close () अंत से बाहर निकलने का उपयोग करें उप त्रुटिहैंडलर: अगर के अंदर एक त्रुटि है ब्लॉक का उपयोग करके आप कैसे साफ करते हैं sr ऑब्जेक्ट? sr ऑब्जेक्ट ErrHandler में नहीं है, इसलिए sr.Close () को नहीं कहा जा सकता । क्या का उपयोग करना ब्लॉक किसी भी संसाधन को स्वचालित रूप से साफ़ कर सकता है भले ही कोई त्रुटि हो? हां, उपयोग ब्लॉक स्वचालित रूप से IDisposable.Dispose (जो, StreamReader कॉलिंग के लिए बंद करें के समान है) को कॉल करता है, इसलिए कुछ भी नहीं है करने की ज़रूरत है (यह ब्लॉकों का उपयोग करने के पूरे बिंदु है!)

wpf - Grouping datagrid in silverlight? -

How can we group the data-grid in silver-light with xaml? (I used silver-light 4) Perhaps someone wants to give you a hint, whom You should provide some additional information so that we can get an idea, what is your intention Is this a layout question or do you have DataGrid ?

jquery mouseover/mouseout -

After working out the mouse, it is not working once again, what is the work around it? P> & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Style & gt; / * Div {background: # def3ca; Margin: 3px; Width: 80px; display none; Swim left; Text-align: center; } * / & Lt; / Style & gt; & Lt; Script src = "http://code.jquery.com/jquery-latest.min.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "playcontrols" style = "position: full; bottom: 0 pixels; left: 0 pixel; right: 0 pixel; color: blue;" & Gt; Mouse over me & lt; / Div & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ ("# playcontrols"). Mouseover (function () {warning ('here'); $ ("div: eq (0)"). Show ("fast" function () {/ * Use the carpet so that the function * / $ (this) does not have the name of .next

reporting services - Column header direction is SSRS Matrix -

Hello, Is it possible to change the direction of column header values? Only the default header variants displayed in the horizontal direction, but I want to show values ​​in vertical direction. Is this possible? I have tried for the past 3 days. Which version are using SSRS? As far as I know, you can only change the orientation of text in chart axes (at least in 2005).

objective c - Error while integrating Three20 to an iphone application -

I am trying to integrate the Three20 for my project. I followed the same instructions given in this page But I'm getting #import "three20 / three20.h" issue Under the project's information, the header search path> Build i .. is defined as .. / three 20 / build / product / 320 What could be the problem with article search path settings? Thanks - Deepika 1 - Create your project (for example : SampleApp ) 2 - Copy three 20 folders to SampleApp folder 3 - Followed as your directory structure Will be SampleApp.xcodeproj | - | - Other files and folders 4 - In the command line, this script is returned to the SampleApp directory Python 320 / Source / script / ttmodule.py -p ./SampleApp.xcodeproj three 20 5 - Full

opengl es - How to use point sprite API in Android NDK -

I want to use point physics (OpenLLS extension) API in Android NDK (R4). It's here [] = {0,0,1}; GlPointParameterxv (GL_POINT_DISTANCE_ATTENUATION, AT); But, it does not work. Work associated with 'Xv' and 'x' get fixed point data. You can try: GLFixed [] att = {0, 0, 1 & lt; & Lt; 16};

ruby on rails - undefined method `openid_identifier' for #<AccountSession: no credentials provided> -

I'm trying to get authlogic and openid in my app. So far its unpleasantness is serious. I have tried to follow the railcasts on the subject, but any gems or plugins start working. After finishing A, I ended up (mentioned below that page) now I'm getting the error: ActionView :: TemplateError (# & lt; account Session: No credentials provided for & gt;) Undefined method 'OpenIDIdIFire' on app / view / account_session / new / line 13 .html.haml: I Can not decide whether this is any improvement yet or not. View: % h3 Login: - form_for (@account_session) do | F | = F.error_messages% p = t 'account.login' = f.text_field: Login% p = t 'account.password' = f.password_field: Password% p = t 'account.openid_identifier' = f.text_field: openid_identifier < / Code> Controller: Class account session controller & lt; ApplicationController def new @account_session = Make AccountSession.new End DRF @account_session = Account

Eclipse Javascript code assist problem in using WTP -

I'm new to WTP so I'm sorry if its solution is clear. When I define and use a class from a single file, I get a good code, I get the code for classes from standard libraries. Unortunatly, when I try to use code and announcements from a file from a file, then I no longer support good code support features. I have searched the web and tried to do some things, so that the noise has been enabled for the JS project, to ensure that the scripts are in the folder, the JS source folder is added to the list and so far In trying to create a new folder and adding it as a library, I really want OT to make this facility work so that any help is appreciated. You can try after installing, you need JavaScript Profile must be configured.

jsf - Problem in filling SelectOneMenu with data -

In my ApplicationBean1.java class, I have an option [] attribute year and a filling method: < Pre> Public Zero Construction Year () {} Initial Year = 1900; Int present = calendar.justinstance (). Get (Calendar. IEER); Int i = 0; For (int y = initial year; y & lt; current year; y ++) {option op = new option (y, integer.tustin (y)); Year [i] = op; I ++; }} And this is my jsp page which is using icefax: & Lt; / Ice: selectOneMenu> My problem is that in the current year (2010) from the year 1900 are not appearing in the drop downlists (SelectionOpen menu). Anyone help me understand this? I do not have icefaces, so it can work differently I do not know, but you Generally, do not feed f: select item with one, or option [] or whatever, whatever. This should work: Private list & lt; SelectItem & gt; Years; // + Recipient Public Zero Construction Year () (Last Interval Initial Year = 1900; Final Interval Current = Calendar. Get Instance (

iphone - how to create table view who's 1st cell look like as selected? -

I have created an iPad app where the first screen segmentation view is. The image view controller in the table view and the details view in that master view. My problem is that when the app is initially loaded in the first cell of the table view, then the selected and related image should be viewed as a visual, should be visible in detail. It looks like you do not need cell to see as a selected, but you The cell should be selected (to display the related image) You should see this post Here is the sample code - (zero ) ViewDidload: (BOOL) Animated {[uiTableView selectRowAtIndexPath: [NSIndexPath indexPathForRow: 0 in particular: 0] Animated: No scrollPosition: 0]; } Or if you really want to show the cell as like, you can do something like - (zero) viewDidoad: ( BOOL) Animated {UITableViewCell * cell = [uiTableView cellForRowAtIndexPath: [NSIndexPath indexPathForRow: 0 in particular: 0]]; [Highlighted cell set: true animated: TRUE]; }

decode Infrared remote control code using c or c++ -

Please tell me how to decode infrared remote control code using C or C ++. I think your question is unclear because you do not know exactly where it starts from. If you have an infrared receiver here, used here some time ago to learn how to build one I hope you have some talent in electronics Otherwise, it is time to learn! : D If you are successful in creating it (or any other known-worker receiver), you can see an open source project that is compatible with the suggested device.

c - GCC special optimization options for double precision floating point arithmetics -

Do you know which of the GCC optimization flags is best suited for creating applications, using double floating point And in a very real time and it uses -M is a target hardware of a dual-jugose with a Linux on-board Thank you in advance! "dual-juan" is not the exact specification of the processor that you are targeting - "quinn" A marketing brand name is compared to a specific model. "Quinn" does not tell you whether you are targeting the IA32 or x86-64 architecture. This is important, because optimization can be significantly improved by targeting a specific CPU family. There are many options; Specifically, start with -march to generate the code for a particular instruction set. If you are not targeting x86-64, then -mfpmath = sse -mill-double can provide a speed (but only default on x86-64). In addition, if you are shown as a hosspot in the libmath , then a more specific customizable flag can be recomputed with that specific libr

javascript - Check if an input item text is already selected? -

I have text input items and using selection () I can highlight text inside it, though sometimes -Every text is already a valid reason and when I run (), I think that it does not deselect it, is it possible to check that input items have been selected? You can select to select. You have to check that the selection is in your input items. var selecttxt = ''; If (window.getSelection) {selecttxt = window.getSelection (); } And if (document.getSelection) {selecttxt = document.getSelection (); } And if (document.selection) {selecttxt = document.selection.createRange () Text; } Var textofinput = [...]; // Here is the code to find text in the input if textofinput.indexOf (selecttxt)! == -1) {// Part of the text of the input / section has been selected Warning ('the conditions have been fulfilled!' ); }

.net 3.5 - jQuery session in ASP.NET -

I write a countdown timer in jQuery and I need to keep some data in a session when the countdown is over. To update, the data must be sent to the server. How can I handle this situation? I am using jQuery and ASP.N. I am new to you so that you can interpret this briefly. There is a class like you: public class MyClass {public string first name {get; Set; } Public String LastName {get; Set; }} and thus a verb method: public JsonResult test (string data) {// do something with the data obj = new MyClass { FirstName = "Thegoo", LastName = "Temple"}; Return Jason (OBJ); } Then you can write a JS function like this using jsf: $. Get ('' <% = html.action ("test", "MyController"), {data: "some value"}, function (result) {warning (result. First name + "" + result. }); I hope this example is useful.

php - Facebook graph api photo upload to a fan page album -

I got the photo upload function to work with this code, & Lt;? Php include_once 'facebook-php-sdk / src / facebook.php'; Include_once 'config.php'; // This file is secret key and application id ... $ Facebook = new Facebook (array ('APPID' = & gt; FACEBOOK_APP_ID, 'secret' => FACEBOOK_SECRET_KEY, 'cookie' = & gt; true, Domain '= & gt;' your callback url goes here ')); $ Session = $ Facebook- & gt; GetSession (); If (! $ Session) {$ url = $ Facebook & gt; GetLoginUrl (request to permit necessary permissions here (array 'canvas' => 1, 'fbconnect' =>, 'req_perms' = & gt; 'user_photos, publish_stream, offline_access' // Here only Should work with publish_stream, but I added to protect others)); Echo 'you are not logged in, please & lt; A href = "'. $ Facebook- & gt; getLoginUrl ().' '& Gt; Login & lt; / a & gt; to access this

c# - client-server application design -

I want to create client-server applications using sockets on the netwarting program and new to networking programming and I have a dilemma is . Customers will often send the data to the server and the server will often inform the customer what is the best way to design it? Whether the server should keep a thread in order to communicate with each Thanksgiving, unless this ration is done or only send the data to the client server and update it regularly (some seconds) or from them Nobody? Some help would be great thanks guys. PS: The number of subscribers will reach thousands. Pure solution for the type of design, recreating Windows Communication Foundation , Or for short is called WCF. WCF allows for asynchronous callback, which will be a way to implement the type of architecture you describe. I have learned my most about WCF with the book WCF Learning , WCF is very extensive by Michelle Bustemte and I will advise about shooting with the hip without a good reference.

ruby - Are there programs that iteratively write new programs? -

For almost a year, I was thinking about writing a program that writes programs, this would be primarily a playful exercise Which I have to teach some new concepts. My inspiration comes from the sequence of chaos arising out of sequence and the new chaos in infinite inheritance. To be more specific, the program will start by writing a short random string. If the string program compile then it will log on for later comparison if the string does not compile the program, it will not try to rewrite it until it is compiled. More wire (mini 'waste' programs) are logged, they can be parsed for equality and used to generate a grammar. This grammar can be prepared to write more strings again, which is a higher probability of compiling than purely random strings. This is clearly silly, but I thought it would be fun to try and develop in such a way that as a program and as a sub-product I find a bunch of unique programs. , Which I can imagine and art can say. I will write this in

uitableview - iphone: custom UITableViewCell taller than the default cell view -

I am creating a list that contains a listView with 5 rows: - with a graph - from 1 to 2 5 rows have some data with the same formatting. I have created 2 squares: graphicviewviewsell and dataCustomViews. Based on the position of the cell, I load the correct customcell as: NSArray * topLevelObjects = [[NSBundle mainBundle] loadNib named: @ "GraphCustomViewCell" owner: zero option: zero]; (ID current object in TopLevelObjects) {if ([currentObject isKindOfClass: [GraphCustomViewCell class]]) {cell = (GraphCustomViewCell *) currentObject; break; }} It works fine except for the first line, corresponds to the graph, 4 other rows in the larger (in height), and as the result it hides the first 3 other rows. Is there a choice in the table view that enables the custom cell to expand into the default cells? I like 5 rows (graph + 4 data lines) to fit the whole screen (480 - tabbar height) Thank you very much for your help Regards, Luke Need to implement.

Are there any JavaScript libraries exclusively for WebKit? -

With a mobile device or embedded system you often only support a browser for performance and memory reasons, from traditional JS libraries Along with it you have to limit yourself to features and performance to support as many browsers as possible. This is what I would like to save. Is any Javascript library focused only on a web browser? Like jQuery, but without all cross-browser content So far, I have found that only the only library see ZeptoJS: < / P>

How to read changed values with native query during one transaction? (Spring and JPA) -

We have container transactions with Spring and JPA (hibernate). I have to update some rows on a table for "flags" through native details. Then we insert some lines from JPetimplate through EntityManager in this table. After that, we need to calculate the changes in the table through the original statement (with the association of Oracle and zero, with complex groups) ... I think in steps 1 and 2 The changes have not been made and that is why the statement fails from 3. I was already trying with transaction promotion REQUIRES_NEW, EntityManager.flush ... did not work. 1) Some exchanges = some value updates (original) 2)) 3) Select values ​​from SOMETABLE What steps Phase 1 and 2 There is a possibility to read changes in 3? I think you can write DataSource to JpaTransactionManager , JdbcTemplate and JpaTemplate and with this it has enabled @transactional : & lt; Tx: annotation-driven / & gt; Believing it is not a configuration bug, my best

c# - Capture keystrokes (e.g., function keys) while a messagebox is up -

We have a large WinForms application, and there is an underlying bug reporting system that can be activated during testing through F5 Could Keys I'm capturing F5 key with Net's prefilter message system. It works fine on main forms, modal dialog boxes etc. Unfortunately, this program also shows the Windows Message Box when it is required. When there is a bug with it, for example, the wrong text in the message box or it should not be there, the message filter is not executed at all when the messagebox is correct! I know that I can fix it by regularizing my own messagebox, or by kicking a different thread that chooses GetAsyncKeyState and calls the error reporter from there. Although I was hoping for a method that was less than a hack. Here is the code that the problem appears: Public Class Form1 implementations IMessageFilter Personal Sub Form1_Click (ByVal handles Me.Click MsgBox as ByVal e System.EventArgs as this object) ("Now, a messagebox is up!") End Su

Spring: What parser to use to parse security expressions -

I want to get my value in the standard security expressions such as hasRole etc. in a variable. (In a JSP) How can I do that? SpelExpressionParser is the standard EL parser, but I do not think it will parse the security expression.

Using CMake with Eclipse CDT, quickly switch targets? -

I am using the CDT4 - MinGW makefile generator. Create project-> Share all targets successfully (a shared library), but it seems that I have to open a project settings page and type in the target, hopefully it is spelled right * or (b) To run installation from the terminal and to "build" the package target I create a promising project-> target entry, but create ... and build ... sub-entries are gray-out < / P> * Any pointers will be appreciated! For anyone else thinking, project-> create goals- & gt; Build ... presents you with the list of available targets it is only available (using Galileo) If Project Explorer is focusing . Then, only this directory is selected (so make sure that your project is selected, unless you want to create 'src' for example. Alternatively, the project in Project Explorer Right-click the code. Code :: Handles a little more unwieldy makefile by the way of the block, but this is Eclipse, finally.

certificate - Install a certficate on a Windows Mobile 5 device Silently -

I have to install a certificate on a Windows Mobile device. I have to do this, but the cab file fails to run. I have a lot of tools that are not physically present to me and I need to put it, so any manual procedure is not possible (i.e., if it requires an active sync) It is not working). Any thoughts on how to do this? I have a device which can allow me to make changes to files and registry on the device, but I do not know where the baggage should be set. Is these devices within an organization? If so, you can look at it, which has the functionality to apply the certificate on Windows Mobile devices. Its a special way to manage large number of devices within an organization.

c# - Given a Member Access lambda expression, convert it to a specific string representation with full access path -

एक अभिव्यक्ति & lt; Func & lt; T, ऑब्जेक्ट & gt; & gt; (जैसे x => x.Prop1.SubProp), मैं एक स्ट्रिंग "Prop1.SubProp" बनाना चाहता हूं जितना गहन आवश्यक है। इस मामले में एक एकल पहुंच (जैसे x => x.Prop1), मैं आसानी से इस के साथ कर सकता हूँ: सदस्य अभिव्यक्ति शरीर = (अभिव्यक्ति.बीडी। नोडप्रकार == अभिव्यक्ति टाइप करें। कनवर्ट)? (सदस्य अभिप्राय) ((UnaryExpression) अभिव्यक्ति। बॉडी) .अफ़र: (सदस्य अभिप्राय) अभिव्यक्ति। बॉडी; रिटर्न बॉडी.मंबर .नाम; हालांकि, अगर गहरी घोंसले के शिकार हैं, उदा। X => x.Prop1.SubProp1, यह केवल सबसे गहरा नेस्टेड नाम मिलता है, उदा। "प्रस्तुतिकरण 1 एसबप्रॉप 1" के बजाय "उपप्रॉप 1" क्या लैम्ब्डा अभिव्यक्ति की पूरी संपत्ति पथ तक पहुंचने के लिए कोई रास्ता नहीं है? सार्वजनिक स्ट्रिंग GetPath & lt; T & gt; (अभिव्यक्ति & lt; Func & lt; T, ऑब्जेक्ट & gt; & gt; expr) {var stack = new stack & lt; string & gt; (); सदस्य स्विच (expr.Body.NodeType) {मामला अभिव्यक्ति प्रकार।

java - Sending compressed data via socket -

I have to create a log server in java, and send compressed data to a job now i send it in plain text from the line I am here, but I should summarize it. The server handles the "HTTP-like" request, for example, I can get a log by sending "GET xxx.log". It will stop server response, and connection with a TCP connection, a header and log for the server. The client reads the line by line and analyzes each log entry. I tried some methods without success, my main problem is that I do not know where each row ends (in client size) any thoughts? GZIPOutputStream on the server and use a GZIPInputStream on the client, with an InputStreamReader around it and that A buffer reader around So just read the lines

no such file to load -- yet file is config.gem in environtment.rb file in rails -

I keep this error for different gems, Not to load such a file - actions_as_reportable However, I have the following line in my environment. RB: config.gem 'acts_as_reportable' And I also did the following: & gt; Install Gem works_as_reportable This output: & gt; Mani install__s_reportable install_as_reportable-1.1.1 1 gem is installed Installing the re-documentation for works_as_reportable-1.1.1 ... Installing the RDoc document for actions_as_reportable-1.1.1 ... What should I do? config.gem 'acts_as_reportable',: lib = & gt; 'Rupert / Arts_s_Reportable' Correct documentary is necessary. Rail API: Explanation of lib option.

c# - stub webserver for integration testing -

I have some integration tests, where I want to verify certain requirements, against a third [Artist webserver] I I was thinking that I would replace a third party server with a stub server which simply log calls made to it. Calls do not have to be successful, but I need records of requested requests (mainly just path + QuickString). I was thinking of using IIS for this. I can set 1) an empty site, 2) Modify the system's host file to redirect requests to that site 3) Pars the log file at the end of each exam. This is problematic for IIS. Log files are not written immediately, and files are written in constant words. I will need to read the material before detection, test the file, wait for a nodetemnic amount of time after the test, read the update material and more. Can anyone think in a simple way? You can use System.Net.HttpListener (). It works as embedded webserver, which means that you can also check the use of on-the-fly without parsing the log files. The c

reporting services - HowTo: Conditional Page Break in SSRS 2008 in Visual Studio 2010? -

I just migrated a project from .NET 3.5 to 4.0, accordingly report now. Is included in SSRS 4.0 / VS2010. Before I set a rectangular visibility conditionally I had a trick (inside rectangular I have placed a rectangle with a payback) but now it stopped working Please appreciate any help. By inserting a rectangle with PageBrack in a conditionally visible rectangle , With ssrs versus -2010, now we can add a rectangle directly to pagreck and when page break is shown, come Remarks: Conclusion: Remove the inner rectangle and set the page break on the outer rectangle resolves this issue :)

audio - can the python wave module accept StringIO object -

I am trying to use the module to read wav files in python. There is no specificity of my applications that I am not using a file or file name, but to read the WAV file, but instead I have a wav file in the buffer is. And here's what I'm doing Import StringIO buffer = StringIO.StringIO () buffer.output (wav_buffer) file = wave.open (buffer, 'r' ) but I'm getting a EOFError when I run it ... file "/ system / library / Framework / Python.framework / version / 2.5 / lib / python2.5 / wave.py /System/Library/Frameworks/Python.framework/Versions/2.5/lib/ ", line 493, open return in Wave_read (f) file "Python2.5 / wave.py", line 163, __init__ in self.initfp (f) file "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/wave.py", line 128, initfp = share in self._file (part Il, bigendian = 0) file "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/chunk.py", line 63, __init__

wpf - .NET 4.0 & CrystalReports -

I have a DLL build with the target framework 3.5 which manages the report; This DLL uses CrystalDecisions.CrystalReports.Engine version 10.5.3700.0. Now, I have created a new wpf application based on the .NET Framework 4.0 and I have added the DLL project for the report. I had to install without error Crystal Reports Visual Studio 2010 Library (for building applications) ... now it makes success, but the report print does not work. When it sets an error data source ... message: Unknown Query Engine error in the file C: \ DOCUME ~ 1 \ oli15 \ IMPOST ~ 1 \ Temp \ MyReport {4E514D0E-FC2C-4440 -9 B3C-11D2CA74895A} .rpt: ... source = analysis server error code = -2147482942 stacktrace on CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection (object older connection object Nucleozen, Object ParametersField, Object CRDBOptionUseDefault) CrystalDecisions.CrystalReports.Engine at Table.SetDataSource (Object Val Type Type) CrystalDecisions.CrystalRep O

Why aren't c# programmers drawn to ruby as java programmers are -

This is a trend I have seen to be a very big adoption of Ruby from the Java community. Is this C # such a terrible language + Are there good tools on Java that are not as eager to switch on Ruby permanently as Java developers as most C # developers? What is your opinion? C # is a modern, and very powerful language Lambda (closed) Properties Value type Properties Type estimate Li> pass-by-reference ... just to name a few. These features make Cubi to Ruby less infectious than Java's infection with Ruby.

c++ - How to iterate over a STL set and selectively remove elements? -

The following code does not work properly How should this be done correctly? (Std :: set & lt; color & gt; :: iterator i = myColourContainer.begin (); i! = MyColorContainer.end (); ++ i) {If for the (* I == Yellow) {DoSomeProccessing (* i); MyColorContainer.erase (i); You do not need a loop in the form of dealing with a set. / P> std :: set & lt; Color & gt; :: iterator = myColorContainer.find (yellow); If (this! = It.myColorContainer.end ()) {DoSomeProcessing (* this); MyColorContainer.erase (this); }

visual studio 2008 - How do I manipulate the format on a DataGridView that is bound to a Data Source? -

I am using SQL Server 2005 and Visual Studio 2008, C #. In the data source (SQL Server Data Table) I use the DateTime format mm / day / yyy / , however In the form overview (Data Grid view), users want to see a completely different format, year, week number, and number of weeks ( yyww, d ) which string In the format I make an algorithm for the change between prices (date to day) Or, but can I populate the affected cells with yyww, d (string) instead of mm / dd / yyy (date time)? This is what I am trying to successfully (and note), this problem becomes apparent on the last line, because cell value does not accept string at runtime - it does not Still wanting a DateTime ...) Private Zero DatagridViewingFindwareSelfarming (Object Sender, Data Grid Visualization Event Event E) {string weekAndDay = ""; DataGrade View Cell = DataGrid WidgetWindowWise Rao [E. Randex]. Seles [E. Column index]; If (cell column index == 13 & cell value == zero) mEmptyRow = tr

html - How to rewrite the URL -

I have a small application built using SIM 2.2, Richface 3.3, jboss 5.1. Adds the request parameter to the page navigation goal. I would like to hide the parameters to hide the customer, which is using the application (i hope to be something like URL) Parameters (UserAide, Order ID and CMID) are currently mapped to the backend bean through the book. Page. Xml. How do I stop the request parameters from the browser parameter, as it also allows the client to manipulate the URL. While talking about the facility of rewriting the SIM URL, it states that the primary key ID in a primary format, how to do something more complicated like a definite use case above To complete, it is not sure. Provides url-rewriting for JSF. You can not 'hide' the GET parameter. Unless you make them post parameters but all presentations are posted in JSF by default.