Posts

Showing posts from September, 2011

html - Style a definitition list as simple key value set -

I want to use a definition list such as: & lt; Dl & gt; ; & Lt; DT & gt; Name: & lt; / Dt & gt; & Lt; Dd & gt; Tomas & lt; / Dd> & Lt; DT & gt; Address: & lt; / Dt & gt; & Lt; Dd & gt; This is a very long wrapping address & lt; / Dd> & Lt; DT & gt; Age: & lt; DT & gt; & Lt; Dd & gt; 29 & lt; / Dd> & Lt; DL & gt; To render something like this: Name: Tomas address: This is a very long wrapping address age: 29 Looks meaningfully the best option in definition list. Using the new run-in display style would be the trick: & lt; Style & gt; DT {display: run-in; } & Lt; / Style & gt; but it is not yet widely supported. How can I change my definition list to better cross-browser support (i.e. not necessarily 6), without changing html Currently I use Inline Display and add ugly bricks)? To clarify edit: dt {clear: left; } Dd {float: left; } w

java - Criteria queries in EJB 3 -

Can I use benchmarking questions with EJB 3 units? If so, how can I combine them with EntityManager? JPA does not provide a benchmark API such as Hibernate But you can use, a library that provides an API based on the Hibernate Criteria API design for the firmness of EJB3. Ejb3criteria can be used with any EJB3 firmness implementation.

mysql - Django: create Index: non-unique, multiple column -

Looking at the following model, I want to index fields (sequence, stock) class quote model (models.model): quotedate = models.DateField () high = models.FloatField () # (9.2) default faucet, low = model. Floatfield () # (9,2) default faucet, close = model. Flatfield () # (9.2) default faucet, closes = model. Flatfield () # (9.2) default null, volume = model.tectorfield () # (9, 2) default faucet, stock = model.tegerfield (db_indicate = tru) # (9.2) default faucet, open = model. Flatfield () # (9.2) default faucet, Sequence = Model.IntergerField () # (9, 2) Default faucet, This index should be unique - Something like this in mysql : Model_quoteManage index ndx_1 on the modell (sequence, share); I know that the same Django solution is creating a "SQL" file that will be executed by the deployment on table construction. Therefore, I have created a "Stockmodel SQL" that has the following query (as given above) Model_totmode index ndx_1 on modell (seque

c# - Difference between a WebControl and a CompositeControl? -

I'm looking around the web and got some articles about the subject, but I still do not understand the difference Between them I have the code shown, if I get it from the composite control, it works perfectly, but if I do not deprive of WebControl (they both present the code, but only handles the compositing control event) using the system; Using System.Web.UI; Using System.Web.UI.WebControls; Namespace Test Library {Public class template control: composite control (text box; txtName = new text box); Text box txtEmail = new text box (); Button btnSend = new button (); Private Zero Setwels () {btnSend.Text = "Skicka"; } Protected override zero CreateChildControls () {SetValues ​​(); this. Control. Add (New Little Control ("Nunn:")); This.Controls.Add (txtName); this. Control. Add (New Little Control ("& lt; br / & gt;")); this. Control. Add (New Little Control ("Email:")); This.Controls.Add (txtEmail); this. Control. Add (New Lit

ruby - Design to distribute work when generating task oriented input for legacy dos application? -

I'm trying to automate a very old dos app, I've decided to do the best way to do this. In the work of heritage app (menu driven), there are many functions with branches in logic. To easily understand and reuse the input of these tasks, I want to break them into bit-sized pieces. Since I need to start a new app on each run, so can be messy repeating the references to make a little experimentation. I want to create an object model which: allows me to focus on work on the hands Start me individually Prevents me from calling a job from the wrong starting point To be more clear, I have been given the following job hierarchy: Start AA1A1A A1BA2A2BBB1B1A I like an object model that allows me to generate an input file for the "A1b" function using a task like "blocks": START - & gt; Do_A, do_A1, do_A1b but this prevents me from: START -> Do_A1 // Because I'm assuming a separate call series from above This will help me writ

SQL Server user name functions -

इस टी-एसक्यूएल पर विचार करें: लॉगिन के बिना उपयोगकर्ता my_test_user बनाएं; SELECT USER_NAME (), USER, SUSER_SNAME (), SYSTEM_USER, suser_name (); USER के रूप में EXECUTE = 'my_test_user' कोई रिवर्स के साथ; SELECT USER_NAME (), USER, SUSER_SNAME (), SYSTEM_USER, suser_name (); मैं इन खातों का उपयोग देख रहा हूं लॉगिंग के बिना ऑडिटिंग उद्देश्यों के लिए असल में, मेरा "एक डेटाबेस कनेक्शन प्राप्त" कोड उस कनेक्शन को देता है जिस पर EXECUTE उपयोगकर्ता के रूप में उपयोग किया जाता है ... कोई भी रिवर्स के साथ पहले ही निष्पादित हो चुका है। समस्या यह है कि मैं इन उपयोगकर्ता नाम कार्यों में से किसी एक से लगातार परिणाम प्राप्त नहीं आउटपुट की दो पंक्तियां हैं: डीबो डीबो मूल_जुर मूल_जुर मूल_जुर my_test_user my_test_user S-1- 9-3-xxxxx .. S-1- 9-3-XXXXX .. एस -1- 9-3 -xxXXX .. USER फ़ंक्शन 'एक्सी्यूट एएस' के बाद सही उत्पादन का उत्पादन करते हैं, लेकिन पहले से ही वे उपयोगकर्ता नाम के बजाय डीबी दिखा रहे हैं SUSER फ़ंक्शंस केवल विपरीत हैं - वे शुरू में सही ह

jquery - Javascript: Detect when move a browser window -

Is there a way to know about events when walking with a window "window.open"? It can use JavaScript or jQuery Thanks. If you mean the physical browser window only, no. Runs sandboxed in the context of Javascript window; You can not handle events outside of it.

php - Passing query string to JS window.open in IE7 doesn't work? -

I can fix the following through the address bar in Firefox: javascript : Window.open ("http://my.hostname.com/test.php?id=12345", "ExportVoice"); When I print_r ($ _GET), I see the $ _GET array with values ​​specified in the URL. But when I do this in IE 7, this screen But "blank" prints. EDIT is caused by a popup blocker, however, the actual code that the snap does not work - I get an array in IE When print_r-ing: $ page-> Click on addJQuery ('$ ("#pageForm Div.export") (function () {'. $ JQueryVars. 'Window.open ("'. $ This- & gt; getUrl (). '' '. $ $ $ JQuery. ', "ExportWindow"); returning false;});';);

Can c++ create array of pointers to different classes dynamically loaded from dll? -

Can the array of pointers in various classes dynamically loaded from C ++ DAL? Headers with square definitions I think you need an exported function that class Then you can definitely put these values ​​in the array.

multiple monitors - wpf app appears to be blocking extended screen functionality on hp laptop -

I ran into a strange problem where "HTTP - F4" combinations expanded on my HP laptop to expand the screen on a Html - The bar will stop working. I have a wpf application running, this happens even when I create an empty app - as soon as I run it, I can not extend my desktop to another monitor. Thank you! Looks like a problem with your video driver. What type of video card is this? Are you running the latest driver from the seller?

visualsvn server - Creating a checkout-once type thing with SVN -

Let me know some ASPNETDB MDF files have to be managed with their SubView repo. Every time I go to my site and make some updates in this file. Which does not want This can not be even readable or the site fails to open the file and returns a good little error. What kind of property should I use, this database is only necessary for webpart communication, and no matter what is inside it, because developers never change anything directly in it Are there. So, I just can not ignore because I still need the file in repo So what do I do? Just asked people to copy it manually? For example "normal" example "MDF" will be stored in the "repository as something" as ASPNETDB. " .mdf.EXAMPLE" and then the developers will call it "ASPNETDB.MDF" in the same directory. Let's copy. Then put an overlook on the actual MDF. I used this strategy with local configuration files to prevent continuous process of returning a file.

c# - How can I find out if there are windows above a control? -

If I have Winforms controls, can it be possible to tell whether the window above it (from any application)? Actually, I have to know that some parts of my control are actually appearing on the screen. If you are happy to p / call, the EnumWindows function provides all top-level windows HWND on the screen is; This allows you to get a Non-Client Rectangle (GetWindowRect) to compare the limits of your form. This non-rectangular opaque areas (media player and fancy skins for choice), so you can be false positive for such a control window.

c# - Binding a POCO to an html document and generating the result to a string -

I'm trying to return an HTML string with a method in the class library (why not ask). What I would like to do within the law, an example of a POCO from my domain will be found, then open an HTML document (maybe it's from a file or it might be a string from somewhere else), then the document Pass POCO (which is binding to POCOs properties), then generates html as a result Has it done in the NAT framework? I saw this article on the HtmlDocument class, but was expecting all the direct elements to avoid access and assignment: You can use the templating engine to achieve it. The first step is to define your HTML template with a placeholder for the object property value. Then you feed the templating engine with a template and an object that will give the end result. Here's an example used: class program {static zero main (string [] arg) {Velocity.Init (); // Define a template that will represent your HTML structure. Var template = "& lt; html> gt; body

cluster analysis - a simple/practical example of fuzzy c-means algorithm -

I am writing my master thesis on the topic of dynamic keystroke authentication. To support ongoing research, I am writing code to test different extraction of feature extraction and feature matching. My current simple approach just checks that the password passcode keycodes match the currently typed keycodes and also checks the key bar (residual) and key bar (flight) reference times Are +/- 100ms (tolerance). It's definitely very limited and I want to extend it with fuzzy C-pattern pattern matching. These features are visible for each key: Keycode, Resident, Flight Time (First flight time is always 0) Obviously that kikod can be removed from the fuzzy algorithm because they should be exactly the same. In this context, what does the practical implementation of Fuzzy C-sense look like? Normally, you do the following: How many Want to cluster (2? "Authentic" and "fake"?) Determine what element you want to cluster (personal keystroke? Login attem

vb6 - How to select a file automatically? -

Use of VB6 Now I am using a browse button in my software, text To select the file, then it has been converted to MDB (Access). I do not want to select text file. Once I install my software in any system, the text file will automatically select in the specified path. Then the text file is automatically converted to MDB once it is converted to MDB Vb code to convert MBB to text. In the form of slow DB database, Table DB = DBeijin Set the OpenDatabase (App.Path & amp;; "\ History.mdb") tbl = db.CreateTableDef ("Temp") tbl.connect = "text; database =" & amp; App.Path & amp; "/ Convert /" TBL SourceTebName = Strawptup & amp; ".txt" db.TableDefs.Append tbl db.Execute "Select Temp.ID, Temp.IDTerminal, Temp.Reader, Temp.Date, Temp.Time, Temp.Cardnumber" & amp; StrOutput & amp; "Temp" db.TableDefs.Delete ("Temp") db. Close MsgBox strOutput sql2 = "Select from Events" Se

Truncate white space in text in iphone/objective c -

Is there a function to remove white spaces from text messages in Objective C? For example: For "How are you", the result should be "howareyou" Thank you in advance. You can use components of NSString to set the sensor with whitespace SeparateBearactors Set the inserts, first whotspace Split the string on, and then join the component using componentsJoinedByString of NSArray. For example. NSString * myString = @ "How are you"; MyString = [[[MyString Components] SeparatorActors Inset: [NSCharacterSet whitespaceCharacterSet]] componentsJoinedByString: @ ""]; NSLog (myString); // display haureau

c# - Strange slowness while iterating over Linq result -

While searching for a recent time, I saw that the algorithm looked slow. Deeply deeply I found that it was not a linq code, but it took long after the result of the output. (So ​​far I have noticed that the success for Mark Budget Beat to kill slickest Linq.) code: DateTime dt = DateTime.Now; Console.lightline ("alge start" + dt. Second + "." + Dt. Milliseconds); Var qry = enumerable.Range (100000, 999999) Let's s = l.ToString () Let sReversed = New String (S. Riversse). From ToArray ()) I select Enumerable.Range (3, 9) two T = (L * I). Ostring () where T == sreversed new {l, i}; DT = DateTime.Now; Console.lightline ("alge and" + dt.Second + "." + Dt.Millisecond); Foreach (var row in curie) console Virite line ("{0} x {1} = {2}", line.l, row.i, line.l * row.i); DT = DateTime.Now; Console.lightline ("disp and" + dt. Seconds + "." + Dt. milliseconds); Output: Algee 20.257 alg and 20.270 10 99 9 x 9

MySQL: Can stored procedure information be extracted from the information schema? -

क्या संग्रहीत प्रक्रिया की जानकारी जैसे कि नाम , पैरामीटर nane / position / MySQL में सूचना स्कीमा से या किसी अन्य तरीके से संभव है? आप प्राप्त कर सकते हैं नाम सहित, बहुत सारी जानकारी, INFORMATION_SCHEMA.ROUTINES से। पैरामीटर की जानकारी को INFORMATION_SCHEMA.PARAMETERS तालिका में शामिल किया जाएगा, लेकिन यह तालिका MySQL में उपलब्ध नहीं है, इसलिए मुझे यकीन नहीं है कि आप उस जानकारी को < कोड> INFORMATION_SCHEMA । यदि आपको सिर्फ तर्क सूची की आवश्यकता है, तो आप INFORMATION_SCHEMA.ROUTINES से प्रक्रिया नामों का चयन कर सकते हैं, तो प्राप्ति प्रक्रिया प्राप्त करें उनमें से प्रत्येक के लिए दिए गए विवरण अगर आपको बस तर्कों और प्रकारों की ज़रूरत होती है, तो आपको उन्हें बहुत परेशानी के बिना पार्स करने में सक्षम होना चाहिए।

nokogiri - xpath: how to express text nodes? -

विचार करें: पाठ 1 पाठ 2 पाठ 3 आप एक्सपेथ में टेक्स्टनेट को कैसे अभिव्यक्त कर सकते हैं? जहां तक ​​मुझे पता है, सभी पाठ में एक नोड को सामूहिक रूप से एकल पाठ नोड के रूप में वर्गीकृत किया जाता है। वे पदानुक्रमित नहीं हैं इसलिए किसी भी एक तत्व में 1 से अधिक पाठ नोड नहीं हो सकते हैं। आपको

c++ - How to read cin with whitespace up until a newline character? -

I would like to read from the current position in the scene to C ++ unless there is a new row in a string. Readable characters may contain spaces My first pass fails because it stops at the first place: string result; Cin & gt; & Gt; result; If cin is given: (cd / my / dir; doSometing) \ n variable The result is only: (CD I think I should be able to use the stream manipulator to complete it, but The skipws were not quite right that it gives the carrios returns with spaces and tabs, and it seems that the skip left whitespace will be left for it. Need to use a reboot? standby buff; cin & gt; buff; std :: string straw; std :: getline (std :: cin, str);

objective c - NSLog and printing of an object -

I have a class and I want to set up to call that NSLog with that class. For example, NSLog (@ "% @", non-standard object); How do I set up an object, so what does it want me to print? -description override the method. It does not take any parameters and returns a NSString which turns out to be printf 'd. -debugDescription is another version (Return NSString , no parameter) that do po'ing the object from gdb.

.net - The C# compiler and memory management -

I am compiling a design class about memory management. I have been reading about garbage collection and have seen that most of the low level content is with the C / C ++ code. I have a few questions about the C # compiler. Was the part of the net framework for memory management written in C / C ++? How does the net manage? Has their internal garbage collection used Molok ()? Which method of graffiti collection uses the .net framework? I would probably use it to generate new questions, but I'm not sure if I should make a new question or edit it. / P>

python - Unit testing a method called during initialization? -

मेरे पास निम्न की तरह एक वर्ग है: वर्ग सकारात्मक (वस्तु): def __init__ (स्वयं, आइटम): स्वयं ._विalidate_item (आइटम) self.item = item def _validate_item (स्वयं, आइटम): यदि आइटम & lt; = 0: बढ़ाएँ ValueError ("आइटम सकारात्मक होना चाहिए।") मैं _validate_item () के लिए एक यूनिट टेस्ट लिखना चाहूंगा, जैसे: वर्ग पॉज़िटेटेट्स (unittest.TestCase): def test_validate_item_error स्वयं): स्वयं। सशर्तराइज (मान एर्रर, पॉजिटिव। _विलिडेट_इटेम, 0) दुर्भाग्यवश, यह काम नहीं करेगा क्योंकि यूनिट परीक्षण केवल क्लास इंस्टेंस के बजाय विधि से 0 पास करता है ( स्वयं पैरामीटर) और 0 के लिए। क्या इस मान्यता पद्धति का परीक्षण अप्रत्यक्ष रूप से __ init __ () वर्ग के माध्यम से किया जा सकता है? यदि आप विधि के शरीर में स्वयं का उपयोग नहीं कर रहे हैं, तो यह एक संकेत है कि उसे कक्षा सदस्य होने की आवश्यकता नहीं हो सकती है। आप या तो _validate_item फ़ंक्शन को मॉड्यूल स्कोप में ले जा सकते हैं: def _validate_item (आइटम): यदि आइटम & lt; = 0: बढ़ाएँ ValueError ("आइटम सकारात्मक ह

c# - List<T> item remove problem -

Do not be afraid of the detailed code. The problem is general I have provided the code to better understand this problem. I am trying to find a standard approach to manipulation of tables with many relationships and I'm almost done. Here are the M relations with the teacher and course . I have designed my classes as follows: Teacher - class: public class teacher {public id id {get; Set;} public string teacher name {get; Set;} private list & lt; Course & gt; _items = null; Public listing & lt; Curriculum & gt; Before receiving {(if (_items == NULL) {_items = course. Gate Carsbaiteheyraidi (_ID);} return _aytms;} set {_items = value}}} public int Save () {// ... Korstaijr. Delteksbaiteheyraidi (TC, ID); course teacher. save Corrsstekaiaidiaidi (TC, ID, Yhkaitims); // ...} public hair (update) {// ... Korstaijr. Deltekars Bayticirid (TC, Yhkaidi ); Course Teacher. Save CounterSteakIIDID (TC, this.id, this.item); // ...} public static Get the teacher (in

php - changing from md5 to sha1,salting -

मेरा एल्गोरिथ्म इस तरह दिखता है: $ new_password = sha1 ($ salt। $ Password) $ ईमेल); यह अच्छा काम करता है, लेकिन आईए sha1 में बदलने की कोशिश कर रहा है क्योंकि ive ने इसे बेहतर सुना है, लेकिन यह काम नहीं करता। ऐसा क्यों है? पंजीकृत करें: // एक मजबूत अद्वितीय नमक $ नमक = uniqid (mt_rand ()) उत्पन्न करता है; $ New_password = sha1 ($ नमक। $ पासवर्ड। $ ईमेल); और फिर जब मैं लॉग इन करता हूं, तब मैं इसे पुन: कर देता हूं आप हैथेड पासवर्ड के साथ नमक भंडारण? हैश की जांच करते समय आपको एक ही नमक का उपयोग करना होगा - प्रत्येक उपयोगकर्ता का अपना ईमेल पता, नमक और हैश संग्रहीत होना चाहिए।

Organising vim plugins into separate directories -

क्या मेरे प्रत्येक vim plugins को मेरे ~ / .vim डायरेक्टरी? एक ही जगह में सब कुछ खोलना गन्दा हो जाता है। आप चाहते हैं pathogen.vim आप इसे या उस पर पा सकते हैं

probability - Possible outcome in C# -

I have to find out all the results by throwing four coins at a time public Zero Tossen () {var coin1 = new string [] {"head", "tail"}; Var coin2 = new string [] {"head", "tail"}; Var coin 3 = new string [] {"head", "tail"}; Var coin4 = new string [] {"head", "tail"}; Var result = First coin 1 second from coin to 2 in coin 2 from third to coin 3 in coin 4 in fourth fourth from fourth (possibility = coin 1 + "," + coin 2 + "," + coin 3 + "," + Coin 4); Foreign Currency (Various OCs in Consequences) {Console.WriteLine (o.possibility.ToString ()); }}} was output system.STRING [], ............... What went wrong? If you are selecting arrays, you should first select , second ... choose new one (possibility = first + "," + second + "," + third + "," fourth} "; BTW You do not need to make different coin types, you can tos

iphone - Cocoa and Cocoa Touch: is an object on the dictionary? -

I thought if an object is on a dictionary, but it appears that it is not. > I have an NSMutableDictionary with a key called "Product". Some products have been dynamically added to me, such as [myDict addObject: @ "banana" for: @ "products"]; [MyDict addObject: @ "orange" for: @ "products"]; [MyDict addObject: @ "Grapes" for: @ "Products"]; etc. At some point I would like to know that, for example, banana is on the dictionary Is there a way to do this? I mean, just to know that an object is on the dictionary? Thanks for any help. You can put whatever you want in the form of object using ObjectForKey Zero < / Code> will return if the object is not in dictionary and will return the object. You can use it like this: [myDict addObject: @ "For what you want" : @ "Banana"]; [MyDict addObject: @ "whatever you want" for: @ "orange"]; [MyDict addObjec

java - log4j:WARN Please initialize the log4j system properly -

How to solve these low errors ... Do I have some jar file missing ??? log4j: No attenders could be found for warning logger (smslib). Log4j: Start the Warning Log4j system properly. Org.smslib.GatewayException: Com Library Exception: java.lang.RuntimeException: javax.comm.PortInUseException: currently owned by unknown unknown applications org.smslib.modem.SerialModemDriver.connectPort (SerialModemDriver.java:97) org.smslib. Modem.AmodemDriver.connect (org.smslib.modem.modemGateway.start.Gateway) (modemgateway.java 158) org.smslib.Service $ 1Starter.run (Service. Java252) WaitCommEvent: Error 31 WaitCommEvent: Error 31 My first thought was that your log4j XML or property file was not valid when the Lodge 4J was initialized Do one of them CLSP is in PHH. A more careful reading of your exception reveals that you are trying to use a port that a Windows app has already taken control. To see if the harbor is currently in use and what is connected with them, make a "netstat

include - pthread was not found -

I am working on pthread in C ++ using Visual Studio 2008. I have a problem because the compiler is not found. I knew it was embedded in C ++ 2005. Do I have to install the library and add it manually or should it install with the C ++ default libraries? If I want to install it, please give me the URL. Honey Almosley Threads in Microsoft Visual C ++ .NET or Visual C ++ 2005 One page on creating: Could this be of some help?

unix - Bourne shell script to convert a number to telephone format -

I want to change a number such as 1234567890 to 456-7890; Is there any way to do this in Unix shell programming? This is what DigitalRoss and Jonathan Lefler Were trying to say: echo "1234567890" | Sed 's / [0-9] [0-9] [0-9] \ ([0-9] [0-9] [0-9] \) \ ([0-9] [0-9] [0-9] [0-9] \) / \ 1- \ 2 / ' It should work at all, but most of the brains of sed -Mult editions, though it does not take into account the limitations of the word, or are there an additional number or group of digits on the same line. It only improves the first ten digit sequence that it finds if you have spaces, tabs, commas or other delimiters, then they can be used to restrict the match.

php - How to tell if a timezone observes daylight saving at any time of the year? -

In PHP, you can tell that the given date is using something like this during daylight saving time period : $ isDST = date ("I", $ myDate); // 1 or 0 The problem is that it only tells you whether a point in time is in DST or not. Is it a reliable way to check whether DST is in effect at any time in that time zone? Edit to clarify: Brisbane, Australia does not observe daylight saving at any time of the year. Nearby all year, this is GMT + 10. Sydney, Australia from October to March, when it changes from GMT + 10 to GMT + 11 I 'm thinking whether there will be any existing method, or there is a way to implement the method that works like this: Timezondos DST ('Australia / Brisbane'); // False Timezone Dozest Dest ('Australia / Sydney'); I have found a way to work using PHP's DataTimeZone Class (PHP) I / O true 5.2 +) Function timezondos dst ($ tzId) {$ tz = new datetime timezone ($ tzId); $ Trans = $ tz- & gt; GetTr

css - How to position div vertically using YUI grids? -

Hi, I used the YUI grid for layout design I am I want to place call 3 in vertical position, and always paste it at the bottom of the page. How to do this? I did not find any online documentation about vertical positioning in the UII grid. Hope someone can put some light on it :) What do you do to make a yui-specific No way 'then ask, but you should be able to set it by setting it down and stick 3 to 3 on the bottom: Below: 0px; Note that call 2 will not automatically adjust its height, in all the ways where the beginning of col3, the heights in the CSS work differently from the way they do the width.

objective c - Bug in iPhone Library Access? -

यह कोड: MPMediaQuery * query = [MPMediaQuery artistsQuery]; एनएसएआरआरई * गानेसएरिस्टिस्ट = [क्वेरी संग्रह]; के लिए (MPMediaItemCollection * c in songsByArtist) {NSLog (@ "कलाकार% @ है% u गाने", [[c प्रतिनिधि आईटम] मान FORFroperty: MPMediaItemPropertyArtist], [[सी आइटम] गिनती]); } अपेक्षित रूप से काम करता है लेकिन यह कोड: MPMediaQuery * क्वेरी = [एमपीएमडियाएक्टीक्वेंसी कलाकारों]; एनएसएआरआरई * गानेसएरिस्टिस्ट = [क्वेरी संग्रह]; के लिए (MPMediaItemCollection * c in songsByArtist) {NSLog (@ "कलाकार% @ है% u गीत", [[c प्रतिनिधि आईटम] मान FORFroperty: MPMediaItemPropertyArtist], [c count]); } गाने की संख्या के लिए हमेशा "1" प्रिंट करता है क्या कोई अन्य इस मुद्दे की पुष्टि कर सकता है? ऐसा लग रहा है जब आप बग की तरह दिखते हैं। ऐसा लगता है कि आप उस क्वेरी में संग्रह की गिनती कर रहे हैं इसके बजाय इसके अंदर के गाने के बजाय। एमपीएमडियाआइजाइन * क्वेरी = [एमपीएमडियाएक्वाइटी कलाकारों]; एनएसएआरआरई * गानेसएरिस्टिस्ट = [क्वेरी संग्रह]; के लिए (MPMedia

How different is Scrum practice from Agile Practice? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 7 जवाब अधिकतर लोग कहते हैं कि स्क्रम और चंचल चंचल प्रैक्टिस के मुकाबले एक दूसरे के बीच अंतर क्या है? चंचल एक सामान्य दर्शन है सॉफ्टवेयर प्रोडक्शन, ड्रम एक विशेष रूप से प्रोजेक्ट प्रबंधन के संबंध में उस दर्शन का कार्यान्वयन है।

cocoa - A simple way to generate tones / sine waves on mac? (ruby would be nice) -

I am writing a program that involves playing a combination of sign waves and sine waves ... it must be run on the Mac, And I'm looking for a Simple API that I can use. I am opening up for ObjC, C, C ++, Ruby, Python, etc. .... I do not care about that language unless it has some lines of code. But Ruby would be good: -) You can write to Linux on / dev / dsp, / dev / sound, but not on Mac. I know how a sine wave arises, but the problem is getting PCM samples that I make in audio hardware. I know about example code / developer / example / core audio / simple SDK / default optup, but there are several hundred lines of this ridiculous core audio / audioUNIT code and I want to work with it easy. is a method import, array, mathematics P = Pyudio.PyAudio () Stream = P is to use. Open (rate = 44100, channel = 1, format = pyaudio.paFloat32, output = true) stream.write (array.array ('f', (for .25 * math.sin (i / 10.) (44100)). Tostring ()) stream.close () p.terminate

Cookie session in rails is it the same as cookie or session? -

I am reading "Rail, Excel Web Development with Third Edition" and confusing session-cookie . On page 474 it is a topic about locating cookies and how they talk about handler cookies-disabled users. And they come with the idea of ​​a cookie session, which I think is a fake session that acts as a cookie? What I do not understand is the example code, which uses the first_filters: cookies_required and request.cookies are asking [Session_key] whether it is similar to the cookie variable or this "fake cookie Session "about which they are talking about? And if this is a "fake cookie session", then which cookie is capable of using it? I do not know any code which users do not have a cookie? I do not know if you can understand my question. I am very confused now. Thank you, Page 474 is a bit confusing I cookie-based session, which The default Rail Session Store stores session_id as a session. You can also reset the session shop - see below p477-4

Ruby 1.9.1 and Jrails -

मुझे त्रुटि मिल रही है: uninitialized निरंतर ActionView :: मददकर्ता :: जावास्क्रिप्टElementProxy: : ActionView मैंने जेल के पुनर्स्थापना को मजबूर करने की कोशिश की है, जिसने त्रुटि को ठीक नहीं किया है, और गोगगलिंग त्रुटि अभी तक नतीजे नहीं ले पाई है। कोई सुझाव? रूबी 1.9.1, रेल 2.3.4 जैसा कि कहा गया है, जेल को स्पष्ट रूप से रूबी 1.9 के साथ काम करने के लिए तैयार किया गया है। नवीनतम संस्करण पर उपलब्ध है। वैकल्पिक लिंक:

sharepoint - Programmatically insert a List as a webpart in a webpart page in WSS 3.0 -

I tried to search the net on the web as a web portal to include a list but it Not very fortunate. How can I add a program to the list as Webpage in a webpage page Many thanks! Firstly use these statements. Microsoft. SharePoint; Use of Microsoft SharePoint WebPartPages; Then in your code, // get the first SPS ite site = new SPS ite ("http: // myserver"); SPWeb web = site. OpenWeb (); SPList List = Web List ["MyCustomlist"]; // Create a webpage list ViewWebPart WP = New ListViewWebPart (); Wp.ZoneID = "top"; // Change the ith right area on your page. Wp.ListName = list.ID.ToString ("B"). ToUpper (); Wp.ViewGuid = list.DefaultView.ID.ToString ("B"). ToUpper (); // Web Part Collection SPWebPartCollection coll = web.GetWebPartCollection ("default.aspx", // replace it with the correct page. Storage.Shared); // Add Web Part coll.Add (wp); If you want to use custom view, play with: SPView view = list.Get

unit testing - Visual Studio "Run a method" vs "Utility tests" -

I use XUnit and Resharper to run my tests In some given projects, I usually have some utility tests Those who are not actually tested but are purely present, so I can easily execute a bit of code. For example, I have a test that outputs my hibernate mapping (I use fluent NiBiNnet) in a temporary directory. I really do not like these tests, is there a better way to "run a system" in addition to using a teststor? If you have a TestDriven.net, then you only need to click on that method and run it . You do not need to decorate the method with some of the test or TestMethod attribute or something like that. is a personalized version of testdriven.net, which is free.

php - Zend Framework - Set 'selected' value in select box dropdown list -

I am adding a selected element for a Zend_Form example as follows: $ user = $ Form-> Create Element ('Select', 'Users') - & gt; Set label ('user:') - & gt; Setuped (true); Foreign Currency ($ US $ as user) {if ($ selected == $ u- & gt; ID) {$ user- & gt; Addition of the selected option = "selected"} and the $ user- ($ u-> ID, $ u- & gt; first name.) ". $ U- & gt; lastname; & Gt; Add multi-option ($ u- & gt; id, $ u- & gt; first name. '' $ U- & gt; last name);} I'm looking for docs But in 'Selected' one can not find an easy way to pre-set one of the selected elements. I have just worked on how to do it. Use the setValue () method: $ user = $ form-> Create element ('select', 'user') -> Set labels ('User: ') - & gt; Setuped (true); Foreign currency ($ U as user $) $ user- & gt; ad multipation ($ U-> ID, $ U- & gt; first n

styling - In WPF, how do I prevent my style from being overridden? -

Please do not get caught in my example, just bear with me for the question: my WPF application In, if I wanted to keep all the text boxes near the "green" background, then I can easily set it in my application. Resources. & gt; Style target type = "text box" & gt; & Lt; Setter property = "background" value = "green" /> & Lt; / Style & gt; This works Absolutely ... (Thanks WPF). However, if I had a text box somewhere, then I wanted to add add another style ... I > Example: & lt; Text box & gt; & Lt; TextBox.Style & gt; & Lt; Style & gt; & Lt; Style.Triggers & gt; & Lt; Trigger Property = "Textbox. Easous Overs" Value = "True" & gt; & Lt; Setter Property = "Text Box. Foreground" Value = "Red" /> & Lt; / Catalyst & gt; & Lt; /Style.Triggers> & Lt; / Style & gt; & Lt; /TextBox.Style> &

Will the Sql Server Import And Export Wizard have shapefile support anytime soon? -

Do you know? PS: Some of you Roadmap features me SQL Server Management Studio but where is it? I have a similar question to social MSDN, you can see the answer. / P>

svn - Using git as a centralized version server -

I am currently using svn at work. Our setup is: Everyone has a working copy and we are committed So I changed, I changed the second update, and everyone could work on copy as They want So this deployment is very easy. But now, I want to do the same thing but with Git. would it be possible? I have to repo a GIT on my main server, develop it at home, make changes in the server etc. Thank you for your help Yes it is possible. On the server where your content is located: git init git add on your local computer: < Pre> git clone git: // yourserver / repo localfolder To send changes to the server to get the change: push git Li> / html>

asp.net mvc - MVC ActionMethod not finding passed in Value -

I have a verb action, something on the lines of this: [ AcceptVerbs (HttpVerbs. Post)] Public Action Methashan (Travel Journey) (If Request (ISAJK REAST)) // Save Value Return Jason (New {Travel UDI = Travel. Jardine ID})}} The travel object that I pass is from my LINQ2 SQL Datamodal. I use the JQuery.Post function above my JavaScript I call ActionMethod, such as: var travel data = {CustomerID: $ ('# CustomerID'). Val (), JourneyID: $ ('#JourneyID'). Val ( ), Estimated travel times: $ ('# estimated traveltime'). Val (), root name: $ ('# routeName'). Val (), .....}; $ .post ('/ travel / create ', Travel data, function (JasonResult) {// deal with result},' Jason '); The problem I am experiencing is that Journey.RouteName in Action Management Always returning to zero, but JSON passes back a value Audience is, I think it alert (JSON.stringify (journeyData)); And as a result, the root name is a value in the JSON object, e

asp.net - Why is HttpContext.Session null when redirectMode = ResponseRewrite -

As suggested, I am using redirectMode = ResponseRewrite in my custom error configuration so that my custom error page Could use exception information. It has worked like a charm for some time. Adding something else helps users overcome the functionality of "user error" type, we already need a piece of information stored in the session. When it is implemented, I found that many paths for the session end in zero, when there are redirectMode = ResponseRewrite, but they are all populated when redirectMode = ResponseRedirect (or not defined). Why do anyone know? It seems weird that we have to make the selection between exception response (ResponseWeight) or session (Response Redirect). Rich custom error handling tells me that the session is available only when the control passing method server The transfer, which I assumed the presentation Rewart according to the notion. Obviously this is not the case. I still do not know the answer to the question, but to get it, I

Can you combine the WSDL and XSD data from a WCF service? -

Is it possible to create a file for WCF generated WSDL file (and any additional XSD files to generate clients)? I can generate a valid client using svccil.exe both wsdl files and each xsd file, but I have a client who is using a PHP tool for this and I wanted to see if I had only one file for them I can make it easier for them instead. You can - View some of these clever solutions with some clever WCF extensions: Hope that helps! Mark

php - Changing from md5 to sha256 -

I'm trying to create a secure user authentication system. Code But I am trying to change from MD5 to Sh-256, but it is used to login. I just changed from $ auth_pass = md5 ($ line ['salt']. $ Password. $ Stat_salt); From $ auth_pass = hash ('sha256', $ line ['salt']. $ Password. $ Stat_salt); This includes DB correctly but the login part does not work for some reasons. Works with MD5 but sha256 Do not you have to use sha256 in different ways? Registration: // Generate a unique salt $ salt = uniqid (mt_rand ()); // Combine them all together and have them hash = hash ('sha256', $ salt. $ Password. $ Stat_salt); / / $ Regist_query = mysql_query ("User Login (Username, Password, Salt) values ​​('". $ Username "", "". $ Hash. "', '". $ Salt. "')") Or die ("MySQL error:". Mysql_error ()); Grab user's line associated with the user from login

design - How much responsibility should a method have? -

This is most definitely a language agnostic question and which has troubled me for some time. An example might explain this dilemma that I am facing: We have to say that we have a method that is responsible for reading the file, some objects (which store information from the file) Makes a collection with it. And then returning the collection ... like something like this: public list & lt; SomeObject & gt; Load Synchronization (string filename); We should also say that at the time of implementing this method, if the collection was returned then it would be impossible for the application to continue (size of 0). Now, the question is, should this belief (an empty archive should be checked and perhaps to throw an exception) should be done within the method? Or, should this method be allowed to complete the file load and ignore the verification work, to verify at some later levels beyond the method? The general question I am asked is: Is it better to double the validit

colors - How to change the look of a disabled JButton in java -

I am creating a game and when I disable a button with setEnabled (false); The button turns into gray, which fights with other colors in the game. Is it a way to change the color of the button when it is disabled? You can add HTML coding which gives a large range of flexibility on your button, even here That's also on the disabled button. example: button .set text (" 3 & lt; / html & Gt; ");

sql server - DB design for synced desktop application -

I am creating a desktop application that will run on multiple laptops. Whenever the user returns to the office and is re-entered, then he will need to sync to the central database. My biggest problem of overcoming is how to design the database so that it is easily synced to the central database server. One of the major obstacles is trying to determine how to handle the keys, they do not duplicate in many laptop databases that they will use. For example, laptops say that a new customer enters the customer "Customer A" - using a unique ID, it can be assigned a customer ID of 20. The laptop enters 2 "customer C" - it can also specify an ID of 20 for that customer. When it comes time to sync, both customers are A & A. Ends with a duplicate ID on the C server. Has anyone worked with this kind of app that has a great solution? Options are: Category of ID , Which are difficult to apply and enforce, are very difficult to manage, it is difficult to provi

Git: reset other branch to current without a checkout -

I am writing some scripts for my Git workflow. I present the other (existing) one branch at present, without checkout. Previously: Current Branch: Comment Other Branch: committed B After: / P> < Code> Current Branch: Comment A Other Banc: Commit A Equivalent $ git Checkout otherbranch $ git reset --soft Current branch $ git checkout currentbranch < / Code> (Note - Soft: I do not want to affect the working tree.) Is this possible? The workflows you describe are not equivalent: when you reset --hard If you do, you lose all the changes work tree (you want to make it reset --soft ).

c# - DataView.Count different DataView.Table.Rows.Count -

I am using C # and .NET 3.5, and there is a gridview that I want to get the data- Back in the page I am setting. I have the data in the datatable and then based on the column value of each line (isigalid booolan), I create a new row in 1 of 2 datawaves - dvValid or dvInvalid using the DataRowView.AddNew () method. I'm not creating a new DataTable.NewRow to add to the DataView table, then I bind the GridView in the appropriate data view. There is a problem when I'm sorting GridView. I'm having a problem with a line, not being sorted properly, all the other rows are sorted properly. I debug my code and found that DataView.Count is more than DataView.Table.Rows.Count.Count, although I'm calling the DataView.Table.AcceptChanges () method. This is strange because all the committed rows should be in the datatable and therefore the calculation should be same. So why are there 2 different variations? DataView is a subset of datatale, so it should not have equal or lower

gps - How to calculate distances between coordinates EFFICIENTLY in Oracle -

I have a large Oracle database (720,000 record epox) where each record has its own geographic coordinates (latitude and LNG) and I need to record only one record (within a specific radius) in a specific distance. At this time I have implemented a distance function (based on Haverstein) which I have found in the Oracle forum but because the database is slightly larger, it spends about 50 seconds per selection. How to do any recommendation efficiently? I know that there is an extension called Oracle Spectral. Locator but I do not know whether I can buy it or even how it works. Thank you very much in advance. Best Relationship Use better algorithms Instead of computing the actual Euclidean distance, Calculation is required, make your selection at linear distance, for which only subtraction and addition is required. To wit. If you have talk (10, 10) and your radius is 5, then select all the locations (10 +/- 5, 10 +/- 5) inside the square created. Points will be This will be don

c# - How to find unexecuted code -

Greetings, I have a large number of fitness tests for the project (1000+). Over time, the facilities change, and shared fixtures come and go, we have been left with the unused orphan code but how to find it? For those people who do not know fit, you have a wiki page like this: | When a user adds. 1 | And | 2 | He's back. 3 | What type of method is mapped to run time: Public Bull GetOutter Edge and HySerated (int first, int sq, int expected result) {return ( (First + second) == Expected Result)} With these hands to find these mappings will be deceptive, by writing a script it will be a long and difficult task, I'm sure there is a better Should be the solution. Is there a utility, which can monitor the sustainability DLL, while the trial is underway and then do not return a list of all sections and methods? The key word you are looking for is coverage # /. Some options are included for the NET platform.

visual studio - How to Tell if a .NET Assembly Was Compiled as x86, x64 or Any CPU -

What is the easiest way to find out (without access to the source project) whether a .NET assembly DLL 'x86 'Was compiled as' x64' or 'any CPU'? UPDATE: A command line utility was enough to meet my immediate needs, but only for completeness, if someone wants to tell me how to do it programmatically then it will also be of interest , I believe. If you want to find it on a given dll, you can use that tool Which is part of the Windows SDK: CorFlags.exe assembly.dll If you want to use this code, Take a look at the method of: assembly assembly = assembly.load (to "path"); Portableexactible packs; ImageFileMachine imageFileMachine; Assembly.ManifestModule.GetPEKind (peKind out, image file mashin out) Then you have to check peKind to check its value. For more information, see Portableexecutive Kids .

Character Input In Objective-C -

I am learning Object-C using GNUstep, but I use Google search-c to use some of the character input For example searched, like scanf in C and C ++, but I could not find, can anyone help me? Thank you. Anything can do, what the purpose C can do. Anything can do the purpose, C (with some work on your part). If you are getting some work that works in C, then it will work in Objective-C. If you find something that works in Objective-C, then it will work in C (with some work on your part).

c++ - How do I write a cpp __DIR__ macro, similar to __FILE__ -

__ फ़ाइल __ और __ लाइन __ मैक्रो को सी प्री-प्रोसेसर, और अक्सर फाइल नामों और लाइन नंबरों के साथ डिबग आउटपुट मुद्रण के लिए उपयोग किया जाता है। मुझे कुछ इसी तरह की आवश्यकता है, लेकिन पथ के अंत में डायरेक्टरी के नाम के साथ। उदाहरण के लिए यदि मेरा कोड निम्न में है: / home / davidc / some / path / to / some / code / foo / bar मुझे एक मैक्रो की आवश्यकता है जो सिर्फ मुझे "बार" देगा, अगर कोड / home / davidc / some में है / पथ / टू / कुछ / कोड / फू / मधुमक्खी तो मुझे मुझे "मधुमक्खी" देने की आवश्यकता है। कोई विचार? (बीटीडब्ल्यू, यह एक सी ++ एप्लिकेशन के लिए है)। अपडेट: स्पष्ट होने के लिए, मैं एक मैक्रो के बाद हूं जो मुझे संकलन-समय पर निर्देशिका नाम वाले स्ट्रिंग देगा, मैं रनटाइम पर कोई स्ट्रिंग प्रसंस्करण नहीं करना चाहता। यदि आप जीएनयू बनाते हैं अपनी परियोजना का निर्माण करने के लिए, तो आप सक्षम हो सकते हैं कुछ ऐसा करने के लिए: %। O:% .cpp $ (सीसी) $ (सीएफएलएजीएस) -डीडीआईआरआईडीई = "$ (पट्टी $ (अंतिम शब्द $ (मूल /,, $ (डीआईआर $ (Abspath $ & lt;))

php - Why "not" Google App Engine? -

I've heard of GAE and although it does not support PHP, people find this limit as quarkus I (I have not tried to do this, but it is believed that it works) but what factors should I consider when evaluating it is a match for me? For example, what did you not with GAE? Or if you went with it, then what are you not happy about? Edit: Thanks to those who saw the value in question and how to defend it. I have seen the question here that there were very few programming related to compost and which were left open, in the case of a cheating, it is not any other question that was specifically about PHP support; It's about me why GAE is not in general (PHP was a sidenote) I doubt the person who also screaming "deception" to read both questions, to see how clearly I am very different from you You can vote again if you still see the value in it. Some good answers were already coming, very bad, 5 out of you did a perfectly good job. I voted for a reopening, whether

c# - Outline a path with GDI+ in .Net -

Image
How does the graphface profile use a GDI +? For example, I add two intersecting rectangles to a graphics path. I only want to outline this resulting Graphics Path. Note that I do not want to fill the area, I just want to make the framework. Example: There is no managed method of outlining. However, GDI + has a function named GdipWindingModeOutline that can do this properly. This code does the trick: // Announce the announcement for the interop [DllImport (@ "gdiplus.dll")] Public static extern int GdipWindingModeOutline (HandleRef path, IntPtr matrix, float indifference); Zero some control_bant (object sender, paint event erges E) {// Create a path and add some rectangles in GraphicsPath path = new GraphicsPath (); Path.AddRectangles (rectangles.ToArray ()); // Create a handle that requires unmanaged code Original Pad Personal Unfortunately handler handle = new handler (path, (intpTR) path. GateType (). GetField ("Basic", Binding Falges.Nonpolic | B

objective c - Quick Multiplication Question - Cocoa -

I'm still learning, and I'm just trapped. I want the user to enter any number and as a result, my program will do this equation: x = 5 * y ( Y that user is the number which is x result) How do I do this? I'm not sure if I think someone adds to int or NSString . Who should I use, and should I enter anything in the header files? I'm sure that if I type int or I'm guessing joining NSString . OK, one of these is a numeric type and the other is a text type how do you multiply text? (In addition to repeating it.) You need a numerical type. I take precautions against int , because it can only hold integer, the user will not be able to enter "0.5" and get 2.5; When you change "0.5" to a int , the partial part will be omitted, except the integral part, which is 0. Then you will multiply 5 to 0, and the result will return 0 for the user. Use double . This is a floating point type; As such, it can hold partial values

c# 2.0 - How to compress a Video file(.wmv,.avi,.flv) without affecting its video quality -

I am making a process in which I compress all types of files, for the compression / decompression I have a GJPstream class I use all kinds of files easily, but when it comes to a video file, compressed files files are more than basic filesyes, so the purpose of compression is poor. To compress the video file without successfully losing the video quality. OK, I accept it. But what about winrar Most of the formats are already compressed. To format with format you will most likely kill quality without getting more in limiting the size

nhibernate - Does Fluent-Hibernate exist? -

Is there anything like Fluent-NHBarnett for the original Java Hibernate? If not, then why not? Are there language-specific limitations? I believe Fluent- depends on the best features provided by NHibernate Linq In # 3.0 if I'm not mistaken until Java lambda expression does not apply etc. I do not think we will be seen in the fluent hibernation. Although I may be wrong. :)

mysql & php - query for record with all or fewer values, but not more -

(हल, देखें SEND) मुझे PHP पर संकेत की आवश्यकता है या निम्न के लिए MySQL कोड संरचना: मान लें कि आपके पास एक्स अनूठे बॉक्स हैं, और वाई प्रकार के फल हैं प्रत्येक बॉक्स में प्रत्येक प्रकार का एक फल हो सकता है कुछ बक्से में केवल 2 प्रकार हो सकते हैं, कुछ में प्रत्येक प्रकार का हो सकता है सभी बक्से में कम से कम एक प्रकार का है। क्वेरी के लिए, उपयोगकर्ता के पास चेकबॉक्स की एक सूची है, प्रत्येक फल के लिए एक (मैं एक ही क्वेरी सरणी में इन सभी फ़ीड को ग्रहण करता हूं?) मेरी समस्या यहां शुरू होती है: यदि कोई उपयोगकर्ता जांचता है सेब, संतरे, और अंगूर < Box01 (सेब, नारंगी) Box02 (अंगूर) Box03 (सेब, नारंगी, अंगूर) लेकिन नहीं: बॉक्स 04 (सेब, नारंगी, अंगूर, नाशपाती, केले) मैं रिकॉर्ड्स में रिटर्न को कैसे सीमित कर सकता हूं $ फल [] या उससे कम में दिए गए मान, लेकिन कोई अन्य मूल्य नहीं, भले ही अनुरोधित मान मौजूद हों? इसके अलावा, क्या इस प्रकार की क्वेरी में एक विशेष नाम है जिसका उपयोग मैं भविष्य के संदर्भ के लिए कर सकता हूं? यह मेरे लिए एक असली कठिन है, और मैं आपके समय की

jsp - Custom JSTL tags with body -

We are going to use JSTL and custom JSTL tags for some type of template engine in our JSP / Spring-project Are there. Is there a way to create such a tag that looks like this: & lt; Div id = "site" & gt; & Lt; Div id = "header" & gt; Some titles & lt; / Div & gt; & Lt; Div id = "navigation" & gt; Some dynamic content here & lt; / Div & gt; & Lt; Div id = "content" & gt; $ {Content} & lt; / Div & gt; & Lt; Div id = "footer" & gt; & Lt; / Div & gt; & Lt; / Div & gt; And use it like this: & lt; Mytags: template> & Lt; H1 & gt; Title & lt; / H1> & Lt; P & gt; my content! & Lt; / P & gt; & Lt; / Mytags: Templates & gt; i.e. Use body-ingredients inside custom JSTL-tags ... This works: & lt; Mytags: Template Content = "Some Content ... No HTML" /> But not very useful in our cas

pgpgin and pgpgout - Linux Counters in /proc/vmstat -

I am writing an application that collects the overall system I / O data. I was thinking that page-in and Two counters for page-out, pgpgin pgpgout contains pages written in / proc / vmstat, and all disc- Based block devices. Please tell me, if you can! I do not know why not. I mean, when you get a pagefault, the necessary block is needed to swap file systems / files, anywhere in VFS (i.e. memory-mapped I / O), where the file is mounted on the system Can come. I do not know why all block devices will not be calculated because they can all be used for paging (but it depends on what file system you have and how you can use them Do it)

gd - Image watermarking in php -

I want to mark an image and save it. Here is the code that I am using for this. This image is being output here and it is accumulating the output in the file. I want to save it without output. Load stamps and photos to apply // watermark to $ stamp = imagecreatefrompng ('stamp.png'); $ Im = imagecreatefromjpeg ('proverbs.jpeg'); // Set the margin for the stamp and get the height / width of the image of the stamp $ marge_right = 10; $ Marge_bottom = 10; $ Sx = imagesx ($ postage stamp); $ Sy = Images ($ ticket); // To calculate the status of the stamp, copy the stamp image to our image using margin offset and photo / width. Imagecopy ($ im, $ stamp, imagesx ($ im) - $ sx - $ marge_right, images ($ im) - $ sy - $ marge_bottom, 0, 0, images ($ postage stamps), images ($ postage stamp) ; // Output and free memory header ('content-type: image / PNG'); Ob_start (); // Output JPEG (or any other chosen format) & amp; Quality images ($ im, NULL, 85); // String

asynchronous - JQuery synchronous animation -

In many cases I want to execute animation in a synchronous way, especially when I want to create a series of sequential animations. . Is a jQuery animate function an easy way to make calls synchronous? The only way I thought the animation is over and waiting for this flag is to set a flag right. JQuery synchronous animation can not Remember that on the UI thread of the browser Javascript is running. If you create a synchronous animation, the browser will freeze until the animation is over. Why do you need to do this? You should probably use the jQuery callback parameter and your method code should continue in the callback, such as: function doSomething () {var thingy = whatever; // Things $ ('some') Animate ({width: 70}, function () {// After the animation ends jQuery will call this method. // You can continue your code here. // You can access the external functions thingy = Thingy.fiddle;}); } This is called termination.

php - call jquery load on <a > link -

I have a page in php and all pages I & lt; A tag to link For example: & lt ;? For Php ($ i = 1; $ i & lt; = 5; $ ++) {? & Gt; & Lt; A href = "abc.php? Ref = & lt ;? php echo $ i? & Gt;" Click me on the number and? "Php echo $ i? & Gt; & lt; / a & gt; & lt ;? php}? & Gt; Once we click on the link, jquery The load function should be called, such as $ ('# div1'). ('Abc.php? Ref = 1'null, function () {}); < / Pre> but I can not change the php loop and & lt; a tags ... thanks Give each anchor a general class and an attribute that recognizes the value of $ i: Then attach the on-click function to them: < Pre ( ) ($ ('a.numbered-anchors'). (Function (e) {var i = $ (this) .attr ('anchor-id'); $ ('# div' + i) .load (...);});

ASP.NET flash / TempData memory -

In some frameworks, a type of session is called variable flash (like Ruby on Rail) which is globally Allows to store variables (like a session object), but only for consecutive calls (just like TempData in ASP.NET MVC) Is there a way to do this in ASP.NET webform? Thank you

flex - Resizing Image from a decoded ByteArray -

I am trying to display a biature as a resizing image. Image is displayed properly, but resizing is off. Let me explain. First of all, the image data has been encoded, so I have to decode image data // Install the decoder work decoder: Base64Decoder = new Base64Decoder () ; // decoded image data decoded.decode (picture.data); // Export data as a byte array byte array: byte = decoder To Batere (); // display image var img: image = new image (); Img.load (bytearray); This works the image is displayed properly, however, if I hardcode the image (IMG) height then the resized image is displayed correctly, but the original image In the box with dimensions For example, if the original image is 300px height and 200px width and the img.height property is set to 75; The resized image is shown correctly with a height of 75, but the image resized in the upper left corner of the image container is shown, still set at 300px height and 200px wide. Why does he do this? And what is the fix?

c# - How can I prevent a Checkbox state switch when the user clicks on the text? -

I have a list box with checkbox in it I want to prevent the checkbox from changing its position if the user Clicks I want to change only if small box is clicked directly Is there any way to do this in windows forms? Good luck and thanks in advance. Labels instead of the text property of the text checkbox, or you can create your own control, in which one The checkbox and label is the text of the control property then the text will fill in the label, and you can expose all the checkboxes to regular properties in your control.

dependency injection - Resetting an IKernel in Ninject v1 -

I'm experiencing a problem with Nin1's V1 and resetting StandardCernel. I have a static object that I use to provide access to the kernel such as public static class ObjectFactory {Private static IKernel _ kernel = new standard kernel (new CanceisModule ()); // Summary Public static zero reset () {_kernel = null; _kernel = New standard kernel (new CanceisModule ()); }} The problem comes when I try to use the object factor in various unit tests (I use MSTE) or in fitness fixtures. I always call the ObjectFactory.Reset () method before every new test or stability, but sometimes it looks like a reset that does not really work and leaves the original binding in place I know that There is one way to reset the IKernel objects in vinux of Ninject, but we are not ready to make this step yet (and this is a very important step for us). Can someone advise you why this could happen? I'm guessing that this is related to how different runners perform different tests on differ