Posts

c# - Syncing referential integrity tables and enums -

I think this question periodically, so I thought I would ask you about it. Suppose my database table looks like this: Table: Visibility ID value - ----- 0 visible 1 invisible 2 collapsed This is a table to ensure only one table. It is basically an enumen stored in the database for the purpose of ensuring that any visibility values ​​that appear in other tables, Are always valid. At the end of my face, I have some options. I can ask this table and give it a dictionary & lt; String, int & gt; or dictionary & lt; Int, string & gt; I can store in . I can write an ANM manually and only manually edit the value in rare event that there is a change in the table. E.g., Public Enum Visibility {visible, invisible, collapsed} Something else ???? What would you advise and why? Thank you. This kind of fairly trivial stuff for me, I usually go with an enum, I like this with you. I can recognize that I think it is not entirely right ... but in my opin...

Change Mysql, php and apache2 log file formats -

मैं php त्रुटियाँ, सभी mysql प्रश्नों, apache2 त्रुटियों और mod_rewrite डिबगिंग को एक फाइल में भेज रहा हूं, यह कहने की जरूरत नहीं है कि इसमें व्यस्त है । स्वरूप बदल सकते हैं: [22-Jul-2009 23:00:58] पैरामीटर: GRE Array () POST Array () [22- Jul-2009 23:00:58] एसोसिएशनों को ढूंढना 237 प्रश्न का चयन करें `तालिका`। * तालिका से जहां 1 = 1 आदेश दिनांक एएससी 237 प्रश्न का चयन करें` तालिका 2`। * से 'तालिका 2' कहां रैंड () आईडी के आधार पर 237 Quit [Wed Jul 22 23:00:58 2009] [त्रुटि] [क्लाइंट 127.0.0.1] स्क्रिप्ट '/var/www/default/public/static/js/menu.js' पाया नहीं गया या stat करने में असमर्थ, रेफरर: Http: // localhost [Wed Jul 22 23:58:58 2009] [त्रुटि] [क्लाइंट 127.0.0.1] स्क्रिप्ट '/var/www/default/public/404.php' नहीं मिला या स्टेट में असमर्थ, रेफरर: http : // स्थानीयहोस्ट 090722 23:03:00 238 परियोजना पर @ स्थानीयहोस्ट से कनेक्ट करें 238 क्वेरी का चयन करें @@ sql_mode 238 प्रश्न SET सत्र sql_mode = '' 238 क्वेरी एसईटी नाम utf8 238 क्वेरी का चयन @@ SQ...

ruby - Rails partials and HAML -

I have an Ajax method that interprets users @collection. This code is from partial users. Now what I need to do is wrap around one of the 3l tags for every third object. I can do this with HAML? I can not just add the% ul tag to "when 1" - because that object stopped when the object was provided. - User-client for K + 1- Then 1% li.prost @user.login - all 2% li @ uer.login- then 3% le.lal@user.login This is the result I am looking for: etc. I think you want every_slice . It makes a countable partition in groups of the specified size. You can do something like this: - @ collection.each_slice (3) Two | Slices | % Ul% li.first = slice [0] .login% li = piece [1] .login% li.last = slice [2] .login

Pasting images into Silverlight -

I'm exploring a way to enable images for my users to paste images into their Silverlight component (a text box In, I think, or is there any better control to do this?). For security reasons, there is no clipboard access from the code in the computer that has been read, except that using the Javascript function which only works with IE But what if the user asks for a browser command (Ctrl-V or Menu) to paste data? I can see that it works with the text, so I am thinking that I can do this for pictures. Any help appreciated. The only way to access images from the user's vibrator is copy / paste not working .

javascript - What is Jquery's alternative to Mootools MochaUI? -

is very intuitive and unfortunately, to replicate the modal iframes almost completely, I have the scripts written in Jquery Used, and I have heard that there is conflict in putting an entire HTML and jquery on an HTML file (is this true?). How can I feature in Mokuyi Jquery? At the very least, is there a similar modal dialogue system? I have seen the JqueryUI dialogue but it makes the background dark and non-functional, which is not what I see. with some tweaking (Enable jQuery noConflict-Mode, replace the $ selector with something like $ jq Let you both be able to work. However, you can easily end up with a Frankstein app that mixes mitols and jazzy plugins apart from that Javascript load is quite prevalent, because you can see Mototels, Jacquire and their top-level UI toolkits Include I recommend that you check whether JQuery UI may replace MochaUI (or vice versa). It is easy to maintain a combination of JS Lib + UI Toolkit so far. The downside of MOAUUI is that...

How to build and run a data-generating tool in a Visual Studio build? -

My main project creates some software that requires a data file ('image' below). This image comes from another program, which I can create in any other project. I want to automate all of these in a Visual Studio (2008) solution. In the summary I have the following dependencies: Software.exa should run only if the image depends on the software.exe (but the image No) Image depends on tool.exe and other data files tool.exe depends on Tool.c Attempted to add a post build event to .vcproj, which runs the tool.exa. It works, except that it does not auto-execute the tool.exe if the image is unavailable or other data files have changed. Suggestions?

Stacking a variable in reverse in PHP -

I have a loop that spits the values ​​and it is inserted into the string: $ all_values ​​= ""; While loop {$ value = "..."; $ All_values ​​= $ value ""; } Output: 1,3,8,2,10 ... The easiest way to output the same thing, but the number in reverse is so That example will come out like ... 10,2,8,3,1 Put everything in an array and then join it, vice versa: $ all_values ​​= array (); While loop {$ value = "..."; $ All_values ​​[] = $ value; } $ All_values ​​= implode (',', array_reverse ($ all_values)); It is even more efficient at millions of values.