Posts

Showing posts from May, 2011

asp.net - How to retrieve create statement for table from db in C# -

How to retrieve a statement from DB to the table in C #? I need to create a script file I can make a statement of the storedproc used but it can not be made for the table. Please help. This is not supported for tables, although a quick Google gives a script

mysql - Merge and then Delete duplicate entries -

I have my SQL database with some duplicate entries, they have the same area - phones but they have grounds too were different. For example, I have two entries with the same phone, but the rating in the first entry is the = default_value and the second entry has the rating field = 5. So I have to merge these entries and then only delete the duplicate ... More general examples: Entry 1.phone == 123 Entry 1.phone = = Entry 2.Phone entry1 Writing! = Entry 2.Phone Entry 1 Rating == Default_View (0) Entry 2. Riting == 5 Merge Entry 1.phone == 123 entry 1. Rating == 5 Entry 2 is destroyed It seems as if you were actually There is no need to merge any records if you are trying to update the first record with a non-default rating. I think you can delete any record with default rating. Select one * Join an inside TBL at tbl B on a.Phone = b.Phone and a.Rating & lt; B.Rating one from one TBL joining an internal tbl b on one. Phone = B Phone and A.Rating & lt; B.Rating If ...

css float - CSS - Faux columns with background color instead of repeating background image? -

Greetings, I have a two-column (vertical) layout where the column is required Like "look" they match the heights "small" column has a background color, and it is important to see that it is the same height as the main content column, which spreads to fit its contents. I know that it is relatively easy to implement this layout by applying the imagination of the back cover of two columns and clearing the float of the two columns below. Is it the only way to influence it, or is it possible to do this by applying a background color in the "low" column and using the repetitive picture? is a wrapper div with the same background color as its lowest-running diva. HTML & lt; Div id = "wrap" & gt; & Lt; Div id = "long time" & gt; & Lt; / Div & gt; & Lt; Div id = "shortDiv" & gt; & Lt; / Div & gt; & Lt; / Div & gt; CSS #longerDiv {background: # 9c9; } #wapper {backgr...

metadata - How can I read XMP data from a JPG with PHP? -

Support for PHP and EXIF ​​and IPTC metadata have been created, but I can not find any way to read XMP? . The following shows this process (I am using but every other XML API or even simple and clever string parsing can give you similar results): $ content = file_get_contents ($ image); $ Xmp_data_start = strpos ($ content, '& lt; x: xmpmeta'); $ Xmp_data_end = strpos ($ content, '& lt; / x: xmpmeta & gt;'); $ Xmp_length = $ xmp_data_end - $ xmp_data_start; $ Xmp_data = substr ($ content, $ xmp_data_start, $ xmp_length + 12); $ Xmp = Simple XMLload_string ($ xmp_data); Just two comments: XMP uses XML namespaces heavily, so you have to keep an eye on it, when XMP data will have to be parsed Xml tool Considering the potential size of image files, you probably will not be able to use it because this function loads the entire image in memory to open file-stream processing and key-sequence and lt; X: xmpmeta more data and lt; / X: xmpmeta> T...

.net - what is the best code generator for NHibernate? -

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

java - Avoid creating 'new' String objects when converting a byte[] to String using a specific charset -

I am reading from a binary file and want to convert the byte to a US ASCII wire. Is there a way to do this without calling new on new to avoid becoming more economically identical string objects in string string literally pool is? I am thinking that probably is not possible because it is not possible to use double code for the string object. Is it true? Private string throws the next string (datainputstream disk, int size) IOException {byte [] byteholder = new byte [size]; Dis.read (bytesHolder); Return the new string (bytesholder, charset forename ("US-ASCII")). Trim (); You must keep caching mapping byte arrays in strings, find again a new string Cache for any similar values ​​before making it You can do the existing string of interns with intern () as Ishai Posted by - which will not prevent you from more strings , But it will do all this but for the first time (for any four sequence) it was very short, on the other hand, all this specific string...

c# - Parse from a list with a quote in text -

I want to put these stars in a list, how can I do this? Hold-up is double "" , found in the first two rows. How can I work around this? scriptTxt = new string [] {"# $ language =" VBScript "", "# $ interface =" 1.0 "", "crt.Screen.Synchronous = true", "sub-head "}; scriptTxt = new string [] {"# $ language = \" VBScript \ "", "# $ interface = \" 1.0 \ "", crt.Screen.Synchronous = True "," Sub Main "}; or scriptTxt = new string [] {@ "# $ language =" "VBScript", @ "# $ interface =" "1.0" "", "CRT screen. Synchronous = true", "sub-main"} ;

asp.net - How to prevent InvalidOperationException with XmlDataSource in medium trust for the same domain -

I'm using an XmlDataSource to bring an RSS feed on the same domain From my ISP went into moderate faith, that system has failed with the system. Unknown Operation Exception Is there any way to fix this? After reading a forum post on the forums of my ISP, it seems that I can whitelist For your data source url will ask for it. That's what I did.

jquery load function -

मैं निम्नलिखित कोड लिखें & lt; script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# disp')। लोड ('index.php', function () {$ ('# lobar')। Hide ();});}); & Lt; / स्क्रिप्ट & gt; मुझे पृष्ठ पर लोड पर index.php को नामित डिवेल में लोड करना है: dis धन्यवाद

Why in JPA EntityManager queries throw NoResultException but find does not? -

Can you please tell me why an object will be found in the JPA 1.0 Entitierer in JPA 1.0 Entitleer, then dealing with useless Will happen. If not found, but using the query interface through the query, getResultList has not found the NORSALT expedition. Maybe I'm missing something, but I think it is very incompatible with one language, and in fact I had to do a lot thanks guys. Questions can be used to get almost anything including the value of a single column in a row is. If getSingleResult () , could not you tell whether the query did not match any row or whether the query matches a row, but in the selected column Value is zero as.

wpf - MVVM: Editing a Customer. How to find a workspace with the same object and to create a new workspace from another workspace -

Just like, I am using MVVM and I want to add an update functionality. Two problems arise (not addressed in the specified question): What is the best and easiest way to create a workspace from any other workspace? To know if there is already a workstation for editing the same client. There are a lot of things going on here. Your question has two parts (if I'm missing nothing). How to forward the double-click operation to the command in your Vododal How to open a "workspace" in this sample (a workspace is just a tab, in this case ). How to double click a list view item, MVVM style There are many ways, but SO o on this question it is quite good : I personally use the behavior of Marlongritch, so I will tell you how to do this: & Lt; Setter property = "ACB: Commandbackcommand" value = "{binding relative Sorcere = {relative resource mode = search explorer, exteriortype = {x: type user control}, path = data context. Edit cla...

git push creates 'undo' in remote stage? -

I basically follow the guidelines from here to see a clear snapshot and to mirror the new Am I am creating a GIT repository on the snapshot directory. Then I make a clone of that repository to make my work reserves. UPDATE: Here I did CDD: / view / contribsnap # (this is clearly a snapshot) git init git add Git commit #at at this point I have a recuperator that fills my spacescope with snapshot #then git clone -o contribsnap / d / views / csclone # Now I have to edit the repo CD / D / view / CSclone of my work testfile.txt git testfile .txt git commit -m "made some changes" # git gui hit 'push' button which changes my Contribsnap repo #BUT This contribsnap also has a new file That if I do it, it dislikes those changes which I pushed END UPDATE Now, the problem is that I did not understand that my What happens at the 'Push' back to the original with the work store? When I am pressing the 'push' button in GIT Guinea with my work repos...

loops - JavaScript Variable Scope -

इस सवाल का पहले से ही एक उत्तर है: मुझे एक समस्या आ रही है / p> स्क्रिप्ट setTimeout (function () {for (var i = 0; i & lt; 5; i ++) {SetTimeout (फ़ंक्शन () {console.log (i);}, i * 200);}}, 200); आउटपुट 5, 5, 5, 5, 5 के बजाय 1, 2, 3, 4, 5 मैं समझ सकता हूं कि यह क्यों काम नहीं करता है, लेकिन मैं सोच रहा था कि कोई मुझे बता सकता है कि क्या हो रहा है और यह क्यों काम नहीं कर रहा है! इसके अलावा, यह दायरा समस्या कैसे दूर हो सकती है? setTimeout कॉलबैक फ़ंक्शन एसिंक्रोनस को क्रियान्वित किया जाता है, सभी कंसोल .log कॉल जिसे आप उसी i वेरिएबल का संदर्भ देते हैं, और उस समय वे निष्पादित होते हैं, लूप समाप्त हो गया और i 4 होता है। आप सभी i मानों के संदर्भ को संचित करने के लिए एक पैरामीटर स्वीकार करने वाले फ़ंक्शन के अंदर अपने अंदरूनी setTimeout कॉल को लपेट कर सकते हैं जो इस तरह से चल रहे हैं, कुछ ऐसा है: setTimeout (फ़ंक्शन () (के लिए (var i = 0; i & lt; 5; i ++) {(फ़ंक्शन (जे) {// जोड़ा गया 'I' के लिए संदर्भ को संचय करने के लिए ...

vba - Server moved, now MS Excel 2003 queries won't work -

We use MS queries to get data from various databases to create metrics (i.e. in Excel, on data Go ... Import External Data ... New Database Query) SQL queries and parameters (mostly Canon String) are automatically stored in Excel within the spreadsheet. However, we have recently taken one of our databases to a new server. Consequently, Excel signals us for a new ODBC connection when trying to refresh the data, but it will not accept new values. We can fix new questions, so the ODBC connection is properly established, but we can not change any questions. Is there any way to change the IP address for programming or these settings? I tried to change the XLS file in a hex editor (the IP address is visible there), but then it says that the workbook is corrupt. If you need to change the connection string of your questions, then this macro will be able to query all questions in the active workbook. Will change this (you do not need to store the code in the workbook). I include ...

linux - How to check for an exploding zip file in bash? -

I have a Bash shell script that opens a zip file, and uses the resulting files. Because of this, I hope that I will prefer all the contents in a folder like: file.zip / file / contentfolder1 / contentfolder2 stuff1.txt stuff2.txt ... I've seen users on Windows generally do not create a sub folder, but rather submit an explosion zip file. Which:: file.zip / Contentfolder1 / contentfolder2 stuff1.txt stuff2.txt ... How can I detect these explosive pigments? , So that I can handle them accordingly? Is it possible for the first time without unzipping the file? First open in a directory, and then delete the additional layer if the zipper is not a bomb. tempdir = 'mktemp -d` unzip-d $ tempdir file.zip if [$ (ls $ tempdir | wc -l) = 1]; Then MV $ tempdir / * Rmdir $ tempdir and mv $ tempdir file fix

html table - YUI Datatable Width -

This may sound like a basic question, but I'm having trouble finding that the width of the table is 100% But how to set up a UUI figures? I tried to #dtContainer {width: 100%; } #dtContainer table {width: 100%} But none of these methods works. To clarify, I see the width of the data format is 100% table empty and empty message is displayed. Generated table is an HTML table; So, I thought it should work. Do not use. Yui-dt table {width: 100%; }, This column does not appear to set the width correctly MyDataTable.setAttributes ({width: "100%"}, true); After render the table

sql - MySQL update a sorting index column to move items -

If I have the following table & amp; Data allows us to use sort_index for sorting: create table 'foo' (`id`inT (11) tap etanement,` bar_id` INT 11) default tap, `sort_index` INT (11) default faucet, primary key (` ID`)); INSERT VALUES (1,1), (1,2), (1,3), (1,4), (2,1), (2, 2, 2) in `Foo` (` bar_id`, `sort_index`) 2), (2,3), (2,4), (2,5); I want to be able to do the following things in the most efficient way: Move any foo entry to a position (scanned by bar_id) Make sure that sort_index is always 1 indexed and no gap You should be able to move items in the beginning and list And the end of Rule # 2 should still be implemented This should be done in complete queries and Do not be as short as possible (as the set can be very large and individual UPDATE s is not ideal What do I do I am trying to make it clear that the table is empty, so we have the following data: id | bar_id | Sort_index 1 | 1 | 1 2 | 1 | 2 3 | 1 | 3 4 | 1 | 4 | 5 | 2 | 1 | |...

windows - java web application integrating with active direcotry on OC4J server -

I need help I have been searching for it for a long time. I would like to create a servlet (application applied on OC4J), which will allow login and password to enter the user logged into the domain (Active Directory) without any prompt. It is possible to get back to the sublett: User Name GetRemoteUser or GetUserPrincipal form without authentication form? Or do I need another way of doing this You must notify OC4J as 'Windows Native Authentication' As described in This is just a bit more than just calling a special function - you have to first configure Active Directory and OC4J.

user interface - Progress bar requirement as sufficient justification for multithreading via BackgroundWorker? -

Given that multi-threaded applications are debunking hell and should be avoided at all cost ... Is there a sufficient reason for registering a progress bar to enter multi-threaded land? Specifically, assume that C # windows forms .NET 3.0 application requires downloading 100 MB file. Is it right to download multi threads (via a background variant) to download it on a thread, so that UI progresses to the progress bar showing progress in the thread? Sorry if this question is a bit fuzzy. I have not multi-threaded anything before. You have not said anything about which language you are using; For example, you can use WebClient with DownloadFileAsync and DownloadProgressChanged While this is a multi-threaded program, I consider this as a less complexity program.

If I wanted to define a file format, how would I go about that? -

Say that I came in some super-dupler mode of representing some data which I think about other people Useful to know and use. Suppose I have a 'imagination' in some form, even if it can not be a completely formal: i.e., i know how this file format will already work. Then how would I go about releasing this device to get comments and feedback based on this? How can I get it 'standardized' in some form? The file format is difficult to specify. If the data you want to store is trivial, it is going to be disapproved, in general, this is hardly the case. You can use RFC frameworks and keywords, but I always have to specify a file format in slow, difficult and boring tasks, because it is difficult to read. My suggestion, if you want to follow this, focus on the block of information, the majority is for those institutions which are optional, and only when there is another situation, So try to capitalize on the data while dividing it. The best imagination, IMHO, i...

html - css layout fixed width and variable width on same line -

With table I can easily have a row with 2 columns, column 1 variable width and column 2 pixels and columns Fixed size changes to size 1 to fill the available space. I am changing the CSS and thinking how to do it with CSS .. and make sure that both divs / columns are on the same line and do not wrap up. & lt ;! DOCTYPE HTML Public "- // W3C // DTD XHTML 1.0 Transcription // N" "http://www.w3.org/TR /xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html & gt; & Lt; Top & gt; & Lt; Style type = "text / css" & gt; Html, body, div {margin: 0; Padding: 0; Limit: 0 none; } #left {margin-right: 300px; Background: yellow; } #wright {width: 300px; float right; Background: #ccc; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "wrapper" & gt; & Lt; Div id = "right" & gt; Fixed & lt; / Div & gt; & Lt; Div id = "left" & gt; V...

What does "lambda" mean in Python, and what's the simplest way to use it? -

Can you give an example and other examples when and when do not use Lambda? My book gives me examples, but they are confused. Lambda, originated from and (AFAIK) was implemented in the first place, basically There is an anonymous function - a function in which there is no name, and in other words in-line is used, you can assign an expression to an identifier in an expression like: & gt; & Gt; & Gt; AddTwo = Lambda X: x + 2> gt; & Gt; & Gt; AddTwo (2) 4 This provides the anonymous code to addTwo , which accepts 1 argument x, and in the function body it adds X to 2 , Returns this function, the last value of the last expression in the function body is therefore no return keyword. The above code is almost equivalent: & gt; & Gt; & Gt; Def addTwo (x): ... back to x + 2 ... & gt; & Gt; & Gt; AddTwo (2) 4 Except you are not using a function definition, you are telling Lambda an identifier. The best place to use them is...

grouping - Counting rows matching each of the multiple conditions in MySQL -

Please help me with a single query converting the data given below ... | ID | Status_A | Status_b | | ++++++++++++++++++++++ | | 1 | Active | Inactive | ... in this one. | Status_group | Counting | | +++++++++++++++++++++++ | | Status_A Active | 1 | | Status_b.novar | 1 | Edit: If a single pass query is possible, then it would be better, besides, a question with unions passes one? If the status can only be active or inactive , I suggest a different approach: SELECT sum (if (status_a = 'active', 1,0)) position_a_active, amount (if (status_a = 'inactive' Position_A_national, sum (if (position_b = 'active', 1,0)) position_b_active, sum (if (status_b = 'passive', 1, 0)) position from position_bank table Otherwise you may need to use the UNION approach Yes, but I want to do it in a slightly different way. First of all, you can use UNION ALL , because you do not need to remove duplicates in the result. I also use GROUP BY onl...

c# - Developing Games - How are things that take more than one game loop performed? -

I am using C #, but it is applicable to developing any game in any language. Most games use 'Game Loop', which will look something like this: while (the game is playing) {UpdateEnvironment (); DrawEnvironment (); } I am struggling to understand what will fit into more than one game loop equation. For example, making a float ball from one tile with one tile or a player to take a tile (not to jump on the tile from the tile but rather to animate it). The best part is that I have passed the time since the last loop, object / method, so it can talk about it but it does have difficulty in doing things like: A.M.Howo (10, 20); // Pathfind, then follow the path of this tile. Player.Shoot (); // Shoot one, and explore and update the collision along the way. Where can I find more information about the events that perform more than one game loop? One way to do this is to collect the entire pending work and then the game loop only performs a little bit of it Does. ...

c# - Links in a swf file -

I have a worldmap.swf, have I included a small logo in any continent, which I Clicks only the countries of that particular continent, where another country has been included in each country, I need to make a link in the logo of every country, which must open a separate web site. Example: A logo in the North American continent, which opens UDSA and Canada, will need to open a website related to the United States by clicking on the United States logo, Canada logo, a Canadian related website, and so on. Can help here? Thanks Store logos and their related URLs in one array assign a single click handler to all the other people in the other, within the handler, the logo clicked in the logo array ( event .target ) and use that index to get that URL and go to that URL. Var Logo: Array = [USOLOGO, UK LOGO, ASEIA, / * etc * /]; Var url: array = ["usa.html", "uk.html", "asia.html", / * etc * /]; For everyone (various logos: movie clips in the logo) l...

c# - Finding most proper standard for image [Image recognition] -

We have some examples of images. and we have on the input set of images 2) scaling 3) cutting it P> 4) Add Noise 5) Use of some color filters It is a guarantee that human beings can easily recognize. I'm writing simple but effective algorithm I am in C # and Java I do not think is a single algorithm that will enable you to identify images in all those situations that you say. A technique that can be covered is for the highest image, but it can not be understood from any part of the imagery, and it will include some very heavy mathematical concepts. You can find useful in searching in that area, including image processing because they are just two-dimensional signals. Edit : The problem is limited to identifying money (notes and coins), so the first problem of search prevents those websites that do not Imagery refers to the wealth as a result of using the product. Anyway, by searching for "I found more useful hits, in which some Hidden Ma...

MD5 code kata and BDD -

I was thinking of implementing MD5 as code code and wanted to use BDD to run the design Was (I am a BDD newby). However, from the beginning of the only test, I can start thinking that passing in an empty string, and the easiest thing to do is embedding hash in my program and returning. Its logical extension is that I finish embedding hash in my solution for every test and to decide whether to return, switch to input which course Working MD5 will not result in the program. One of my problems is that there should be only one public function: public stable string MD5 (input byte []) And how do I check the internal? Is my view completely flawed or is it inappropriate for MD5 BDD? I believe that you decided to work very hard for a BDD code- Kata code -Cata or whatever I have understood about it so far, is that you want to see some problem in small incremental steps, so that you can complete these steps in red, green, reflector iterations. For example, there may be...

SQL Server Data Archive Solution -

I am looking for a solution to the archive data contained in my database. My database is SQL Server 2008 and approximately 250 tables I search the web and look for the link below: But this solution is not clear I do not know that this is a direct way of doing SQL Server Give me a solution. The solution you choose will depend on your reasons for applying it, for example, To consider: Which data is to be stored? For example, older data or data from a certain date? There is an implication for the most appropriate collection techniques to use, i.e. a complete database backup may be adequate or perhaps it can be used to store a record more suitable. How accessible should the archived data be? Should the stored data be immediately available, perhaps acceptable for slow SATA storage or perhaps access to data for a period of several days? Perhaps if the time of restoring is quite generous then a complete database backup is taken at regular intervals, once in a mo...

c# - struggling with XML namespaces (linq)... what am I doing wrong here? -

Something trying to parse XML, but apparently it is too much for a lazy Sunday afternoon, / P> This is my code: (I tried the XPathDocument and XmlDocument approach, but it also failed too badly) XmlDocument xmlDoc = New XmlDocument (); XmlDoc.LoadXml (POSTDATA); XDocument xDoc = XDocument.Load (new XmlNodeReader (xmlDoc)); X-namespace soap = "http://schemas.xmlsoap.org/soap/envelope/"; XElement xEnv = xDoc.Descendants (SOAPON + "envelope"). first (); Excellence xBody = xEnv.Descendants (SOAPOVAN + "BODY"). first (); XReadReply = xBody.Descendants ("ReadReplyReq"). first (); The last line fails with the exception: there is no element in this collection, however if I change this last line to: XElement xReadReply = xBody.Descendants) .First (); This gives the first node which is actually the "Ridleyplayerk" node. Finally, these namespaces are working, it now fails on the first node without a breed ... oh bitter irony;...

c# - How does the Search Predicate of Findall work in a generic List -

I am able to work with findAll and this means ... but I am thinking of that device Which does this work. list & lt; BradCollection & gt; B = myList.FindAll (SearchForMe); & Lt; BradCollection & gt; SearchForm (string str) {if (str.Contains ("brad")) comes true; Second false return; } Where is the "str" ​​argument found in the search form? I'm not sure what you are asking; Perhaps a look at the simplified implementation of FindAll will help to see if FindAll is actually implemented, but it is enough to understand what is happening: public representative bool Predicate & lt; A & gt; (A RGR); ... public list & lt; T & gt; FindAll (Predicate & lt; T & gt; Forecast) {var results = new list & lt; T & gt; (); If the object (object) results in foreach (t item in this). Add (item); Return result; } What is the answer to your question?

sql - MySQL String match percentage -

In MySQL, how can I compare two strings and get matching percentages I ("foo", " ("Foo", "fo") = 0.0 Compare = 0.75 ("foo", "fo") = 0.0 (compare with "foo", "fobar") = 0.5 ("foo", "foofoo") = 1.0 I hope you get this idea :) please see:

c# - Starting a process with Windows start-up (can not find supporing files) -

I programmed (C # .Net 3.5) when Windows starts (XP), the process of starting. This process uses the other files in the same file as its own, in addition, it starts another process, again located in the same folder. However, it seems that the files can not be found in the same folder (they are). Instead, it appears in the "C: \ Documents and Setting \ User" folder. Whenever, all the files are in this folder then it starts correctly but when they are not in a separate folder. This process HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Run You can try to set up a working directory while starting your process: directory .creator directory (path.gate directoryname (assembly.contacting assembly) (location)) ; If you later attempt to access a directory in the same directory that specifies the executable process as a relative path, then it should be able to find it.

c# - CultureInfo not using computer settings -

I changed the Windows XP regional and language option to French (Canada) [FR-CA]. I have resource files that have been fixed in my application (Windows Forms) for "FR-CA". My dates and numbers are converted into frame-CA format but my resource file for Freya-CA has not been used. going. The only way to read the resource file is to explicitly set the following: Thread.ContentTrade. Current Ukurcture = New CultureInfo ("FR-CA"); How can I choose the local machine settings for the thread? As you can tell in MSDN that you can do it like this: // set in the control panel. Existing content Current Ukraine Agriculture = Thread. Present.

looking for x-platform python console library -

I'm a Python novice. I want something like the cursed library for Python 2.6 or 3.1 without any code changes to run on Windows and Linux. I need to work to color the text and background, to read the screen on the screen to read the key and to move the text cursor to a specific position, to clear the screen for. It should be a completely free library. When I try to "import curse" on Windows, the compiler tells me "ImportError: Both Python 2.6 and 3.1 are called" no modules called _curses. " If anyone is still looking for a curses solution on Windows, then here is a site with , and Covering a very wide range: For 32-bit and 64-bit, Python version 2.5, 2.6, 2.7, 3.1 and 3.2 . "A dos, OS Wipe public domain curses for / 2, Win32, X11 and SDL Library ".

sql - Create a mysql primary key without a clustered index? -

I am using a SQL Server that is using MySQL for a large upcoming project (due to licensing) and I I do not know more about the way to create a primary key without the package index. I have read all the documents say that a primary key is automatically given a compiled index because I have a binary (16) for the primary key column (GUID) ) Using So, I do not want a compiled index on it because ... Is it possible to make a primary key without a compiled index? I can always place the clustered index on the date_created column instead, but how do I prevent mysql from creating the clustered index on the primary key? If not possible, do I have a unique GUID column on the index and no primary key on the table? I am planning to use nhibernate here, so I'm not sure whether any primary key is allowed (not yet received). itemproc = "text"> Considering what is said, it seems that you are not really defined It is possible that the package index is set to: This is e...

javascript - Google Maps API Reverse Lookup Address Details Accuracy -

I am using Google Maps API for an address reverse lookup, especially country, city and zip code. . The problem I have with GOOcoder is that when you input a particular latitude LNG, you get a series of results based on the accuracy of the details of the details. For example, if you click on the road, you can tell the accuracy of 8 and The address looks like this; "street, city, country code" or "street, city zip code, country code" . And if you click on another place, you can get the accuracy of address 5; City zip code, country code All I am looking for is city, zip code and country. Is there any way to force Google Maps to ascertain the accuracy of 5 days or to force different parts of the city, zip codes and breakdown elements in the country? I'm using this code to get information: & lt; Html xmlns = "http://www.w3.org/1999/xhtml" xmlns: v = "vase: schema-microsoft-com: vml" & gt; & Lt; Top & gt; & Lt; Met...

c# - Can you insert at position 0 in a List<MyObject>? -

I need to insert an object at the beginning of a collection. My colleciton type list How can I do this? Sure you can; For example, a general list of wires: list & lt; String & gt; Value = new list & lt; String & gt; (); Values.Instert (0, "NewString");

PHP 5.2.11 Update Problem -

I update PHP 5.2.0 to 5.2.11 and now I'm loading errors while doing a PHP call: ( P> I downloaded the source and used it. / Configure Line is installed from the old phpinfo, then installed. Below I am receiving the error Anybody have the idea of ​​how to fix this mess. This is on RHEL 5.2 PHP Warning: PHP startup: dbase: mood PHP Alert = 20050 9 22, debug = 0, thread-security = 0 PHP module API = 20060613, debug = 0, threaded with security = 0 These options need to match in the unknown on the line PHP Warning: PHP Unable to start module module compiled with startup: dom: module API = 20050 9 22, compiled with debug = 0, thread-security = 0 PHP module module API = 20060613, debug = 0, thread-security = 0 Matching options to unknown in line PHP is required: PHP startup: GD: module module unable to initialize module module = API2 = 20050 9 22, debug = 0, THR-S with APT = 0 PHP module API = 20060613, debug = 0, thread - These options compiled with security = 0 need to ma...

scaling - when to start performance tuning a website -

I have an asp.net mvc website and the volume of traffic is increasing. I have a site pointing to a backend SQL Server 2008 database. At what point, I need to understand what the system is obstructing and if I need to load the balance machine or be reviewed by the way I am managing the database connection. Are there specific tools and thresholds, which are not currently scalable to the current model or a breaking point (except for a slow site commentary) P> There are some very easy things you can do to increase performance with so little work, it's easy to do this, see what you have to do yet;) First and foremost all static images and other media That is put on a different server eliminates completely the questions on Boksen running dynamic parts of the Web server. The next line ensures that you are using the hard drive spindle as much as possible, of course you want your database on a different machine, a separate hard drive alone, but you also want to Your web s...

wpf - Does anyone have a simple example of a UserControl with a single ContentPresenter? -

अभी तक मेरे पास यह है: & lt; UserControl x: कक्षा = "MyConcept.ExpanderPanel" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx/2006/ XAML "& gt; & LT; ग्रिड & gt; & Lt; सीमा शैली = "{स्टेटिक रिसोर्स बॉर्डर पैनेल स्टाइल}" कॉर्नररेडिया = "3" / & gt; & Lt; सामग्रीप्रदर्शक / & gt; & Lt; / ग्रिड & gt; & Lt; / UserControl & gt; इस UserControl का नमूना उपयोग: & lt; nc: ExpanderPanel Grid.Row = "0" & ​​gt; & Lt; Expander IsExpanded = "True" Header = "NMT उपयोगकर्ता" & gt; & LT; StackPanel & gt; ... & lt; / स्टैकपैनेल & gt; & Lt; / Expander & gt; & Lt; / nc: ExpanderPanel & gt; चर्चा अगर मैं इसे चलाता हूं, तो मुझे कुछ भी नहीं दिखता। कोई भी सामग्री प्रस्तुत नहीं की गई है, यहां तक ​​कि यूजर कंट्रोल में बनाया गया सीमा भी नहीं है। मैंन...

inheritance - Scala: how to inherit a "static slot"? -

Well, I'm learning Scala so this question is very basic for most people. In Java, a class can have a fixed slot (function or variable), and then I will have that slot even in the heritage classes. I do not have fixed slots in Scala, but I have fellow objects. But I am aware that these objects are not part of the heritage classroom, so if I have two classes person and student , and the person has a variable All: List which gives a list of all people, so I can do Person.all , I was hoping that I can also do Student.all Thank you! thanks In principle, speaking in this context The behavior of too many is broken due to the fact that sub-classes raise static members do not really make sense with the view of an object-oriented point. Figures are really nothing more than fancy, scrap globals. Inheritance is something that you see at the class level, but the situation is not actually at the classroom level (because they are global) Therefore the heritage should n...

model view controller - How to structure Javascript architecture to complement a PHP MVC web app? -

I'm working on a new JavaScript architecture for running a web app. There were so many inline codes in the previous revision, which included scattered, there was no directory structure for .js files and everything was in the global namespace. I'm making the goal: keep the script included in the footer, keep everything in an application name space / object, add the organization to .js files and all applications specific files into a bundle.Design in JS I am trying to get a modular approach based on nicolas covered: "scalable javascript application architecture" Site is currently / App / models / views / home / auth / meta about.tpl contact.tpl privacy.tpl / controllers home.php auth.php meta.php / public / js core.js / module module files here / jquery jqueryplugins here / controllers Home.js auth.js meta JS Controllers have methods that correspond to our URL routing and look at rendering. For example, http: // localhost / meta / contact will call the ...

visual studio - Shortcut for uncommenting CSS in VS 2008? -

I used the macro described in the VS 2008 to comment on text selection in the CSS editor. I'm looking for another macro, which is the suggestion comments. Just type a similar module / method, I think that should work, I do not have to try But this is what I think. Please understand this in addition to the post you have linked, you can see other details from that post. Select UnCommentCSS sub UnCommentCSS () as the blind selection = DTE.ActiveDocument.Selection selected selected text string as selected text string = Select Text if selected Text.Length & gt; 0_ and selected text Start ("/ *") _ and select the text. Display ("* /") then selected text = selected text. Sample ("*" C) Selection. Text = selected text (1) end if end sub end module Note: This works if you have not nested between / * * / otherwise you need Has to make corrections / changes

workitem - How to create new Change Requests using TFS API 2010? -

I am new to TFS API and currently in the process of creating new work items through a Windows Farm app . Can the new change request, risk and scenario for TFS 2010 be explained in detail with code examples? I knew that CRS is not available in the playful template, but I have noticed that "landscape" is the equivalent of "service request / change request" in the playful template that we are using. Are risks and requirements available in playful? If so, how to make them? I have finished adding new bugs and tasks. Please tell me how to edit the work item XML template if necessary. Thanks Tara. You can get an example of a code like C # to create a new working item To add work items, get them from the easiest process template (download one from the web or a download which is already available in tfs: Team -> Project archive -> Process templates) . Then add that work item, which you can find in the downloaded place and you can upload it with "w...

java - Is it possible to exclude some targets from Ant targets while executing the script? -

If you want to execute more than one goal in ant, we can do it like this, target by any means But the problem is that, I have a goal definition: & lt; Target name = "buildApp" dependent = "init, copy-all-requiredfiles-local, merge to wait, compile, createWAR, deployAll" /> And if I want to execute buildApp it will also run all related targets, as is clear. Is it possible to execute the buildApp target without executing the deployAll target? One possibility will add your deployed all target this way. & lt; Goal name = "depolyAll" until no = "doNotDeploy" & gt; ... & lt; / Target & gt; Then when you want to run buildApp without all deployed on the command line Ant -DoNotDeploy = true buildAll Note that BTW is checked only until the asset is set. Do not assume. But this behavior should be documented and it is a bit unclear. I clearly consider making a second build goal eg. ...

sendmail - Android: Sending a Mail/SMS/Tweet with Intent.ACTION_SEND / requestCode / resultCode? -

I am using the following code: Send the intentMelentent = new intent (intent ACTION_SEND); SendMailIntent.putExtra (Intent.EXTRA_SUBJECT, getString (R.string.Share_Mail_Subject)); SendMailIntent.putExtra (Intent.EXTRA_TEXT, getString (R.string.Share_Mail_Text)); SendMailIntent.setType ("text / plain"); StartActivity (Intent.createChooser (sendMailIntent, "Email / SMS / Tweet?")); Then I want to be able to differentiate between them: 1. My user actually sent email / SMS ... or 2. My user actually pushed the back button Given ... nothing else is sent. Is there any way to make this difference? => Should I start the activity with the introduction activity? And click on requestCode / resultCode withActivityResult ... => What should I expect the king of the result? How to catch it correctly? Where do I put these lines? A snippet of code will be very useful. Thanks in advance. hub I have a feeling that when you have asked about this question ...

What is the best mysql table format for high insert load? -

I'm in the process of adding a new feature to a system. The process will teach live data from the PLC and store them in the database. The data table will contain 4 columns: variable_id (SMALLINT), timestamp (timestamp), value (flow), quality (TINIINT). Is the primary key (variable_id, timestamp). The system should be able to insert 1000-2000 records per second. The data table will retain data from the past 24 hours, old data is removed from the table. The data table also needs to handle every other 5-10 selection details. Selecting the latest value from the selection statement table for a specific variable and displaying it on the web. Should I use the MySam or InDebbi table format? Does the mismatch lock the whole table while inserts, thus blocking the selected statements from the web interface? Currently, all data tables in the data base are MyISAM tables. Should I use MySam or InnoDB table format? For any project that you read frequently and concurrently, yo...

facebook api query string issue -

To develop a Facebook API with asp.net, I have to send a query string but in this quickstring, (I, Ç ö, ş, ğ) When I send a query string with special characters, then Facebook gives me an error - The URL is not valid. "value of ci" variable " I believe you I need to use URL encoding to send such letters, although I may be wrong. which will encode / encode text and encode into URL encoding. Want to use this utility and then try your API request with encoded text.

Calling a vb script from a asp.net / C# webpage -

I have written an asp.net web page with C #, which runs the existing VB script. The idea is that the user uploads an Excel spreadsheet (.xls) using a web page, checks a few basic things on the C # file (file type, file name etc.), then a network location Saves .xls at C # then passes the network path of the .xls to the vb script, which obtains necessary information from .xls to create a .csv file. Finally. A stored procedure has been passed in Csv and uploaded to a database table. The problem is that when I run a webpage locally on my machine then it all goes completely. However, when I upload the page to the webserver, this vb script is not executed; Some quick information: Excel is installed on the web server The website is set to execute the script and executable The script is currently set to run in the form of 'me' (this will change) that is the administrator on the web server If I run the script on the webserver using the CMD prompt I may be wron...

Android contacts extraction -

क्या मानक एंड्रॉइड का उपयोग करते हुए, निम्न स्वरूपों, vCard, hCard या json / xml में संपर्कों को निकालने की कोई संभावनाएं हैं एपीआई? मेरा मानना ​​है कि आप क्या चाहते हैं, कम से कम एंड्रॉइड 2.0 के लिए (एपीआई स्तर 5 )। मैं बस भाग्य के साथ मिल गया और इसे मिला।

WCF in Windows Mobile 6 -

I have seen this problem on Google, however, no one is able to solve it. I am writing a windows mobile app that I used to create WCF service. When I keep this app on the device, it runs just like other non-mobile applications that use this web service. When I debug it (Bluetooth or USB cuff is connected), some web service calls will break the "lost device's remote connection ..." error and will immediately stop the app from any other debug info. Others will not have to break it at all and I will be allowed to continue debugging. In addition, about 5% of the time, web service calls that break it allow me to debug it, but most of the time, it gives me error and crash. What is happening with any idea? I am in loss. Thank you in advance Are you certain why this is happening because Is this a mobile device? Sometimes, we do debugging the WCF client or service due to expiration of it. Is this always the same service that makes you this mistake? If this is spe...

memory - Advantage of data type id vs NSString in Objective C? -

यह कोड ... NSString * s = [[NSString alloc] initWithString: @"नमस्ते दुनिया"]; S = s.lowercaseString; एनएसएलॉग (@ "% @", एस); ... डॉट नोटेशन के उपयोग की अनुमति देता है, लेकिन जोर से टाइप किया जाता है यह कोड ... आईडी s = [[NSString alloc] initWithString: @ "हैलो, विश्व"]; S = [एस लोअरस्ट्रेस स्ट्रिंग]; एनएसएलॉग (@ "% @", एस); ... कमजोर रूप से टाइप किया गया है और इसे चौकोर ब्रैकेट्स के उपयोग की आवश्यकता है। इसके अलावा, क्या एक दूसरे के ऊपर एक का उपयोग करने का कोई फायदा है? यदि आप एक NSString बना रहे हैं, तो आप इसे एक एनएसएसटीइंग , और कंपाइलर को आपकी सहायता करने दें। आईडी का इस्तेमाल करना मजबूत युग्मन को रोकने के लिए है, और ऐसे ऑब्जेक्ट का उपयोग करने के लिए जिनके प्रकार बाद के समय तक नहीं जानते हैं। जैसे IBAction पद्धतियों में प्रेषक को एक पैरामीटर के रूप में एक आईडी के रूप में शामिल किया जाता है, क्योंकि वस्तु का सही प्रकार ज्ञात नहीं है। जोड़ने के लिए संपादित: आप भाषा के लिए नया हो सकते हैं, इसलिए मैं कुछ चीजों का...

sql - A covered index formed by a composite index or index with included columns -

Are there any differences between these two covered indexes? A composite index and UserID with both the buddy ID An index with FriendID and UserID as an included column Different MS SQL Server related points If the answer to the above question is 'no difference' then is it or does the database engine tuning consultant (DTA) always go crazy on the included columns?

cakephp: get values from a "cat" table in the "users_controller.php" file? -

I have a table "user" and a controller "users_controller.php" and I have another table called "category" , It is necessary to get the value from this table in the "Listall" verb ( site.com/users/listall ). How can I get from any other table. To select an element with categories, In the controller, find the categories to be used in a selected element $ categories = $ this-> user-> category-> find ('list'); $ This-> (compact ('categories')) set; Add your selected element to the view: $ form-> Input ('User.category_id'); Use the values ​​contained in the $ categories variable for the cache automatically category_id , select Thank you to the Inflator if your price is different for some reasons Variable, then use $ form-> input ('User.category_id', array ('option' => $ values_array));

low level - How do memory mapped devices prevent RAM from responding to read operation? -

Assume that we have a memory map device that takes a fixed address space. The CPU tries to read something from the device, so he tries to read a certain word in place of that address. What really happens? When the memory controller answers, then both the RAM and the device are both trying to respond to the request, just because of the reason for the dispute. There are several ways to apply it: Support in memory controller - e.g. Allows certain memory categories to be redirected to another controller. It is contained in the NUMA architecture - the "closest" memory controller handles a fixed address range, and all other requests are hand in hand. Somewhere-or on-on-series, you can put the circuitry to handle memory-mapped devices. It is common in microcontrollers, which usually handle on-chip RAM, prom and / or flash, along with externally attached memory. Hardware with Direct Memory Access (DMA) - can be provided by any controller that allows multiple devices ...

c# - Can I define frequency check for ThreadPool.QueueUserWorkItem? -

I limit the bandwidth usage of websites to download files to System.Web.IHttpAsyncHandler Implemented. After defined user bandwidth, I need to send a byte [] every second (or 1000 milliseconds, to be exact) Something like this: Public class DownloadHandler: IHttpAsyncHandler {Public IAsyncResult StartProcessRequest (HttpContext Reference, AsyncCallback CB, Object Additional Data) {// Users can download that file? DownloadAsync Download = New DownloadAsync (...); download. Start Download () Return Download; }} Category DownloadAync: IAsyncResult {// ... Public Zero Start Download () {ThreadPool.QueueUserWorkItem (New WaitCallback (startAsyncTask)); } Private Zero StartSync Task (object state) {// ... while (References. ISLLT connect and offset & amp; lt; data. Arivio.Tomano) {// ... reference of dots. Response. Write buffer, 0, readcount); // ... more stuff threads Sleep (1000 - (insured) insured insured balance); } Once the ThreadPull.QUUAderWorker item , I lose cont...

svn copy - updating tags in svn -

If I use svn copy to take a snapshot of a part of a repository, So how do I update that snapshot? Use the case: myrepo / trunk / src / something.c tags.html {/ code> Mkdir branches / user1 / trusted svn add branches / user1 / svn copy trunk / src branches / user1 / Credible myrepo / trunk / src / some.c tag. Tags / Branches / Users 1 / Trusted / src / something.c --- There are drawbacks and change trunk / src / something. * Contains here --- myrepo / trunk / src / neatstuff.cc // new file some c. // modified big_ugly_include.h // was something, this name changed to tag / branches / user1 / trusted / src / something.c Something.h Now I want that the branch / user 1 / the latest version of the reliable / src trunk / SRC. how can I do this? This operation is called merge . It covers in detail Edit with a little more detail: As Rob and sgreeve mention, remove the branch and repeat : There is another option to make. I suggested merge becau...

JQuery mouse events with stacked elements -

I have a web page with the table, using jQuery 1.3.2, I am at the top of each row on the table Gives a div element to its place. There is a high Z-index in the overlaying divisor. I add the 'mousecenter' and 'mouseover' event to the overlaying element element. On mousestricker, I remove a red border around the overlaying scheme. On the mouseover, I remove the boundary so the effect is to highlight each table row, as the mouse is moved to the table. As long as the mouse does not enter some text in the table, everything works fine. Then the boundary closes. It looks like what's happening: Enter the overlying issue - Enter the mousecenter Enter the table text (still in the overlayed device) - On mouselevel overlaying div Called. I finally want to capture something click anywhere within the overlaying div to do something, so I can not use CSS to handle it. Here the code is: I appreciate any help to capture the overlaying div to ignore the mouse or th...

How do I automatically add dlls to ironruby engine -

I want to add the currently loaded DLL of the current application to the LoneRubube engine so that I can execute the script every time I using the ScriptRuntime.LoadAssembly . This is my original code // This part may have changed, probably a different / possibly RUBINinin or runtime = ScriptRuntime from the new ScriptRuntime (Ruby.CreateRuntimeSetup); // Use our Ruby for all Sovereigns foreach (AppDomain.CurrentDomain.GetAssemblies (in separate assembly) {runtime.LoadAssembly (assembly); }

How to split a string in PHP -

I have a long string that results in image file- (in base 64) with a binary file encoding. Should it be followed while dividing a differential method (or rule)? Edit: I have to type the string in an XML file, but to do this, I have to divide it into smaller parts. Br> Editing 2: I would like to divide it by length (I think this is more suitable in this case). Thank you You probably want to take a look, because you do the base 64 encoding (assuming Encoding , because you can not embed decoded base64 data in XML files)

cURL php extension for windows with SCP and SFTP support -

I switched to zendserver (VS8 php (5.3) binaries, and now there is a shortage of curl (7.1 9.4) The SFTP protocol support (Errors and verified by phpinfo) curl itself has been installed correctly, it is simply lacking to mention protocol support It works out of the box on VC9 (thread-safe) binaries , Which I have downloaded from php.net (this installation is compiled with VS 9 Apache I was using binaries, so why was I using PHP binary compiled with VS9) I'm assuming that it has something with curl extensions not created with VS9 , Because I also tried VS6 PP Binary and there was a lack of support for SCP and SFTP ... Looking at the curl section on phpinfo, I know that PHP without SSPTP / SPTP support To install One Libs Edition is not listed, while there is one with support: libSSH Version-> libssh2 / 1.1 Any ideas on why those curl extensions have not been compiled with LIBS2 / 1.1 It can be assumed that the matter may be ???) or is it something else? If you ca...

jquery - Wrong extraction of .attr("href") in IE7 vs all other browsers? -

Is it really true that attr ("href") commands for a link Is handled differently in IE7 compared to all other browsers? Say I have a page and I have this HTML: & lt; A href = "# some anchor" class = "lnkTest" & gt; Link text & lt; / A & gt; And this is jQuery: var strHref = $ (".lnkTest"). Attr ("href"); Then the value of the strHref variable in IE7 will be "http://example.com/page.htm#someAnchor" but the other In browsers it will be "# some anchor" . I believe the last mentioned case is most correct, is it just a case of IE7 bad boy or is it a bug in jQuery? This is definitely a bug in JQuery, but instead browsers Inconsistent implementation of ' .getAttribute (' href ') - I suggest consistency to use only .get (0) .hrf . It seems that you can get .get (0) by using attribute text and Mozilla in IE. GetAttribute ('href', 2) If you do not want ...

xaml - [WPF]ItemsControl not completely loaded @Loaded event -

I probably have a simple problem that I could not find this address: I We ItemsControl , which has Datacontext set and displays the data as a pair of checkboxes and TextBlocks : & amp; Lt; Items control name = "listTestamps" grid. Line = "1" grid. Column = "2" grid. Rowspan = "2" item source = "{binding}" margin = "10, 0,0,0" vertical alignment = "top" loaded = "listTestes_loaded" & gt; & Lt; ItemsControl.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; StackPanel Orientation = "Horizontal" & gt; & Lt; Checkbox name = "check box" tag = "{binding path = taskout id}" /> & Lt; TextBlock FontSize = "11pt" FontFamily = "Helvetica" Text = "{Binding Path = Text}" /> & Lt; / StackPanel & gt; & Lt; / DataTemplate & gt; & Lt; /ItemsControl.ItemTemplate> & Lt; / ItemsCont...