Posts

Showing posts from March, 2012

Using Array class in parent and child windows (javascript question) -

I'm actually coding a case where a child popup window transfer data as the original window: var childArrayData = new array (); Child Arreretta [0] = 'Data Text 1'; Child Arredata [1] = 'Data Text2'; Child Arredata [2] = 'Data Text 3'; Window.opener.parentVariable = childArrayData; I found an error that was resolved: var childArrayData = new window.opener.Array (); & Lt; ----- childArrayData [0] = 'Data Lesson 1'; Child Arredata [1] = 'Data Text2'; Child Arredata [2] = 'Data Text 3'; Window.opener.parentVariable = childArrayData; Why is the array class different between two separate windows? Does this name belong to the place? Can you mention any article about the answer? Thank you in advance. EVEVE This is a known problem Written by Douglas Crockford. When you call array , you are talking about window.Array . The Window browser is the reference object, and you get a per page (or frame). All the arra

c# - Program Compatibility Assistant thinks my app is an installer -

I have created a .NET C # WinForms application on Win 7 RTM x64, which says that I have called DataInstaller. When I run this program out of the debugger (no blank form with no function at this time), it works fine until I can stop the form I then programmatically I receive a message from the assistant who says: This program may not have been installed correctly Then I would like to re-install using the recommended settings Get options That was supposed to be installed work. If I name the app 'Data Tingi' then this is not an issue, I think it is related to the way that a program called 'setup' is related to getting the UAC shield icon . I think something simple would be that I can put it in the app manifest to stop it? I'm not sure that it happens on Vista as I do not currently have access. / P> Rename is not an option and there is no alternative to shutting down the UAC, please do not recommend it! Edit: OMG. It seems that if any of the foll

c# - FluentNHibernate RTM and NHibernate.Linq -

I have a system running and that used Fluent NHibernate pre-release v0.0.1.0 NHibernate 2.1 .0.4000 and NHibernate.Linq 1.0.0.0. I just put the new Fluent NHibernate RTM dlls in and I've decided to change my code, but I'm having some problems depending on how I try to apply. 1) If I have been supplying NHibernate dll with FluentNHibernate, I get an error message that Fluent NHibernate targets a different version of NHibernate, although both are the same version number. The exception message is as follows: 'Assembly' uses FluentNHibernate, version = 1.0.0.593, culture = neutral, publicKeyToken = 8aa435e3cb308880 '' NHibernate, version = 2.1.0.4000, culture = neutral, public-token = AAA 9 52020989 FADB4 'which has a higher version than the referenced assembly' NHibernate, version = 2.0.1.4000, culture = neutral, public-token token = AAMFFFX 777DFDB4 ' 2) If I have the NHibernate DLL Has been supplied with FluentNHibernate RTM, then my address

asp.net - Inline form editing on client side -

I think some web sites use dynamic forms to edit a set of data (I'm sure How to call them!). For example: A group of data such as data, last name, city, country.etc, when the user clicks on the edit button, instead of postback, a form to help 2 text boxes + 2 comboboxes, dynamic form Opens to edit from, and then when you click the save button, the editing form disappears, and all the data updates. Now, I know what happens here is using some javascript for Ajax and DOM manipulation for server calls. I also get some jquery plugins for editing text boxed. However, I could not find anything for the full implementation of the farm field. So I call it jquery ajax on asp.net and manually implemented it. Here is my process: 1) When the Edit button was clicked: To get the required form.aspx call an AJAX server 2) Editable form with this assigned values Returns the field. 3) When the Save button is clicked: Formupdateprocess.aspx Call AJAX on server to retrieve the page. It basically

sql - basic oracle question -

मेरे पास यह प्रश्न है: select.lecgrouplecture (l.groupcode) व्याख्यान का नाम, Total.lecgrouptime (l.groupcode) total.lecgroup l से lecttime जहां शब्द = (कुल से कुल शब्द चुनें। CURENTTERM) और rownum & lt; मैं जानना चाहता हूं कि total.lecgrouptime (l.groupcode) क्या है, और यह जानकारी कहाँ से प्राप्त है? कुल पैकेज का नाम है लेक ग्रांप्लएक्लचर उस पैकेज के भीतर एक फ़ंक्शन है देखो कोड के लिए user_source में या SQL डेवलपर या TOAD जैसे एक GUI का उपयोग

c# - Nested Masterpages and .FindControl -

On one site, I'm using only one level masterpiece and in that one page using that master, I I can do this. To access Master.FindControl ("controlName") control. works fine. However, using the same code on the site containing two masterpap levels. Main Master and Specialist, who is Chief Master in Master Master. Therefore, returning empty for FindControl object, on a page using specific master. When I set a breakpoint and see the page. Mester, this is showing a typical master and the typical master is showing the mastermind as the right owner, but FindControl is still unsuccessful. When I look at the source in IE, the control is properly named, no .net mungbean is running. Any ideas here? TIA! When you're nesting master pages, you will get an additional container "content" Which you need to see. As a result, if you are trying to use FindControl from a given child page, then the general approach affects: label myLabel = (label ) This.Ma

sql - What indexing implemetations can handle arbitrary column combinations? -

I am developing a little data warehouse system with a web interface where people can now filter filtered searches There are about 50 columns that people might want to filter, and about 2.5 million lines. A table scan pain is slow. The problem is that the queries that I'm getting are not having any normal prefix. I am currently using sqlite3, which will only use one index if the column is needed, then the left column in that index. This means that I need many indexes, a quick look at MySQL shows that many types of indexes will also be required for this type of query. My question is whether indexed implementations are available for different database systems, which can handle such queries on the arbitrary combinations of columns? I have prototyped my indexing scheme; I am collecting additional tables that round the primary key in my big table, where each value is for each column, and I have enough data to check prices with the lowest number of matches first. It works fine;

c# - Linq Compound selection -

How do I add an array during the combined selection ( without using the union ) ? (The question was said in the interview.) var num1 = new int [] (12, 3, 4, 5}; var num2 = new int [] (1, 33, 6, 10}; I tried var pair = num1 to select num2 in num2 new {joint = {a, b}}; Required: Required Combined {12,3,4,5,1,33,6,10} number 1. concat (num2); I'm not sure any related LINQ keyword is. < / Div>

Variable number of parameters in function in C++ -

How can I have a variable number of parameters in my function in C ++? Analog C #: public void Foo (params int [] a) {for (int i = 0; i & lt; a.Length; i + +) Console. WrightLine (a [i]); } Public Zero useFoo () {Foo (); Fu (1); Fu (1, 2); } Analog in Java: Public Zero Foo (int ... a) {for (int i = 0; i & lt; a. Length; I ++) system. Out.printlean (a [ii]); } Public Zero useFoo () {Foo (); Fu (1); Fu (2); } This is called the list of Wikipedia. In order to be functionally implemented in C programming language, a standard header file should be used. The old varargs.h header has been deprecated in favor of stdarg.h in C ++, the header file cstdarg should be used. To create a variadic function, an ellipsis ( ... ) should be placed at the end of a parameter list. Within the function, a variable of type va_list should be defined. , va_end (va_list) macros va_start (va_list, last set param) , va_arg (va_list, cast type) can be used. For example:

javascript - Is jquery ":contains" selector accepts this kind of value "Banking and Finance"? -

I have problem in jquery in it seems that it accepts only one word. No phrases or two words. Example: $ ('# div: happens (' word ')'); - & gt; It's OK $ ('# div: happens' (' just another word ')'); - & gt; It will return empty / this match will not be Do you have any experience with this kind of problem? Your answer is very much appreciated. For example: "post-text" itemprop = "text"> What you need to do is to use double quotation marks (instead of those single ones). Wrapping quotation to the whole selector), for example: $ ("P: happens ('John Riesg')"); This will select the right paragraph, inside the string with 'John Raisig' or you can reverse it: < Code> $ ('P: happens ("John Riches"); Or you can use an outdated escape: $ ('P: contains (\' John resig \ ')');

Complex webapp deployment script: Shell too limited? -

I inherited some release scripts which are prepared and deployed PHP webapps on nearly 20 servers, scripts are written in shell And I personally find some problems to keep them. They may have to do this with the way they are written, but I see that someone has opinions or experience to confirm this idea that I can try to do it in a stronger language . It is common in scripts written in the shell, but does it appear that it is produced in hardness than using a language which is read more easily and has better error handling facilities? Collect and compile JavaScript and CSS Upload static content to a CDN Check the code and select it Removing remote webserver Clear old directories on the webserver Remote machine Reporting success or issues Send Dynamic Summary Email for Is it just me or what kind of writing and shell? Naye kept? I have not actually played with PHP as command interpreter, but I'm thinking of doing this in PHP to match the project language. Anyon

spam prevention - Would this anti-spambot method work? -

I'm not familiar with how spambots work. I had an idea on preventing Spambots and should know whether it will work or not. When a user registers, instead of sending a confirmation email to their email address, a link will be shown to the user after the form is completed. The user must click the link to complete the registration. Now, I will ask that this will not work because I do not know that submitting the form after submitting the Spambot form. If they actually follow the link after a form, which is about dynamically putting a link through jquery in the dom, so Yuri will never be in the DOM and ideally , The bot will not be able to follow it. The suggestion to change DOM dynamically is because it Effectively "screen-scraping" hard work "However, most modern spammers and more commonly, the crawler has started embedding JavaScript interpreters and other modules from the normal web browser, not to mention all the dynamic changes (AJAX, Jquio -Tip

c++ - Difference between A* pA = new A; and A* pA = new A(); -

In C ++, what is the exact difference between the following dynamic object creations: A * PA = New A; A * PA = New A (); I did some tests, but it seems that in both cases, the default constructor is called and only this. I am looking for any difference in performance ... thanks If A is a POD-type, then New A will allocate a new A object but leave it with an indefinite value, otherwise New code will be new default initialize new object. In all cases, new A () start the value new A object. This is clearly different behavior for POD types, but non-POD affects non-union class types without an experiment declared constructor. Example struct A {int a; Std :: String S; }; A is a non-POD class type without a user-defined constructor when a A is default starting which is defined defined constructor which calls the default constructor for s (a non-POD type), but A is not initiated . When someone is A the value is initially , because its

javascript - Adding script JS in HTML problem -

Can someone reply to me why this problem is? My site works only in Chrome with the following code, at IE 7/8 and Firefox only shows me the background: gt; Top & gt; & lt; meta http-equiv =" content-type "content =" text / html; Charset = ISO-8859-1 "/> Title of the site & lt; / title & gt; link href =" css / styles.css "rel =" stylesheet "type = "Text / CSS" /> <script type = "text / javascript" src = "js / jquery-1.3.2.min.js" /> & gt; script type = "text / javascript" Src = "js / functions.js" /> & lt; / head & gt; ... </code> </pre> <p> and this code works in Chrome, IE 7/8 and Firefox : </p> <pre> <code> & lt ;! DOCTYPE html public "- // W3C / / DTT XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "> gt; html xmlns =" ​​http://www.w3.

javascript - jQuery cache XML -

I am trying to create a portfolio site where my pieces remain in the XML file I stored the XML DOM in the javascript variable So that I can access it every time a user clicks to load a new piece without having to call the server. I have it now: $ (document) .ready (function () {xml = getXML ();}); Function getXML () {var data = $. Ajax ({url: '_lib / xml / portfolio.xml', datatype: 'xml', success: function (data) {return data;}}); Return data; } While using firebug, if "console.log (data)" in anonymous function after "success", then it logs "document". If I "console.log (xml)" .ready ... "in" $ (document), it logs an XMLHTTPRequest and I can not access the DOM of the XML document. I have tried "data. ResponseXML" is returning but it does nothing, I have tried to do a non-anonymous work after "success" and here is the XML logging, and It still comes in the form of a "document" w

objective c - iPhone Key-Value Observer: observer not registering in UITableViewController -

हाय मित्र iPhone डेवलपर्स, मैं एक अनुभवी सॉफ्टवेयर इंजीनियर हूँ, लेकिन आईफोन प्लेटफॉर्म के लिए नया है। मैंने सफलतापूर्वक उप-वर्गीकृत दृश्य नियंत्रक कार्यान्वित किए हैं और दृश्य नियंत्रक स्टैक पर माता-पिता / बच्चे के विचारों को धक्का और पॉप कर सकते हैं। हालाँकि, एक दृश्य नियंत्रक को अद्यतन करने का प्रयास करते समय मैंने एक समस्या को तब देखा है जब किसी ऑब्जेक्ट को बाल दृश्य नियंत्रक में संपादित किया जाता है। बहुत असफल प्रयोग के बाद, मैंने कुंजी-मूल्य पर्यवेक्षक एपीआई की खोज की, जो ऐसा करने का सही तरीका था। मैंने फिर अपने मुख्य / माता-पिता दृश्य नियंत्रक में एक पर्यवेक्षक को पंजीकृत किया, और पर्यवेक्षक में मैं दृश्य पुनः लोड करने का इरादा रखता हूं। विचार यह है कि जब वस्तु को बच्चे के दृश्य नियंत्रक में संपादित किया जाता है, तो इसे निकाल दिया जाएगा। हालांकि, मुझे लगता है कि पर्यवेक्षक को पंजीकृत नहीं किया जा रहा है, क्योंकि मुझे पता है कि संपादन दृश्य नियंत्रक (मैं इसे डीबगर में देख सकता है) में मूल्य अद्यतन किया जा रहा है, लेकिन अवलोकन पद्धति को कभी नहीं बुलाया जा रहा है। < P>

Filter out rows by hardcoded list in MySQL performance -

I have a hardcode list of values ​​such as: 1,5,7,8 and so on. And I have to filter the rows from the table, which is in the list given above, so I do something like this: Choose from myTable m * TTR_ID = MID where not in MID (1,5,7,8 ...) But when I have other values ​​(like 1000) and more rows (100) And in other tables. The query starts slowing down. I have an index on REF_ID and ID. It seems that "where MID (1,5,7,8) problem Is there a fast way to filter rows from the hardcoded list of values? < Add other TL to myTable M LEFT from your list in the temporary table temptable.ID and pre> SELECT * on T.Ref_ID = MIID Include disillusionment on MAID = examinative. ID where tempting. ID is Zero

SQL: Alias Column Name for Use in CASE Statement -

Is it possible for the column name of the name and then use it in a case statement? For example, select as the case of col1, when a = 'test' then 'yes' in the form of the END table; I am trying to surname the column because in reality my case statement programmatic will arise, and I want the column to be in the case statement with the second to be specified in SQL Instead of using the parameter in the program I think mySql and MsSql will not allow this because they will try all the columns in the CAE section Find the columns in the WHERE section as tables. I do not know what you are talking about, but I think you can do anything like this in DBMS: SELECT *, in case When a = 'test' then 'yes' as the value of the value (select 1 as a table from 1) q

Proper design a Model-Controller in Cocoa? -

I am trying to design a simple cocoa application and I want to understand a clear and easy software architecture. Of course, I am using a basic MVC design and my question relates to the model layer. For my application, the model shows data received on the Internet with an XML-RPC API. I am planning to use core data to represent local data. How should the data initially be loaded? I am reading the Coco Design Pattern book, and they talk about the model-controller which is focused on the model. How will this be done? Thank you! Your question is open to a type of open, so I would like to take you something for me The poorly built application is going through the process of redesigning. The idea for your model is quite simple: Create a data model (involves involving your units, their properties and relationships). Place the code to create managed object contexts using the data model created in step 1. Obtain data on the Internet and create NSManagedObjects based on your

Silverlight datagrid grouping/sorting behavior -

Given a Silverlight 3 datagram, which is a closed group, when click on a column header and type the row type If started, all closed groups are open to show off their content, is there any way to stop them from doing so? I am using Silverlight 3 with the July 2009 Toolkit. I have written an extension method for DataGrid: public Fixed Zero CollapseAllGroups (this datagrid datagram) {dataGrid.Dispatcher.BeginInvoke (delegate {var cv = itemsGrid IconsAsourceSource as IcAlexAction electricity; if (CV! = Null & CV group! = Null) {foreach (Collection Viv in CV Group) Groupname) {dataGrid.CollapseRowGroup (group name, true);}}}); } In my case I hook it to the DataLoaded event of the underlying DomainDataSource.

C# SQLite error Insufficient parameters supplied to the command -

I get an error in the SQLite error command given enough parameters given during running an inclusion statement in my program Are there. However, I've got it compressed down only if I will try to insert data into two different tables in succession. Which means that I incorporate the data into one and all the items are deposited in this method, because I am using the statement of use. If I insert data into a table stop debugging, then reconstruct my solution and then insert it into another table, then this error will not arise. Anyone have any ideas? Like I said that everything is explained in the use of statements, so I do not know what is happening in memory. Here's my method: Public static zero SQLiteTableINSERT (string (SQLiteConnection Conn = new SQLiteConnection (SQLiteConn.Conn)) {(SQLiteTransaction sqliteTrans = Conn.BeginTransaction () ) Using {SQLiteCommand CMD = Conn.CreateCommand ()) {cmd.CommandText = PrepareInsert (tableName); (INTI = 0; I and LT; local

php - Incorporating Open ID with my current login System? -

I am currently installing OpenID certification on my website and I'm having difficulty with my current login system and database is. .. I wrote this article & amp; It recommends this type of table to store open-end information ... create table user_openides (open-end_versal varchar (255) not tap, primary key (openID_arunl), user_id int tap , Index (user_id)); This is my current user information table Userid (primary) | Username (UNIQUE) | Password | E-mail Usage is used to refer to user-details for comments, ratings, etc. (This goes as a user identifier in the table of comments and the rating table) I want a system that uses stack overflow which logs using your open ID And this gives you an anonymous (open-end provider) display name .... while my existing login system has been seamless. 1) How can I add users' open ID details in my existing user-information table without affecting the current login setup? 2) Currently I use User-Id to store the sessi

kernel - How to create a "Block device" in Windows -

For people familiar with Linux, it is possible to create a module and register it as a block device. This allows the user to mount it as a regular disk (whereas all block I / O is controlled by the module, for example USB-MastStorage). Is there a way to do this in windows? (Windows needs to create a volume. Raw data will come from the interface with justification.) Thanks The easiest way (and this is not easy!) Is to write one, you can do it also with KMDF. The latest issue of the "NT Insider" of the OSR is an article in how to do this, but it not is going to be easy anyway You will learn a ton, though, So if you are interested in kernel development, then this is a good way to start!

How to display floating-point numbers with a mantissa set to zero in C++? -

The following code shows floating-point numbers in scientific notation: float foo = 1.0 ; :: Court :: setf (:: std :: ios :: scientist); :: std :: cout & lt; & Lt; Foo; This produces this output: 1.000000e-000 What I would like to do is display floating Point numbers in a specific notation that are similar to scientific notation but set to zero with one Manthissa. With the same floating-point number above, it will be produced: 0.100000e + 001 In C, I believe it will be written like this : printf ("% .6E", FU); Update: OK, I do not really know how to do it in C. Update 2: An example using iostream formatting was incorrect. I modified it according to Michael Bore's comment. If you want to do this with ostreams, then I think using 'aspects' It will be required that this small part of C ++ lets you control too much formatting, but you like it. Here is a description of num_put , which formats the numbers you did not like, suc

Ajax.BeginForm - Displaying Validation Errors -

Using the MVC project template in VS2008 (outside the box) I noticed the following: li> Register. Aspx form is specified. using & lt;% (Html.BeginForm ()) {%> Selecting the Register button without providing any account information shows it. Account creation was unsuccessful Please correct the errors and try again. • You must specify a username. • You must specify an email address. • You must specify a password of 6 or more characters. I have changed the Register.aspx form for this. & lt;% usage (Ajax.BeginForm ("Register", New AjaxOptions {HttpMethod = "Post"})) {% & Gt; Selecting the registration button without providing account information does not show an error. Q: How do I get error text to display when using Ajax.BegginForm? Registry action and ideas must be modified to successfully implement AJAX form submission By default, In the case of error, this action only gives the related register.aspx view. The

vim: delete display lines instead of physical lines -

When the wavy lines between the regular movements such as J & K, jumped from a physical line to the next suggested mapping such as "NormMap Ji GJ "will move the link to the display lines rather than the physical line. Although there is at least one problem with this approach, for example, the DJ will remove two physical lines in place of two display lines. Is there any way to fix this? DD and yy: : nnoremap dd g0dg $: nnoremap Yy g0yg $

iis 7 - Php not reporting any errors on IIS7 -

I am developing a PHP application using our XAMPP setup as a test server. Once the app is ready to deploy, I have to upload it to the customer's server, The problem is that the client's server is running IIS7, and every time When a PHP error occurs, it displays an empty page ... Now, in my app, the error_reporting (E_ALL) is already set, and I'm php Do not have access to the ini file (why not ask!) ... and I have been found for error_reporting () here: M Have tried every combination of bills, can someone tell me some other way of showing errors? btw: I am using codeigniter, and I have tried error_logging functions do not provide it ... It is probably good to turn it off on the production server. You can always turn error logging on, if they will give you access to the log file. But for quick correction, you can only turn display_errors on. Just remember to turn it off and set logging upon completing the code configured to run on the client's s

merge - how to identify branches that need to get merged in git -

I create lots of bugfixes and feature branches and in the end, they are all mixed with a single release candidate (RC) is. But when I examine RC, I am not sure if I have mixed in all the branches, how can I find out which branches are missing? I tried Gikata, but it seems that only those branches which are already merged in the branch which I am doing. But I am interested in those branches which are not merged. All branches in Gitub ("Network") have a good display, but it always remains behind, so it is not as useful as it can be. Use gitk --all to view all branches. In addition, if you are on Windows, then I recommend instead of gitk . It has a better rendering algorithm of the CATS graph.

jquery - How to style alternating rows in asp.net mvc -

I use a & lt;% foreach ...%> loop for the list of items collection on my website I am here. I want to add a different background color to the style of the optional rows in my list. I have found a way to do this but I am not satisfied with it because it sounds like a hack. Even I have solved it so far: & lt; Table & gt; & Lt;% int counter = 0; Leading (different items in the model) {counter ++; If (counter% 2 == 0) {%> & Lt; Tr class = "colorfull" & gt; & Lt;%} Other {%> & Lt; TR & gt; & Lt;%}% & gt; ... Am I recalling that people are using ASP.NET MVC for this scenario? I got the JPIT code of this code, which I find very clean. $ (document) .ready (function () {$ ("table tr: nth-child (strange)"). AddClass ("colorfull");}); I have removed counter logic, this JQuery script adds DOM to set the second class of the CSS class in the foam loop.

c - What is a neat way of breaking out of many for loops at once? -

Suppose that in an in-loop, on the event of an incident I would have to break out of three or four nested for loop at one go . What is a clean way to do this? What do I do flags like this: int i, j, k; Int flag1 = 0; Int flag2 = 0; For (i = 0; i & lt; 100; i ++) {for (j = 0; j & lt; 100; j ++) {for (k = 0; k & lt; 100; k + +) {If (k == 50) {Flag1 = 1; Flag2 = 1; break; }} If (flag 1 == 1) break; } If (flag2 == 1) break; } I do not think this is particularly clean. How do you accomplish the same thing? (w / o jumps) Use goto It is clear and simple.

ruby on rails - permissions for running passenger on OS X 10.6 -

I'm not sure how to set permissions for passenger on OSX. I have set up well, but now I understand that the passengers who are the owners of the environment. RB is my own user and group, it is apple & amp; Apple. As I understand it, Apache _www & amp; Amp; _world Wide Web. What is the right strategy here? Suppose that is on the app / user / apple / documents / projects / my_rails_app I'm assuming that I do not set the owner and everything group in that path. . And I do not think I can run Apache as apple; Apple, is not it? Is it a matter of putting yourself in the _www group? = "Text"> The app will run as the user has Config / environment.rb is The root user can be discouraged and may break.

multithreading - MutliThread or Multi Lists? -

As I have seen, the theme does not recommend more than 200 threads for the server machine, I am trying to implement the listener's class which listens to 1000 devices, I mean that 1000 tools send different types of messages in that application, I have 2 different methods Have tried 1. Each device has a ready-made pouch for runtime and dynamic inventory, which can be used for it. Keep the device and start the thread for processing those messages from the list but not making my machine thread more than 50 :) :) And I believe in its bad idea ... < / P> I created 10 separate lists which contain 10 different types of messages and for that list I have 10 processor threads, which go to the list related to its list And process the message and remove it But here's the problem, I say that I get 50 messages from 50 devices in list 1, its processor thread's final message of list 1 (50 V). ), Its time will expire 10 seconds Any ideas for the best architecture that ta

Does mySQL Replication: Master DB Name has to be the same as the Slave DB name? -

I named Master DB MDB & amp; In Das server I set to repeat-do-db = sdb & lt; - It was not working? But when I set it as the same DB name then it works there to setup 1 Master DB with 2 different slaves, but there is no solution in the same server ?? You need to specify options: - repeat- Rewrite- db = to_name- & gt; To_name tells the slave to translate the original database (that is, one selected by the US) to_name in if it was from_name from the master only Tables contain statements are affected (not the statement such as CREATE DATABASE, DROP DATABASE, and ALTER DATABASE), and only when the_name is the default database on the master. This does not work for cross-database updates To specify multiple rewrites, use this option multiple times. The server already uses one that matches that which matches it. If you are replicating only a few databases, you will need to specify. Note that after the name change operation implemented by replicate-rewrite-db :

C#, XML to Class DeSerialization Question -

मेरे पास निम्न XML स्निपेट है: & lt; dmFiles & gt; - & lt; dmFile dmUpFileGuid = "dmFileDescr =" testcase01.pdf "dmFileMetaType =" मुख्य "dmFileGuid =" "dmMimeType =" pdf "dmFormat =" "& gt; अगर मैं dmFile विशेषताओं (उदाहरण के लिए: dmFileDescr) के लिए स्ट्रिंग गुणों के साथ एक जोरदार टाइप किए गए C # वर्ग बना देता हूं, तो मैं यह कैसे सुनिश्चित कर सकता हूं कि इन गुणों को मेरे सी # वर्ग में गुणों के लिए सीरियल कर दिया जाएगा? अपने वर्ग के सदस्य पर एक्सएमएल गुणों का उपयोग कर। [XmlAttribute ("नाम")] का उपयोग करें आपका कार्यान्वयन इस तरह दिखता है: [XmlRoot ("dmFile")] सार्वजनिक वर्ग DmFile {[XmlAttribute ("dmUpFileGuid")] सार्वजनिक स्ट्रिंग UpFileGuid {get; set; } ...}

java - Setting the generated source directory for annotation processors in Maven -

I am trying to move a build that generates a source by using Maven using an annotation processor. I have tried to configure the maven-compiler-plugin as follows: & lt; Plugins & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-compliant plugin & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; Fork & gt; True & lt; / Fork & gt; & Lt; CompilerArgument & gt; -s $ {project.build.directory} / target / generated-sources / annotation-processing & lt; / CompilerArgument & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt; but failed with Java [INFO] Compilation failure is a failure to execute javac, but could not parse error: javac: invalid flag: -s / home /robert/workspaces/betbrain/sportsengine.common/sportsengine.bean.test/target/target/generated-sources/annotation-process Usage

c# - recreate instance in base class -

I was wondering if it is possible to replace the example of any derived class of a derived class of a base class On the same basis, I will try to explain it in a code in the following. public class ValueTypeClass {private string _note; Private string _Name; Private node class refrenceNode; // ...} public class refrenceDBClass: valuetypeclass {// ...} public class refrenceFileClass: valuetypeclass {// ...} Now every time refrenceNode is changing I want To change the type of example based on the RefrenceNode properties, <1 p> Edit 1: Now I am doing such a class that keeps a description of refrencedbclass and refrencefileclass and every time refrencenode changes I am making Am a new example. public class ValueTypeClass {Private string _Note; Private string _Name; Private node class refrenceNode; Private Detail Class DetailsEfO; // ...} public class detailClass {// ...} public class refrenceDBClass: detailClass {// ...} public class refrenceFileClass: detailClass {// ..

BDD on Rails - Is the community more behind Shoulda or RSpec? -

For a new application, I want to start dubbing in BDD and I would like to use RSPC or Thotbot's Shia I am trying to make a decision. I like macros, which is used in China, and the fact is that Ruby / Rail test does not seem to change the way, but only offers one add-on. On the other hand, the macros Instead of being clear about how much testing they are doing, they seem like some "magic" (though I know by dubbing that it is troubling to write a dozen, "without xxx should be invalid" Micro liner a sample). Honestly I write specialties / tests for the model, trivial and almost bright to be easy to test, but I consider them very difficult for controllers because I'm not sure how to test or write it needed. If I am on the subject of joke and glamor, because I think they give you misconceptions (because you can only tell it that whatever data you need or that method to X ) And I know that RSPC heavily uses them both. I like the document which produces RSPCE

autotools - How should I run a prebuilt Makefile from a Makefile.am? -

मैं एक Makefile.am से prebuilt Makefile कैसे चलूँ? मैं automake / ऑटोकॉन्फ़ बिल्ड सिस्टम मैं के लिए autotools लागू कर रहा हूँ पैकेज के लिए एक दो पुस्तकालयों और प्रत्येक के लिए परीक्षण निष्पादनयोग्य है कुछ लाइब्रेरीज़ स्वयं निर्मित ASN1C कोड हैं जो प्रीबिल्ट मेकफाइल के साथ आते हैं। मुझे मेकफाइल.एम के अंदर जाने का सबसे अच्छा तरीका नहीं है "प्रीबिल्ल्ट मेकफाइल के साथ एएसएन 1 सी लाइब्रेरी बनाएं"। इस तरह से कुछ के साथ Google खोज करने का प्रयास थोड़ा अधिक कठिन है क्योंकि बहुतायत मेकफाइल प्रलेखन का। धन्यवाद, चेन्ज़ यह पूर्ण बिल्ड के लिए अपेक्षाकृत आसान है , लेकिन वृद्धिशील निर्माण के लिए बहुत कठिन है। यह भी विषय है कि क्या पुस्तकालय आउट-ऑफ-ट्री बिल्ड बनाता है। याद रखना महत्वपूर्ण बात यह है कि automake फ़ाइलों में नियम बना सकते हैं, तो आप लायब्रेरी बनाने के लिए नियमों का एक सेट बना सकते हैं, फिर उस बिल्ड के आउटपुट को कॉपी / कॉपी कर सकते हैं जहां आपको इसकी आवश्यकता है। लायब्रेरी बिल्ड के लिए एक निर्देशिका निर्दिष्ट करें। पुस्तकालय निर्माण प्रक्रिया को लपेटने के लि

select - Use a left hand value in right hand SQL comparison -

मेरे पास यह SELECT कथन है: SELECT SUM ( Dbo.DLData.Quantity) dbo.MasterDates से dbo.DLData MasterDates पर शामिल करें। [आईडी] = dbo.DLData.DownloadID जहां dbo.MasterDates। [दिनांक] के बीच @ और @ करने के लिए और dbo.MasterDates.SiteID = @ एक्स < / Code> यदि आप @from में प्लग इन करें, @to और @X यह काम करता है यह एक तुलना के दाहिने हाथ की ओर है हालांकि तुलना में @ एक्स को बाएं हाथ की ओर से आने की जरूरत है क्योंकि बाहर पर SELECT प्रत्येक SiteID पर परीक्षण कर रहा है सेट में इस खंड के बिना मुख्य खंड काम करता है उन्हें एक साथ जाना होगा उपरोक्त चयन बायीं तरफ, यहाँ पर पूर्ण चयन बयान है। अंततः दो वाले नियम एक साइट के प्रमुख उत्पादों को निर्धारित करेंगे। - SiteID में प्रोडक्ट्स का चयन करें SELECT dbo.MasterDates.SiteID के रूप में SiteID, dbo.DLData.Product ProductID के रूप में dbo.MasterDates JOIN dbo.DLData ON dbo.MasterDates। [आईडी] = dbo। DLData.DownloadID WHERE dbo.MasterDates। [दिनांक] के बीच में @ @ और। से ग्रुप को dbo.MasterDates.SiteID, dbo.DLData.Product हैव

java - How do I blur an image? -

I am trying to implement a blurring mechanic on a Java game. How do I create a blur effect on runtime? About / Google "Convolution Filter" Read, this is based on the values ​​of pixels around it But the method of changing a pixel value on the other, apart from blurred, you can also sharpen the image and line-search.

inline or databind expressions in ASP.NET -

This is a related question, but answers its own question. If I want to call server-side function inside of my DataIlist's My EditItemTemplate, give me & lt;% = ServerSideFunction (...)% & gt; or & lt;% # ServerSideFunction (...)%> ? There is a database running with the datelist after both work If you want to bind Data usage: & lt;% # ServerSideFunction (...)%> If you want to write (<% Response.Write ()%>) some use: & lt;% = serverside function (...)% & gt; ; Read this question:

WCF Between Matlab & a C# application -

I'm trying to communicate between 2 applications. 1 matlab application 1c # written application. C # application publishes its functions with Microsoft WSDL application which is non-standard and matlab can not understand it. Do you have any solution for this problem? Some applications that publish WCF functions in a standard way or some automated device that fixes it? A famous issue - In fact, Microsoft output is < / Strong> is standard-compatible, but most other systems do not support it: -) Check out these WCF extensions that allow you to include XSD to "flatten" your WSDL Will inline & lt; Wsdl: schema & gt; That helps! Mark

php - Interested in Grabbing XBOX Friend's List -

I would like to get the list of Xbox friends for a certain gamercard () and display it in the widget for my site. I know that there are plenty of iPhone apps that do this, but I want to do it on the web without any iPhone. Does anybody know about PHP class or either login.com to login.com in live.com so that I can scribble details or if there is any RSS feed anywhere I I can use Any help would be greatly appreciated! Thank you. Clown on Microsoft xbox 360 screen scraps If you scrap too much data, you can block your IP (though, I do not know how it is explicitly forbidden by the terms of service or how the IP address is actively Is blocked; may be ). Most Xbox.com is a community XML AM for Gamer Data , but it is not available to the general public, to reach the API, you have the Xbox Community Developer Program (XCDP ) Need to be a member. Membership is free, but I do not know that the program is still accepting new members, and I do not know that there is a public we

authorization - HTTP Preauthorization -

I have a form that asks for the user and password (authentication). After user post (hits ok) I want to redirect the user who uses basic apache of apache. It happens that the way users and passwords are typed, they are really credentials for certifying me who want the solution so that the user can not be asked for a password at another address. So far, I was able to pass "Authorization: Basic" Base 64_ encoded user and password with 'Curl' (using GET), and get the response I needed (for example, Test / Index.html's content) However, with this priority, there is a curl to get information instead of redirecting my browser. That is, if I type in the address bar, then the password will be repeated again. No idea? Any explanation is necessary? The problem is that the authorization status is kept in the browser And there is no reality. It is authorized to tell the browser. Most systems rely on cookie system, but the original / dig is the EST HTTP or HTP heade

java - ClassCastException when eclipse "fixed" my code -

I get a classcast exception when Eclipse suggested that my code should be such .. I have a class called class. Arreelist & lt; Cort & gt; Corat = new arreelist & lt; Cort & gt; (); Then I use toArray () , and Eclipse suggests that it should look like: Kort [] array = (Kort [] ) Kort.toArray () ; But this gives me the exception: Classcast exception! : ( What can you do: Kort [] Array = kort.toArray (new cort [kort.size ()]); This is considered to be better, because it keeps type protection on the array. If you do not care / If you want to ignore the suggestion, without the parameters, the toArray () method returns an object [] array.

Can I fix corrupt Visual Studio 2008 toolbars/windows without having to reinstall? -

I think my local Institution Visual Studio 2008 bit scooter has gone. When I'm debugging, I'm unable to see "Watch" windows - I'll see it on a click, but then it disappears. No one wants to stay where it is considered - "clock 2" window will want to stay on another monitor, there is not one or two or none of them, etc. Now the area of ​​large brown in the bottom of the screen which changes every time I change the Alt + Tab , in any VS2008 without any leak Does a good way of "recovering" or resetting to do a re-install? Two things you can try: 1) Window menu - > Reset window layout or 2) Close the Visual Studio, and then delete the .suo file in your project folder. Reopen your project and all settings should be reset. This is a studio user option file. If you do not like the result, you can make a backup copy of it.

flex - Deep Nested XML -

I am trying to display a list of items in the datagrid from XMLList. & lt; Chain no = "1" & gt; & Lt; File & gt; & Lt; Filenum & gt; 1 & lt; / Epnum & gt; & Lt; Prodnum & gt; 4V01 & lt; / Prodnum & gt; & Lt; Title & gt; Series # 1 - File # 1 & lt; / Title & gt; & Lt; / File & gt; & Lt; File & gt; & Lt; Filenum & gt; 2 & lt; / Epnum & gt; & Lt; Prodnum & gt; 4V02 & lt; / Prodnum & gt; & Lt; Title & gt; Series # 1 - File # 2 & lt; / Title & gt; & Lt; / File & gt; & Lt; / Series & gt; & Lt; Series no = "2" & gt; & Lt; File & gt; & Lt; Filenum & gt; 1 & lt; / Epnum & gt; & Lt; Prodnum & gt; 4V01 & lt; / Prodnum & gt; & Lt; Title & gt; Series # 2 - File # 1 & lt; / Title & gt; & Lt; / File & gt; & Lt; File & gt; & Lt; Filenum & gt; 2 &a

c# - DataTable, How to conditionally delete rows -

I am busy with learning the C # and it is still going well. I still say my first hit "What?" moment. The DataTable not only gives the random line access in its line archive, through the behavior of normal collection but also through datatale. Although I may not be able to avoid this ability DataRow.Delete. So far it seems that I need to do this to remove one or more rows from a table conditionally. int max = someDataTable.Rows.Count- 1; (Int i = max; i> = 0; -i) {if (int) someDataTable.Rows [i] .im [0] == some value) {someDataTable.Rows [i]. BeginEdit (); SomeDataTable.Rows [i] .elete (); } And break; } SomeDataTable.AcceptChanges (); But I'm not happy with this code. Neither do I believe that I'm missing something. If I have to remove one or more rows conditionally, should I really be forced to hit the row collection sequentially? (Do not count against it. I am removing the data from the end.) You can query the dataset and then loosen the select

python - Twisted: tcp server with push producer example? -

I want to put ordinary TCP server together using Python and twisted. The server starts and waits for the connection - I already have a client - a non-python application. After the connection becomes established the server starts sending data at some intervals (like 1 second) . The server reads the data from a fixed file (one record at a time), I should be able to understand this part. I think that after connecting the customer I will use the push maker to start pushing the data. I have a simple TCP server with a manufactory and I can react to the connection / data received and therefore why plug in push producer . Anyone know of any example that the push producer is twisted with the TCP server? What about some simplified things: < Code> thedata = '' 'Questa Matina mill son Swangelieto o Bela Siao, Bela COO, Bela Ciao, COO, COO Quana Matina Mil's son Spaglieto ho troweto attacker! '' '.' STEPTILLIN (True) Push (protocol proto

sql - mysql performance -

I am testing MySQL as a replacement for SEL server and I'm really talking something funny. I am testing and reading both inserts, and maximizing 50 questions on each side. My exam table looks like this: If empty tab 'webanalytics' .`test`; Table 'webanalytics` .` Test` (`ID` int (10) unsigned filtered etensement,` name' varchar (45) null, primary key (`id`)) engine = InnoDB autentrate = 1001 default charge = UTF 8; and my C # exam program looks like this: using the system; Using System.Collections.Generic; Using System.Linq; Using System.Text; Using MySql.Data.MySqlClient; Using System.Diagnostics; Namespace Console Application 1 {class program {const int QUERY_COUNT = 1000; Const string CONNECTION_STRING = "server = localhost; database = web analytics; uid = root; pwd = root"; Static zero main (string [] args) {(var db = new MySqlConnection (CONNECTION_STRING)} {db.Open (); (Var cmd = db.CreateCommand ()) by using {cmd.CommandText = "t

crystal reports - Is it possible to make a TABLE PARAMETER in CR? -

I want to ask, is it possible to rename the table using the table parameter settings? But column names are included in both tables. Example: Table 1 (Daily Registration) Table 2 (Dreig) PS: Both tables get the same column name, just changed the name of the table (Dreg) choose from * ???????? I'm not even sure what you mean by table parameter, but the crystal parameter is used to report It is not possible to do this as one of the tables in the source. You can only write this effect either by setting your own application to set the data location or by using a stored function or as a parameter with the table name Can get only.

debugging - How to debug a program without a debugger? -

Interview question - Once you have trouble with your code, debug the program It is quite easy. You can keep clocks, breakpoints and so on. Life is very easy due to debugger. But how to debug a program without a debugger? A potential approach that I know, you are putting print statements wherever you want to check the problems in your code. Is there any other way other than this? As a general question, it is not limited to any specific language. So please share your thoughts so that you do it? Edit - When submitting your answer, please refer to useful resources about any concept (if you have one) such as logging it is very helpful for those people Who will not know about it at all. (It contains me in some cases :) Update: Michal Zanjaner created a real "best" answer and also a community wiki. In fact, lots of votes are entitled. Actually you have a lot of possibilities, either with the recombination of the source code Or without With re-organi

javascript - Building value of a variable by looping through form fields -

It comes to AJX / JS, and specific method (functions) / functions S) I seek to achieve this task I am doing Please be bare with me if you have been asked about time after the time of similar questions, and I hope you have enough information here to help you find the right answers. Outline I am currently creating a form for a specific page, where users can suggest suggestions about the content of the Amani page. Are there. This form is displayed inside the model dialog box, and allows the user to take their suggestions without page. Of course, I am preparing a code for reuse - write once, use a lot of people - provide a uniform method of form design and deposits without writing the code anywhere on the site Please. Environment The site is hosted on the IIS6 server, pages are in ASP, and sending form data < Strong> problem The Model Talk Box works as a behavior, and uses to submit from within the model. Nett uts + script It is designed in such a way th

Advanced Routing Behaviour with ASP.NET MVC Routing -

एक यूआरएल को देखते हुए जो निम्न प्रकार का पालन करता है: प्रथम रंग = {value1} / secondcolor = {value2 } जहां value1 और value2 भिन्न हो सकते हैं और एक एक्शन विधि की तरह: प्रोसेसर (स्ट्रिंग रंग 1, स्ट्रिंग रंग 2) में कहें कि नियंत्रक को कॉलर कंट्रोलर कहते हैं। I निम्न मार्ग मूल्यांकन करना चाहते हैं: यूआरएल '/ प्रथम रंग = लाल' परिणामस्वरूप कॉल में प्रोसेस कोलर्स ("लाल", रिक्त) / यूआरएल '/ सेकंडरॉलर = ब्लू' प्रोसेस कोलर्स (जैसे कॉल में) नल, "नीला") यूआरएल 'प्रथम रंग = लाल / दूसरा रंग = नीला' प्रोसेस कोलर्स ("लाल", "नीला") जैसे कॉल में समाप्त होता है अब से मुझे लगता है कि यह प्राप्त किया जा सकता है कुछ मार्गों के साथ, ऐसा कुछ मार्ग। नक्शा (रूट, "प्रथम रंग = {रंग 1} / दूसरा रंग = {रंग 2}", नया {नियंत्रक = रंग नियंत्रक, क्रिया = प्रोसेस कोल्सर}) मार्ग .MapRoute (नल, "प्रथम रंग = {रंग 1}}", नया {नियंत्रक = रंग नियंत्रक, कार्रवाई = प्रोसेस कोलॉर्स, रंग 2 = (स्ट्रिंग) नल}) मार्ग। मार्कर (नल, &q

c - Valgrind: Deliberately cause segfault -

This is a crazy hack , but I deliberately trying to cause a segfault specifically Indicate in the execution, Valgrind will give me a stack trace. If there is a better way of doing this, please let me know, but I still want to know how deliberaly is a segfault cause, and why my attempt does not work. This is my failed attempt: tall * ptr = (long *) 0xF0000000; Ptr = 10; I thought valgrind should at least choose it as an invalid writing, even if it is not a division violation. Valgrind does not say anything about it. Any ideas why? Edit Responses were accepted, but I still have some up-votes < Div class = "post-text" itemprop = "text"> Do you have a * similar to * ptr = 10 ? You will not have a compilation. If this happens then surely there will be no mistake, because you are just specifying a number. Dereferencing can happen. Understanding the space in a signfult on your OS result, the following should do the trick: Inline z

c# - DotNetOpenId - Open Id get some data -

I am using OpenID on a new website and am trying to get some basic information about the user , See the code below. Why are the following services inefficient? var myData = response Gate Extension & lt; Claim Reputation & gt; (); and the main code [System.Web.Mvc.AcceptVerbs] (Public Operations Logon) {var openid = new OpenIdRelyingParty ( ); IAuthenticationResponse response = openid.GetResponse (); If (response! = Null) {switch (response status) {case authentication status. Authorized: Form attestation. Redirectfromline page (feedback. Linked identifier, incorrect); Var myData = response.GetExtension & lt; Claim Reputation & gt; (); break; Case authentication status Canceled: ModelState.AddModelError ("loginIdentifier", "Login on provider was canceled"); break; Case authentication status. File: ModelState. AdoldArror ("loginindentifier", "login failed to use provided openID identifier"); break; }} See Return ("R

Facebook list sent invitations -

I am writing a Facebook application, which needs to save the UID to the user's friends they are inviting . To clarify: User_A is logged on to Facebook and using the app; To invite some of his friends he has a swan; The app will need to know who these contacts are I think I use the standard fb: multi-friend-selector Can not do, because there is no way to know who is being invited ... Maybe its a simple solution, but I can not find it: -) Thank you very much Andrea Currently supported to do this The way Returns the data as you go The script code is given when the user sends some requests You can take those IDs and request details from the API (in the request_ids parameter) of the object ID A comma separated list has been created. Personally or (preferably) batch - using one. Would you receive a response for an API call at https://graph.facebook.com/ [request ID]? Access_token = [APP Access Toucan] contains the following fields: ID, application, cr

file - How do I explain my colleagues that filenames should not contain uppercase characters or special characters? -

Which I know, is the best practice for file names like this: file_name.txt - or if you have the file name Want .txt Now some people think their files file names. Name or file names are .text or "filename .ttt" - how do they explain that this is not a good idea? Why is the name of the best practice already named? I only know a problem with uppercase of some file systems, and that URI should be only lowercase, to avoid confusion (in uppercase letters in Wikipedia, for example, for example) W. Well, there will be a problem with uppercase letters that some file systems (like NTFS) ignore them and Filename.txt and FILENAME.TXT as a single file, whereas other file systems (for example, I think that) are considered as 2 separate files. You have some context for the file that you have called file.txt, and the file reference reference file. File, then this will not be a problem on NTFS, but if you copy files into a file system such as ext, it is unsuccessful because t

sql - tsql function split string -

I wonder if someone can help me. I need a tsql function to split a fixed value as: 1) 00 is not specified 3) 01-05 Global WM and BB | Operations 2) 02-05-01 Global WM & BB | Operations | Operation n / a I need to get a result like this: cat1 cat1descr cat2 cat2descr cat3 cat3descr ------- --- ----------------------------------------------- ------ 00 not mandatory redundant nonsense nonsense 01 Global WM & BB 05 Operations Blank blank 01 Global WM & BB 05 Operations 01 Operations N / A The result is always 6 columns Choose funcX ('00 is not specified '); cat1 cat1descr cat2 cat2descr cat3 cat3descr ------------------ ---------------- ------------------------------ 00 Not Specified Null Null Null < P> This will work on SQL Server 2005 and SQL Server 2008. I have assumed that the sequence 1, 2, or 3 of the first digits of points has been set in groups. You can do it with less Cascading CTE but I think reading and debugging SUBSTRING /