Posts

Showing posts from September, 2012

how can i make asp.net mvc show a nice 500 error message? -

How can I show a good 500 error message to asp.net mvc? It currently tells me that he can not find some footage. An article on this topic Stephen Walther once unknown Useful techniques for handling tasks:

html - Why does 'clear:left' also clears right? -

I am struggling to work CSS floating (in my head) the following example Note on: & lt; Style type = "text / css" & gt; Div.container {width: 500px; } Div.left {float: left; Clear: left; } Div.right {float: right; } & Lt; / Style & gt; & Lt; Div class = "container" & gt; & Lt; Div class = "left" & gt; Left data 1 & lt; / Div & gt; & Lt; Div class = "left" & gt; Left data 2 & lt; / Div & gt; & Lt; Div class = "right" & gt; Rightdata 1 & lt; / Div & gt; & Lt; Div class = "right" & gt; Correct data 2 & lt; / Div & gt; & Lt; Div class = "right" & gt; Rightdata 3 & lt; / Div & gt; & Lt; Div class = "right" & gt; Rightdata 4 & lt; / Div & gt; & Lt; / Div & gt; This will give the following output: + ------------------------ - ------------------------------------------ + | Ben

How to convert CIDR to network and IP address range in C#? -

To convert a network to CIDR notation (72.20.10.0/24) to find some C # code I Looking at something. ) For an IP address range, without luck. There are some threads about CIDR on Stackoverlow, but there is no C # code and I need the same which I need. So I decided to cook it myself, and I system for any conversion in this version. Did not want to trust the net. Maybe it could be of help to anyone Reference: "whatmask" to c code Usage: UIP startIP, andIP; Network2IpRange ("72.20.10.0/24", Outout Out, OutIP Out); The code considers 32 bit for everything Fixed zero network 2 IPRange (string senetwork, UIT Startup, uit and ip out) {UIT IP, / * IP address * / mask, / * subnet mask * / broadcast, / * broadcast address * / network; / * Network address * / int bits; String [] element = sNetwork.Split (new four [] {'/'}); IP = IP2 element (element [0]); Bit = convert toint32 (element [1]); Mask = ~ (0xffffffff & gt; bits); Network = IP &

What is the easiest way in C# to trim a newline off of a string? -

I want to make sure that _content does not end with a newLine character: < Code> _content = Sb.ToString (). Trim (new four [] {environment. Newline}); But the code above does not work because the trim does not have overloaded parameters for the collection of stars, only characters are. What is the simple one-liner to remove an environment from the end of a string? does the following for me. sb.ToString (). TrimEnd ('\ r', '\ n'); or sb.ToString (). TrimEnd (EnvironmentalNewLine.ToCharArray ());

visual studio - What is a good Read, Eval, Print, Loop implementation for C#? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 17 उत्तरों कुछ प्रोग्रामिंग भाषा कार्यान्वयन प्रोग्रामर को अभिव्यक्तियों और कार्यक्रम के टुकड़े का मूल्यांकन करने के लिए और एक वृद्धिशील, इंटरैक्टिव तरीके से कार्यक्रम के लिए अनुमति देने के लिए, पढ़ें, मूल्यांकन, प्रिंट लूप इंटरेक्टिव शेल। आपने सी # आरईपीएल के क्या कार्यान्वयन और उपयोग किया है? मैंने पाया है, लेकिन कोशिश नहीं की, और मोनो एक के साथ आता है मैंने मैक ओएस एक्स पर कोशिश की और यह जादू की तरह काम करता है वर्तमान में इसकी एकमात्र विशेषता Intellisense है, जो मोनो 2.6 में प्रदर्शित होने का वादा किया

validation - Why does the Google homepage use deprecated HTML (ie. is not valid HTML5)? -

I was seeing www.google.com in firebug and was talking a little strange: The Google logo is centered using a center tag. Then I went and checked the page and found 48 errors. Now, I know that there are times when you can not make a page valid, especially when we www.google Something like that .com and you want to be as small as possible, but someone can please explain why they use the center tag? A few years ago a panel on SXSW had participated in a panel called "F * CK Standard" which was all about. Breaking the norms when it is understandable There was a Google engineer on the panel who was talking about the Google home page, which was using the dislikes tag. He said that it is about performance. He specifically mentions layout rendering with a table teasing the Divis and CSS in this case. As long as pages work for their users, they support performance on standards. This is a very easy page with high traffic, which makes sense. I think if you are building a comp

In Python, how do I easily generate an image file from some source data? -

I have some data that I would like to imagine. Each byte of the source data roughly matches the pixel value of the image. What is the easiest way to create an image file (bitmap) using Python? You can create a picture with a list of pixel values: < Code> PIL import image img = Image.new ('RGB', (width, height)) img.putdata (my_list) img.save ('image.png')

Configure pyflakes to work with Zope's "script (python)" objects on the filesystem -

When I run piflex on a Zope filesystem directory view file (as many meet) it always gives very warnings That my parameters and special references like 'context' are not defined, which would be correct if this is a real dragon script, but for a script view the file system directory, define them by magic observations at the top For example: ## Python Script "Name" ## Bind Container = Container ## Bind Context = Reference ## Bind Namespace = ## Bind Script = Script # # Bind subpath = Travers_subpath ## Parameter = EFU, bar, just ## GetSecurityManager from AccessControl import user = getSecurityManager (). GetUser () from products PythonScripts.standard import html_quote request = container. REQUEST RESPONSE = request.RESPONSE return foo + bar + baz Is this type of python used anywhere except zoppey? Is this, or can it be supported by Peephlax, Pilint or similar tools? A possible approach that I have just tried is to pre-process the script zope fspython, s

NHibernate's criteria.List() hangs when lazy property exists on entity -

I am getting some strange behavior where NHibernate questions start to hang. You can download this project Here is the offending code: Public IList & lt; Post & gt; GetLatestLiveBlogEntries (Retrieve Intent Newentarios) {var maxDate = DateTime.Now; (Var Session = Session Manager. Open ()) {var crit = session.CreateCriteria (typeof (post)). Add (restriction. Ek ("enabled", true)) Add (Restrictions. Lt ("postDate", maxDate)). Orders (New Order ("Postdate", False)) // .SetFetchMode ("author", FetchMode.Eager) // & lt; - Exclusion of this line breaks everything! .SetMaxResults (numEntriesToRetrieve); StupidFileLogger.log ("If this is the last log, I am hanging on critics. List ()"); Var listOfPosts = crit.List & lt; Post & gt; (); StupidFileLogger.log ("I was actually able to retrieve the posts"); Return Listoff Posts; }} is the main line. On the author's field .SetFetchMode on the first load

Very simple iPhone question. How to make UIPickerView with two columns? -

I have read other questions about creating a UIPickerView with two or more columns, but the exact solution can not be found. How is this done for the iPhone program? How do you add static data? Thanks! Support the UIPickerViewDelegate Protocol (or whatever is controlling the behavior of PickerView). After this, execute: - (int) numberOfColumnsInPickerView: (UIPickerView *) picker The columns you want, and < Pre> - (int) pickerView: (UIPickerView *) picker numberoffrose encocol: the number of rows for each column, and finally: to call (UIPickerTableCell *) pickerView: (UIPickerView *) Picker table: CellForre: column in the (int) line: To set up each cell (int) Col . See references for more.

How can I tell Emacs find-file not to collapse paths with '//' -

b / c / d complains that it should file / c / D do not meet How do I get MACAC to behave like CSH? Ie // + should be treated as a marker / instead of the same to start the fresh / new path. For Emacs 23.1, this solution works (with default Emacs settings): (defadvice minibuffer- complete and exit (complete and exit before minibuffer) "Translate all multiple times / in singles" ((unread-command-event T)) ( I have an Ax 22 "(+ -" "/" zero (point-min)) (point-max)) (message zero)) Do not have access, so you Must try to s, but I suspect the solution work. For MX 21.3, the first answer works: It looks like this trick (hit TAB to see it in action): (In addition to activating read-file-name-internal-redu-slash) "All in multiple events / singles / translate" -set-arg 0 (replace-regexp-in-string "/ +" "/" (Ad-get-arg 0))) > TAB need to be typed. Edit to add: To TAB Without effect Use this

windows - Convert a username to a SID string in C#/.NET -

There is a question; There is not one for the other way around. How do you change a username for a syd string, for example, to find out which HKEY_USERS subkey is related to a user of a given name? I tell the podcast that Ask, and answer, here goes. The easiest way is, on .NET 2.0 and above, this is: NTAccount f = new NTAccount ("user name"); Securityindifier s = (security identifier) ​​f.Translate (typef (security identifier)); String sidString = s.ToString (); is the hard way, that when the work will not, and .NET 1.1 also works at: [DllImport ( "advapi32. dll ", charset = CharSet.Auto, SetLastError = true)] public static in exile bool LookupAccountName ([, MarshalAs (UnmanagedType.LPTStr)] string systemName, [, MarshalAs (UnmanagedType.LPTStr)] string account, IntPtr sid, Referee integer cbSid, stringbinder referenced denman name, referee int cbReferencedDomainName, use out); [DllImport ( "advapi32.dll", charset = CharSet.Au

SharePoint SPFolder.SubFolders.Add not actually adding a folder -

I have some documentary libraries which are just standard libraries - any related custom content types or nothing. I am trying to add them to subfolders and in some cases this does not work. SPFolder parent = library.RootFolder; SPFolder Kids = parent.SubFolders.Add (subfoldername); Parent.Update (); Child is present = child. Axis; // This is incorrect When I try to add a subfolder named M1 spectrum CRC w-out CMN67 E02_files failed to add this folder via code However, although the add method is executed successfully, when I try to add a folder with this exact name through the standard browser-based SharePoint list UI, I successfully add a folder I am but its an al The name is: M1 spectrum CRC Wi-out CMN67 E02_files _ Keep in mind the indexed underscores in that folder, which was created SharePoint. This is the name of a legal Windows folder and does not contain any HTML-invalid characters. So, what's going on with this? Am I clarifying something? That's

c - Header files in subdirectories (e.g. gtk/gtk.h vs gtk-2.0/gtk/gtk.h) -

I am trying to create a Hello world using GTK, which includes the line: < Pre> #include> Gtk / gtk.h> As you would expect. The makeup line supply line is: GTK_INCLUDE = -i / usr / local / include so it is gtk.h To find /usr/local/include/gtk/gtk.h. However on my system, it is located in /usr/local/include/gtk-2.0/gtk/gtk.h, that is, within the version's subdirectory. Obviously, in this case I can add- I / Usr / local / include / gtk-2.0 in the makefile, but the same problem is cropped with dependence of gtk.h and so on. Is there a good way to deal with this? Can be configured to find out where the header files are and add appropriate directories? I do not know anything about configurations, but information about the system is found on time, which is what I am after. Is this a common occurrence or do I have some strange directory structure? Is that a real problem? Thanks for any indication! You need to use the path to include the pkg-config

debugging - Why is my PHP Socket Server hanging? -

I have created a PHP socket server with PHP_NORMAL_READ mode. Therefore, a message is read to the server when it ends with \ n or \ r. I tried to connect it to the server with several Telnet instances, and it works great. However, when I connect to the server with 1 flash application and 1 Telnet application (I first start a flash), flash seems to hang a server - the server is getting stuck somewhere and No longer receiving data from the data. Telnet client Because any Flash client can code, this server side must decide the code of the server: Can you post the source of the Flash client? This will know what is the problem? Are you sure that the last thing you send from the Flash client is \ n? Otherwise the server will be blocked on socket_read () because the flash client socket can be read without blocking (trigger socket_select ()), but does not send end \ n

regex - Replace all instances of a pattern with regular expressions in Javascript / jQuery -

Firstly, I do not know much about ragex and need to buy a book because it has proved to me that pick up. Finally I want to take a dom element, and I would like to change the text directly into "[" and "]" within the brackets and insert a link around the text, and there are several brackets set in the string . Function ChangeTip () {var link = '& lt; A href = "'$ (' # txtURL '). Attr (' value ') +'" target = "_ blank" & gt; '; $ ('. Tipofthewectip') Replace ('[', link] .replace (']', ' Excluding this task: does not work on the second set of bracket If a closing is not straight bracket, open directly Deletes all the text before the bracket I have seen the examples and because the brackets are used in the regedx code, I can not understand how to see and change the bracket For. Has anyone done something that he can share? Thanks in advance. Find the text b

c# - Representing a tree structure out of a db -

I have read about the various ways of representing a hierarchical structure within a relational database such as an attachment list. I have decided to try a straight-forward like table (overseas): id | Name | Parents where there is an internal reference of parent id . This undetermined depth should be enough to represent a simple tree. Now, how can I create a tree to represent such data structure? As such, if I'm XML or Nested & lt; Ul & gt; & Lt; Li & gt; I want to print a series of in HTML format, what is the most effective way of loop through nodes? I wonder if Linq can come to help, but I am also more interested in normal (not .net bound) and theoretical answer. Thanks in advance. Ironically, the hardest part of this problem can be to obtain a limited set of records from a database that meets the understanding of a particular path. Unless you are using a database that provides hierarchical query support (such as by connecting the Oracle), it

linq - Is there an implementation of IQueryable over DbDataReader? -

I have a lot of existing code which are raw edo. Uses Net (DBCNation, DBDitterer, etc.) I want to transition from LINQ to the new code for using SQL, but for now both existing and new codes have been placed behind an integrated set. One issue I have is: I like the IQueryable & lt;> Repository Classes to highlight the results set, which I get from LINQ for SQL for free. How do I wrap my existing DbDataReader results in an IQueryable? Do I have to implement IQueryable on DBDitter from Astro? Note that I know the dataset from LINQ, but I do not use datasets due to memory level problems, because with the result I deal, the big (the order of the 1000s) means this That IQueryable will also need to be efficient above the DbDataReader implementation (i.e. do not give cash results in memory).

How do you return an exit code from Rhino? -

I am using Java to run a command line utility written in Rhino, but if I have any error, then I That error needs to be back back to the shell then the processing stops to open. How do I pass an error code to open from Rhino? You can use java.lang.System Exit (1);

javascript - How can I open a small window when the user hovers over some text? -

I am creating a web page with more data that might be shown without making the page cumbersome. I am considering different ways to do this. In a way additional data will be magically displayed on a small window, when users will be able to penetrate a particular piece of text. Yahoo! Answer Something happens when you hover over a user but I think that code should be complicated (for my level). So I want a simple way to get a little pop up window to appear in front of the mouse pointer when the user disappears automatically after leaving the user text on a particularly interesting text should be done. I have a few questions on this topic: How can this be done? Can this be done without using javascript? What should I consider on other solutions? (For example, I have expanded some web pages in some sections when users click on them) To open a completely new window, just use a DIV to show your display and most people see popup blockers in their browsers, the window will n

linux - Driver Compilation Redhat -

I'm totally new to compiling drivers for Linux and I have some problems! I am trying to compile a driver for the USB device. Result: [thayoz @ lacalpc13 linux] lib qrng in driver for $ i; CD $ i & amp; Amp; (Do all) exit) & amp; Amp; CD ..; [1]: Directory / home / thayoz / desktop / untitled folder / quantis-usb / src / linux / driver 'make -c / usr / src / kernels / m = / home / thayoz / desktop / title Free folder / quantis-usb / sqr / linux / driver make v = 1 modules [2]: enter the directory / usr / src / kernels' [2]: * to create a target No rules folder / quantis-usb / src / linux / drivers'. Stop. Create [2]: making the directory / usr / src / kernels' [1]: * [all] make error 2 [1]: directory `/ home / thayoz / desktop / untitled folder Except / Quantis-USB / src / linux / driver '/ bin / sh: line 0: cd: lib: such a file or directory / bin / sh: line 0: cd: qrng: do not create any such file or directory I am not sure what is wron

python - Django unit testing with date/time-based objects -

Assume that I have the following event model: Django.db Import Model import datetime class event (models.Model) from: DATE_START = models.DateField () DATE_END = models.DateField () Def is_over (auto): return datetime.date.today ()> Self.date_end I want to test Event.is_over () by creating an event ending in the future (today + 1 or something else), and Date and time therefore the system thinks that we have reached that future date. I want to be able to stunge all the system time objects as far as Python is concerned. It contains datetime.date.today () , datetime.datetime.now () and any other standard date / time objects. What is the standard way to do this? edit : Since my answer is acceptable, answer that I update it To make everyone better, this is in the meantime, asking to update the FreeJugun Library: When I want to influence time in the tests, I use it in all my projects. Have a look at this. Basic Answer: It is always dangerous to change the i

c# - Creating XML file header -

I want to create XML file with dynamic title open & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Urlset xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schema location = "http://www.sitemaps.org/schemas/sitemap/0.9 http: // www. Sitemaps .org / schemas / sitemap / 0.9 / sitemap.xsd "xmlns =" ​​http://www.sitemaps.org/schemas/sitemap/0.9 "& gt; & Lt; URL & gt; How do I create this urlset node? with 3.5, something like: XNamespace ns = " Http://www.sitemaps.org/schemas/sitemap/0.9 "; X-namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"; XDocument Document = New XDocument (New XDeclaration ("1.0", "utf-8", Faucet), New XElement (ns + "urlset", New XAttribute (XNamespace.Xmlns + "xsi", xsi), New XAttribute (xsi + "Schema Location", "http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sit

encryption - obfuscate or encrypt some plain text data in PHP -

I need to obscure or encrypt some plain text data in my PHP 5.2 application. I want to find a solution that will keep the input string and the output string in the same length. There is no need to be very strong, because it would be nice to empower many other layers of security, but this programmer / dba / support people / etc against reading the wrong text within the database . The main idea Adid edited I would prefer a solution where input string and output string will maintain the same length. Only the string text will be encrypted / stored in the database To save the php application database and read the / dencrypt database this is an amendment to an existing application only a few columns only a few lines see only a few loads To go beyond understanding / Encrypted, a type field will be required to go beyond the understanding / saving / encrypted Maximum column size is already available for some areas Determined, but not for others, but I prefer a solut

php - How do you handle Zend_Paginator? -

I was watching Zend_Paginator using MVC in the Zend Framework project, and it looks like an intermediate tool. It seems that we can give a selected object as a factory logic, it is interesting because it means that I should return a selected object from my model, is it a good way ? It seems to be a bit heavy to do this, because it will not be required at all times ... I can also give an array which, as a result of my law model Can come, but in this case where I have a lot of data, it can be complicated to get all the data from my database every time. How do I manage it? However, a single counting or supplying itself is counted. See the setRowCount () method in DbSelect Optimizer for more information. and In the case of a null adapter, you will have to give an item count to your constructor in exchange for a data collection. I would recommend counting myself, and then manually setting it up. That is, I have just done it on the basis of reading. Apart from this

Resume parser in Ruby/(Rails Plugin/Gem) -

Is a Rabbi gem / rail plugin available to resume and import that information into an object / form? I may be wrong, but I do not think you will get anything completely Automate to do this, because a resume (or CV) can be structured in so many different ways and can contain very different types of data. You can find useful . Here are some other suggestions that can help: - There can be a problem with the accuracy of any completely automated solution, because it is a difficult problem to technically solve. A user is required to enter their details in a form on their website rather than uploading a Word document. You can then explicitly ask for the data you want and you will be able to store the data in the structure that is suitable for you. However, this could be a great deal of hindrance for your users. Allow a user to publish their resume using the URL. Sites are already publishing résumés in this format. Is a ruby ​​gem that can parse microformions including HR

.net - C# String representation of method -

Is there a way in .NET 3.0 (or earlier) to represent the string of a method? I know that I can get an IL byte array from the Methodobi object, but I am interested in getting a string that basically reflects the law body because it is VS. Appears in my eyes. I have poked up to see if there was any way to convert codemember methods to the runtime, but I have come to dry now. Any thoughts? This is a very complex task, in fact, you want to rewrite your code ... and Do not forget that all IL can not be reversed. A short answer "No, nothing has been made". Expression trees (from Lambda also) can not easily reverse the appropriate strings completely .

io - Is it possible to discover plugged disks from Java? -

I am writing a disk crawler and if the user does not provide the current path then the program should search all the disks available. Does anyone know if this is possible and if Java is to do this? Try it out: File.listRoots ();

Unable to solve a Python error message -

For the "Introduction to Program" course. The code from the lecture notes of Polarari-Malmi is: DIF (main): Print "Ozlma Laski Assentolanan Cucocuerate." Rivi = raw_input ( "Anna lainasumma:") lainasumma = float (Rivi) Rivi = raw_input ( "Ana Laina- Aika vuosina:") laina_aika = int (Rivi) If laina_aika & LT; 1: print "liian lyhyt Laina-Aika" rest: kk_lkm = 12 * laina_aika Rivi = raw_input ( "Anna korkoprosentti:") korko = float (Rivi) lyhennys = lainasumma / kk_lkm paaoma = lainasumma i = 0 print "lyhennys korko yhteensa" While I & lt; kk_lkm: i = i + 1 = korkoera korko / 1200.0 * paaoma paaoma = paaoma - lyhennys kuukausiera = korkoera + lyhennys Print ".% 2% 8.2f% 8.2f% 8.2f"% \ # mistake probably here (I, lyhennys, korkoera, kuukausiera) main () I syntax error is syntax error: line continuation character after unexpected character How can you solve the error message? Many

php - Blog in CodeIgniter : Where Does the Model start, and the Controller End? -

I'm testing CodeIgniter, and am trying to create a simple blog. But the video tutorial is good but very incomplete I am not very familiar with the MVC structure, and I am wondering how the model is used. For example, I am currently running "Admin" of my blog, which allows you to create, delete, and modify entries. Only XHtml in the scene, and the controller takes care of the rest What should be in the model? Is everything in database related model (i.e. inserts, updates, selections, etc.)? Depends on what you ask. Some people should put as much as possible in the model (verification, data retrieval, etc.), and the controller should smash it to get this required data, which is then handheld about this view Think: If you have more than one controller, then access a model, then common things should not be kept in a common place between them (unless the normal thing is actually something to do with the model) ?

multiple dynamically generated checkboxes in PHP/MySQL -

मेरे पास एक चेक बॉक्स है जो एक MySQL तालिका से बाहर आ रहे हैं: & Lt;? Php $ result = mysql_query ("चयन करें से * रणनीतियाँ"); यदि (! $ परिणाम) {मर ("डेटाबेस क्वेरी विफल:"। Mysql_error ()); } जबकि ($ पंक्ति = mysql_fetch_array ($ परिणाम)) {$ रणनीतिकार = $ पंक्ति ['नाम']; $ रणनीतिक नाम = htmlspecialchars ($ पंक्ति ['नाम']); गूंज '& lt; इनपुट प्रकार = "चेकबॉक्स" नाम = "रणनीति []" मान = "'। $ Strategylist। '" / "Gt; । $ Strategyname; }? & Gt; मैं एक "अध्ययन" तालिका पर प्रत्येक पंक्ति में कई "रणनीतियों" को स्टोर करने में सक्षम होना चाहता हूं, इसलिए मैं अध्ययन के आईडी को स्टोर करने के लिए एक अन्य तालिका (एसएसलिंक) का उपयोग कर रहा हूं रणनीति का नाम यह आंशिक रूप से है क्योंकि वहां "रणनीतियों" की एक बढ़ती हुई संख्या होगी, इसलिए उन्हें डेटाबेस में संग्रहीत करने की आवश्यकता है। यह वह कोड है जो मैं वर्तमान में उपयोग कर रहा हूं: & lt;? Php if (isset ($ _ POST

sql server - Transaction Isolation Level Scopes -

What are the rules for the level of transaction segregation in SQL Server 2005? I know what the different levels mean, but not the manner of implementing them properly outside the script that runs manually. I can not find a guide for practical use in the production-quality code. Obviously, when you use a command like this, it starts: SET transaction isolation level impossible to read But where is this end? If I set the ISO level in a stored procedure and then calls that call, then nested corridor receives it? Even better, if I increase the ISO level inside the nested process, then it will be returned to the calling coop. Does not the transaction command such as BEGIN TRAN, ROLLBACK, and COMMIT create any differences? When a stored proc is called from an application or an agent's job, changes in the level of isolation continue in some way? Do I have to return to the default read commencement at the end of every process? I will test it in different situations but I do

html - YUI Grid CSS for 100% width page with custom template width -

I'm using Yahoo's UI grid to structure most of my pages. One of my pages is Google Maps and I need a left column of approximately 400 pixels to keep the map panel information. The YUI grid only gives 3 columns for their 100% page layout, i.e. 160px, 180px and 300px. Is there any way that I can customize their 'Template 3' which should have 300px columns in my 400px column? I have determined how to do this. YUI Yatra for Nate in the Forum to point me in the right direction To set a fixed left column, you have to divide the width of column pixel 13 to determine the M for all non-IE browsers. For IE, divide the column width by 13.3333 For example, for a fixed 480 px width, 480/13 gives me 36.9231m for non-IE and for 480 / 13.33 IE 36em is Using template 3, CSS is: .UE-T3 .UE-B {float: left; Width: 12.3207em; * Width: 12.0106em; }. Yui-t3 # yui-main .yui-b {margin-left: 36.9231em; * Margin-left: 36 AM; } In addition, if you want zero margins of margin

iphone - How to update view with UIButtons -

I have been able to button subview a toolbar in your navigation bar and a container visual whose property app relies on state current button set to viewWillAppear , so it was the right thing occurs when I navigate away from the scene to return I thought [ContainerView setNeedsDisplay] will do the trick, but no one (I believe that the container is forced to update I have UITextViews when textView.text is changed, but the application logic is such that it It is difficult to clearly update all of the correct buttons in the form of changes in the state.) after "div class =" itemprop = "text"> You can change the navigation status and toolbar buttons anywhere in your code. For the initial setup of the scene, some code is useful for viewing WILLDisappear and viewWillAppear, as you did. For example, when you have added some text to your text field you can simply start a new UIBarButtonItem and enter it from the program 'Enter' to 'Cancel&

php - What type of hash does WordPress use? -

What type of hash does WordPress use? Here is an example of a WordPress hash: $ P $ Bp.ZDNMM98mGNxCtHSkc1DqdRPXeoR The implementation of WordPress password Hashar, used in the content management system such as WordPress and Drop. goes. They used MD5 in older versions, but unfortunately for me, no more You can generate a hash by using this encryption scheme.

svn - How to use an Internet Subversion respository when developing code? -

I have portrayed myself in a problem working with CodePlex with a Subvision Project - for this I have helped I have a local store and the codepacks have internet stores for this project, and do not mix two: - (. But my dear father used to tell me this That a clever man and a wise man In the second words: I must have done something wrong, therefore: Say that you are a group, some developers, one on the internet Subversion is a controlled project that you want to modify. You want to work it locally, want to change it to suit your needs, you want local version control. Postgate - which are relevant and important and are not the cause of noise. You want to make some local changes from the internet - those that you are sure are stable, and that are relevant to the entire community. This method of operation seems to me common sense, but then I have never worked on an open source project. Therefore: 1. This is actually a common method of operation and 2. How do you go about doing th

asp.net - AjaxPro and OnTimeOut error -

मुझे अपने AjaxPro प्रोजेक्ट में निम्न त्रुटि हो रही है: त्रुटि: this.onTimeout फ़ंक्शन नहीं है स्रोत: http: // localhost: 3405 / ajaxpro / core.ashx रेखा: 407 मुझे पता है कि यह अजाक्सप्रो की रिहाई के साथ कुछ है, लेकिन इनमें से कोई भी आपके पास एक ऐसा संस्करण है जिसमें उस त्रुटि नहीं होती है? या मैं इसे कैसे ठीक कर सकता हूं? मैंने किसी भी भाग्य के बिना अजाक्सप्रो.info से नवीनतम संस्करण डाउनलोड किया है। कृपया अतुल्यकालिक कॉल का उपयोग करें, जैसे जावास्क्रिप्ट में: फ़ंक्शन getServerTime () {test_Default8.GetServerTime (getServerTime_callback); // एसिंक्रोनस कॉल} // इस पद्धति को विधि निष्पादित करने के बाद कहा जाएगा // और परिणाम क्लाइंट को भेजा गया है। फ़ंक्शन getServerTime_callback (Res) {चेतावनी (res.value); } यह आपकी समस्या का समाधान करेगा।

regex - Java - Reg expression using groups -

"itemprop =" text "> After one string, I need to exit groups that match a given pattern. An example string: & lt; XmlLrvs & gt; First & lt; / XmlLrvs & gt; & Lt; XmlLrvs & gt; Second & lt; / XmlLrvs & gt; & Lt; XmlLrvs & gt; Third & lt; / XmlLrvs & gt; Each group will start with & lt; XmlLrvs & gt; and & lt; / XmlLrvs & gt; Ends with . Here is my code ... string is a piece of patternStr = "(; XmlLrvs & gt;. & Lt; & lt / XmlLrvs & gt;);"; // compile and use regular expressions pattern pattern = Pattern.compile (patternStr); Matcher matcher = pattern.matcher (text); Matcher.matches (); Go to all groups for this match for // (I int = 1; I & lt; = matcher.groupCount (); i ++) {println (matcher.group (i)); } The product is & lt; XmlLrvs & gt; Third & lt; / XmlLrvs & gt; . I expect the first and the second group but they are not being captured. C

matlab - How to represent a polygon with hole(s)? -

Image
It is usually popular for working with polygons, in whose order CW or CCW vectors (2 * 1 or 1 * 2 metric). However, how to make polygons holes in vectors? I am going to introduce various processes on these polygons, so I want to represent those representatives with whom I can work easily or efficiently. (I.e., how would I explain such algorithms to such polygons in my program?) Polygon is 2D and I am programming in the catalog. Edit 1: I am going to calculate these polygons (with or without holes). As mentioned by others, polygon with holes be presented as an external boundary More than zero interior borders, all of which are mutually irreversible *. If you use the nozzle to set the in / out, then be sure to specify your inner borders in the opposite direction as the outer bounds (the counter-clockwise for the external and the clockwise for the interior, or vice versa, vice versa), so that the contour The integrals are zero inside the hole. FYI, type definition / repr

php print array using nested foreach -

How would I like to print this array with the way to organize this way this is my The array is & gt; [Category5] = & gt; Category_1 & gt; [Item 2] under category 1 = & gt; Category 1 & gt; [Item 3] under category 4 = & gt; Category_2 & gt; [Item 4] under category 4 = & gt; Category_3 & gt; [Item under item 5] = & gt; Category_3 & gt; [Item 6] under category 7 = & gt; Category_3 & gt; [Item 7 under category 7] = & gt; Category_3 & gt; [Item 8] under category 8 = & gt; Category_3) Output should like this: Category 1 item 1 items 2 category_2 items 3 items 4 items 4 items 7 items 7 items 8 < / Code> Is there any way I can do that? Or the method of my argument is wrong to organize my array? My database table record is like this category item 1 1 2 2 3 3 4 3 5 3 6 3 7 3 8 < P> Can anyone help? You probably need to adjust the layout and line breaks, but I think that you get this idea Rece

java - How to create "clone" of controller in Grails? -

I have a menu that is loaded with the main layout. In the menu, I need to highlight a specific menu if users click on that menu and I find it based on the controller name. I have 2 menus who have different names, such as User Editing and Client Edit. Both actually share the same controller (i.e.: UserController) and the same domain. I tried to create a nickname for this in UrlMappings like ": / client / edit /" (Controller: "user", Action: "edit") But the layout on the main does not appear to be recognized as "customer" but as a "user" Is there a good way to solve this problem without repetition? Am I the successor to the controller? If so how do ... Thank you very much. Use a filter to add the name of the controller to the model and modify it to suit Do: For example, put it in /grails-app/conf/MenuAddingFilter.groovy class menuadding filter {static filter = {all (controller: '*', verb : '*') {Aft

qt creator - How can I remove files from a QtCreator project -

There may be a very newbie question, but I can not find a way to extract files from my projects in QtCreator Thanks! If your project is generated from the limit, the file list is determined by the CMakeLists.txt file , And you can not manually add or remove files from the source tree in Qt Creator, especially if your CMClist file specifies the glob operator for a project's file list, then you manually delete files from the disk Have to remove And again CMake to run from QtCreator has Build-> Run CMake (QtCreator 3.3. 0). This will update the file list but rebuild the project (CBP) file - will not update the back-to-back project file outside the QT creator and you will have to remove the ghost entries of the deleted files in the source disc. Will go.

jquery - using a variable in the input tag's style attribute -

I have a dropdown box with three values, small, medium and large. If the price is small, then the text that is created should be 100px, if the medium is 200px larger, based on this value 400px, I can save the size in one variable, and use that variable in a style attribute? For example, I value the drop down box <. Code> FieldSize = $ ('# FieldSize') fieldValue (); Can I use the code, if (fielded == "small") {size = 100;} and the style of that size in the style attribute? (Field type == "text") {$ ("& lt; input id = inputstr" + increment + "type = 'text' style = (style = 'width: size PX') 'Width: 100px' & gt; & lt; / Input & gt; & lt; br & gt; & lt; br & gt; "). AppendTo (" # fb_contentarea_col1down21 "); } To check the value of the field, just make a switch statement small = "100px" Then type in your attachment code $ ("<input s

sql server - Concatenating Column Values into a Comma-Separated List -

What is the TSQL syntax for formatting my output, so that the column value appears as a string, which is a comma Be different. Example, my table is low in cars: Carriage exploit ---------------- 1 Porsche 2 Mercedes 3 Ferrari How do I get the name of the car: Porsche, Mercedes, Ferrari You can do a shortcut by using collages to add a series of wires from a record in a table, for example. declare @ AAWar (200) set @AA = '' Select @AA = matter when AA = '' then the second AA + CLASSES (',' + + PROFORM , '') End print from cars @ AA

regex - i'd like to create from a simple XML text SQL using RegExp -

Just simple, I have such data, thousands of & lt; MigratedData & gt; Elements, in general, we use them in the XMLLoader application, but this is a special case, I have to update the database using mapping: & lt; Migrated data & gt; & Lt; MigrationNr & gt; 12123456 & lt; / MigrationNr & gt; & Lt; IdOldSystem & gt; 33398088801 & lt; / IdOldSystem & gt; & Lt; / Migrated data & gt; & lt; Migrated data & gt; & Lt; MigrationNr & gt; 6767 & lt; / MigrationNr & gt; & Lt; IdOldSystem & gt; 21100077878 & lt; / IdOldSystem & gt; & Lt; / MigratedData & gt; & lt; Migrated data & gt; & Lt; MigrationNr & gt; 767,066 & lt; / MigrationNr & gt; & Lt; IdOldSystem & gt; 4545566767676 & lt; / IdOldSystem & gt; & Lt; / MigratedData & gt; I will create such SQL statements: Update Table_1 T1 Set T.CountNR = IDOLS SYSTEM__ Value__from_XML Where

linq to sql - Direct Access to SQL with Silverlight -

I'm new to .NET in general, so I hope this is not even the n00b of a question. I am looking to write a Silverlight app that connects with an MSSQL DB using LINQ. Do I really want to use different WCF services? It seems that there are safety implications, but it will be on a completely reliable network. Thank you in advance In short, the answer is no, you absolutely, the positive Silverlight You can not access the SQL database. You must use WCF to talk to a server that can then run some SQL queries. If you want to use SQL directly from LINQ, you only need it if you are considering the Entity Framework backend, to make updates and tracking easier on the client side, .NET RIA Services or ADO.NET data You can use the services. My personal favorite is NIT RIA services because it has a rich feature set. Good luck!

c# - Windows App (One Click) Vs Web App -

We are transferring our old access VBA / SQL 2005 application to new technologies and we have a window Form Applications Create Microsoft One Click Deploy or ASP.net Website? This application is a Task Force Management System that bookings jobs for dynamic scheduling gantt chart components. It will be used by 400+ users in 20 locations. Can you give me some feedback on these options. If you want the app to be retained in a central location and accessed by users on the Web Go ... so go with the web app. If your team is more familiar with the Windows Forms application, then there is going to be a learning curve with this option (maintaining state, dynamic control, page events, dom, etc.), so the time investment is going to be more. If you want the client to have a rich interface installed on the desktop that you can easily manage from a central location ... go with the Windows Form (or a good user experience To provide WPF). Using the clickon for deployment will ensure th

asp.net mvc - LINQ, Repository Pattern and Database Abstraction -

I have spent some time resolving a problem for which I have no solution yet. I have a predefined huge database, which is fixed, I use a repository pattern to create an abstract layer between the service code and the database argument. The problem is that I have to apply a processing before moving the database object out of the repository before proceeding. Thus I can not use Linq Entities directly. Actually, a repository method looks like this: Public IList & lt; Bookingcode & gt; FindBookingcode (int id) {return (select where b.ID == id b _db.BOOKINGCODE new Bookingcode {id = b.ID, Name = b.NAME.Trim ()}) ToList () .; } This works fine so far. But I have a lot of objects that should be made individually. I FindBookingcode () should return almost all the items, such as catalogs and so on. My problem now is that I would have to re-type the mapping several times like this example: Public IList & lt; Bookingcode & gt; FindBookingcode (int id) {return (b equa

xml - Simplest way of updating SQL Server 2005 from a REST web service -

We have a job management application running (Access) with database in SQL Server 2005. We are providing a third party job to the information that they provide through an SSL web service as an XML using a RAST style interface. The service will be automatically voted on 5 or 10 minutes on a regular basis - basis. Loads need to be loaded into tables for further dragging and manual processing - that is, it is actually limited to retrieving data and loading it in the table. I have full access to the server and I, within reason, I want to deploy any software I'm simple, reliable and strong to reach Looking for ways to recommend your options. Unfortunately the third party company supplies not example codes beyond the PHP class, deploying PHP on the server is an option, but the default PHP installation on Windows does not support XSSL, and I would like to be a more elegant anyway I like the approach. What are my options? The easiest way to write a C # code is to call the

Bug tracking for legacy physics models -

I am the only software engineer on a team that develops a physics model (approximately 30,000 lines of code). In the rest of the team, there are scientist who are preparing their codebes for about 20 years. My workflow goes something like this: The scientist requests a new feature I apply it Via test & Amp; The scientist requests a new feature (without fixing the problems identified in # 3) Our problem seems to be bug tracking e-mail and Post-it is done through notes. Busy work schedule slips below the bug radar for months and months. I think some formal bug trackers (i.e. track, redmin, cumin, fogbug, etc.) can help us. Incredibly easy to use Version control software Integrate with (we use subversion) Lots of posts are suggested ... but I think I'm more interested in this: Is it eligible for the upper part of the baggator? Rtrani to understand (that adheres to the "best practices" of poor software engineering '70s) that is a bug tracke

c# - Convert XML to Plain Text -

itemprop = "text"> My goal is to create an engine that takes the latest HL 7 3.0 CDA documents and with HL 7 2.5 Behind backward compatible creates a fundamentally different animal. The CDA document is an XML file, which is matched with its matching XSL file, which provides an HTML document fit to show the end user. In HL7 2.5, I need to get the rendered text, devoid of any markup, and to distribute it in a text stream (or similar), which I used to 80 to 80 to populate the HL7 2.5 message I can write in letter lines. So far, using XSLCompiledTransform is taking an approach to using XSLT and using a resulting HTML document. My next step is to take that document (or perhaps earlier in one step) and present HTML as text in HTML. I've searched for a while, but how it can be completed, I'm just hoping that I'm just ignoring it or just can not find magical search words. Can anyone help you? FWW, I've read 5 or 10 other questions, which embrace or re

javascript - How can I get this eval() call to work in IE? -

I have some JavaScript that exits and brings a javascript "class" to the other XHTML page. The remote javascript looks something like the following: (function () {this.init = function () {jQuery ("#__ belloons__tabs"). Tab ();};}) < / Code> After this. Javascript is brought in, I try to unload it and try to instantiate it: this.javascript = eval ("(" + this.javascript + ")"); This.javascript = new this.javascript (); This.javascript.init (); Of course, it works perfectly in all browsers except IE, in IE, it does not fail on the eval line, anybody suggest how I do this work or IE I can do alternate. Thanks, Pete You have tried: eval ("this.javascript = (" + this.javascript + ")"); ...?

java - Reading in a JPEG image and calculate image coordinates -

I want to read a JPEG image of a similar gray background with many colored balls of the same size Can take this image and record the coordinates of each ball. What is the best way to do this? I agree with James I use the following program at once to find red boxes at one time. (Most people of the first red box were dyed by the community first): / ** * @ Author @ karnokd, 2008.11.07 * @ Version $ revision 1.0 $ * / public class redlocator {public static class rect {int x; Int y; Int x2; Int y2; } Fixed list & lt; Racket & gt; Rects = new linked list & lt; Rect & gt; (); Static Boolean Checksert (Int x, int y) {for (Rect R: Rex) {if (x> = rx & x & lt; = r.x2 & y> gt; ry & amp; amp; Y & lt; = r.y2) {back to true; } } return false; } Public static zero chief (string [] args throws exceptions {BufferedImage image = ImageIO.read (new file ("fallout3worldmapfull.png")); (Int y = 0; y & lt; image.getHyight ();

Visual Studio Regex '?' -

MSVS: कहां regex ? मेरे पास कोड है जिसे मैं ' एमएसवीएस 2008 में एक नियमित अभिव्यक्ति के साथ मिलान करने की कोशिश कर रहा हूँ, लेकिन मैं इसके लिए regex का पता नहीं लगा सकता। क्लासिक उदाहरण लें: colou? R ... जो एक नियमित अभिव्यक्ति है जो color या रंग । यह एमएसवीएस में न तो मेल खाता है। मदद फ़ाइल का जिक्र करते हुए, मुझे ? नहीं मिल सकता है। यह एक बड़ा सौदा नहीं होगा - इसे वैकल्पिक रूप से अनुकरण किया जा सकता है: Colo (u |) r हालांकि, मुझे मिल जाता है "समूहित अभिव्यक्ति गायब है ')' '... जो ... यह नहीं है। अजीब तरह से, एमएसवीएस में ये वैकल्पिक समूह हैं (मुझे वाकई यकीन नहीं है कि क्यों ...) घुंघराले ब्रेसिज़ के साथ: colo {u}} r जो मुझे "पैटर्न में सिंटैक्स त्रुटि" की पूरी तरह से अलग त्रुटि देता है ..., जो मुझे एक नहीं दिख रहा है असल में, मैं एक कैसे करूँ? मेरा वास्तविक इनपुट रंग / रंग के रूप में सरल नहीं है, अन्यथा मैं इसे (color | color) के साथ नकली करता हूं। मुझे लगता है कि यह नकली हो सकता है, लेकिन यह इसके बारे में जाने के लिए

c# - Fastest way to compare a string with an array of strings in C#2.0 -

What is the fastest way to compare the string with an array of stars in C # 2.0? Do you want to see if the string is in the array or not? I do not remember if arrays are supported. Command () method, so if not, create list & lt; Add your array to the list via String>, Adren (), then call the list. Insert ({string to compare}) This will return the boolean value whether or not it is in the string array

javascript - combining multiple .js files into one in a build process -

Any suggestions on the combination of multiple .js files in 1 (for the production process). Yuicompressor will do it? YUI Compressor can do this very easily, just send it in file names and give it a file Output as. For example > yuicompressor-2.4.2 file1.js file2.js file3.js -o combined.min.js

Compare associative array with standard array values PHP -

I have a set of ID and name in an associative array and in my other array I have my list of IDs I want to compare against the first list. I want to be able to do an intersection type search function without losing name from associate array. However, I am doing a nested advance, but it seems that this process can take forever because both arrays can potentially contain 70k + values. $ assoc = array ('a' = & gt; 'one', 'b '= & Gt;' two ',); $ Array = array ('b', 'c', 'd'); $ Match = array_intersect_key ($ assoc, array_flip ($ array)); Print_r ($ match); Output: array ([b] = & gt; two) I believe that you What are you after 're.

objective c - Mouse events for an NSSegmentedCell subclass? -

I am trying to apply some basic tabs to the coco editor on which I am working. I am using an NSSegmentedControl and adding it as a tab. I'm using a custom NSSegmentedCell subclass for tabs to pull a little 'X' icon next to the text to close the tabs and now Till it is getting very greasy. However, I can not understand how to actually check the process of mouse events for tabs, whether someone has been placed on the 'x' icon (or clicked on) I tried to override the "mouse mood" in the NSSegmentedControl subclass, but for some strange reasons when I add a new segment to it (I set "setAcceptptsMouseMovedEvents" in awakeFromNib, do I have to set it somewhere else Is it?). NSSegmentedCells, there are no mouse tracking processing when the NSCell subclasses are done, on one hand, mouse tracking, which only starts when the control is clicked. So the question is, how do I process mouse events properly, either in NSSegmentedControl or in the NSSegme

actionscript - How do you inject metadata into a f4v file? -

I was wondering how do you inject the metadata into a f4v file with quepoints? I was reading somewhere that it is either during encoding or a custom action that embeds while playing the file. An F4V file is only a named MP4 file, any tool that works on a MP3 file, tip And for technology F4V files do this. The demand for MP3 files is not trivial, and it is more difficult than the FLV files, which I think of you (but maybe I'm wrong?) He said, after the meta data you are, it is probably already in MOPO nuclear atom. (MP3 files are composed of atoms. MOOV atomic meta data is atom.) Probably there is no need to inject it. But, to get started early and one player might be able to find a file, you need MOOV 'atom' in front of the file. There are tools to do this on existing files, and this can be done while encoding the file. I have never heard of doing so.

session - ASP.NET MVC how to implement link which returns to previous page? -

The title said all this. Some references: me represents a search mechanism - visual search, the search results view and got a description of the scene (one of the results, such as the webform See a form). I want a link in the details view, which will return the user to look at the search results. think : just read about Temptata, but I think it will not help, because the user wants to go back to some action. The session can work, but I'm not sure how to fix it. I do not want to use javascript to complete it. Edit to: think I'll stick with the EU-G-Ne'senshn is. Here's the result: using the #region system. Web.Mvc; Using CompanyName.UI.UIApp.Infrastructure.Enums; # Ndrian namespace company name. UIUIPP. Infrastructure. Filter {/// & lt; Summary & gt; To apply the URL of the request in the /// session, apply the action method to the /// & lt; / Summary & gt; Public class RememberUrlAttribute: ActionFilterAttribute {public override

.net - StateServer to save session -

We are going to update our asp.net application to save session in the state server. Any update is necessary to avoid problems after the update? It is running in IIS 6 and IIS 7. Thanks, p. Gopalakrishnan I believe that the static server will implement this requirement that all the object serials stored in session Should be there. It may not have been implemented by InPork. Be sure to test before going into production.