Posts

Showing posts from April, 2015

iphone - NSDecimalNumber leaks memory if not used with AutoRelease pool? -

NSString * str = [[NSString alloc] initWithString: @ "0.05"]; NSDecimalNumber * num = [[NSDecimalNumber alloc] initWithString: str]; एनएसएलॉग (@ "% @", संख्या); [आरआर रिलीज]; [अंक रिहाई]; लीक मेमोरी *** __NSAutoreleaseNoPool (): वर्ग के ऑब्जेक्ट 0x707990 NSCFString स्थान में कोई पूल के साथ autoreleased - बस लीक क्या कोई एक वैकल्पिक हल सुझा सकता है? दूसरों ने क्या कहा; अपने कोड को एनएसएयूटेरियरेपिपल के साथ लपेटें एक NSAutoreleasePool वास्तव में आश्चर्यजनक रूप से कुशल है; बहुत कम उपरि होगा। आप ऐसा नहीं कहना चाहते हैं, एक के साथ कोड की हर कुछ पंक्तियों को घेरना है, लेकिन यह संभावना नहीं है कि वे सामान्य उपयोग में औसत दर्जे वाले होंगे। फाउंडेशन का उपयोग बिना ऑटोरेव्यूज पूल नीचे वह पथ पागलपन है भेजा मत खा। ज़रूर - कभी-कभी पूल के उपयोग को कम करने में कुछ प्रयास करने का एक अच्छा विचार होता है, लेकिन ऐसे कई मामले होंगे- जहां यह एक अपरिहार्य है। नहीं, वास्तव में, मैं ' मजाक नहीं कर रहा हूँ: मैंने कई साल पहले सी ++ संचार लाइब्रेरी लिखी है यह

mysql - Rails advanced queries with join and sum calculation -

I have two models: Companies and expense companies have many expenses and expenses are from the company. My expense model has an 'amount' column. I was wondering if there is a way to spend the searches on a date range and the amount of expenditure column Something like the top 3 companies with the total expenditure in the 7-day period. I have tried to do this better part of the day to work, I have tried to get involved in it, the nominated scope has to chain, raw SQL etc. And I have no luck. Thanks for the help. I added it to the model of my company and was able to achieve what I was looking for. .. named_scope: top_with_expenses ,: joins = & gt; : Expenses, terms = & gt; ['Expenses.created_at & gt; ? ', Time.Now Midnight - 7.days] ,: order = & gt; "Sam (Expenditure) DESC" ,: Group = & gt; "Expenses.company_id",: limit => 3

arrays - what use does the javascript forEach method have (that map can't do)? -

The only difference between map and foreground is that the map is returning an array and forEach method " func.call (scope, this [i], i, this) for not for everyone; ". For example, " this " and " radius " are not references to the same object and it [i] and are not Referring to the existing value in the loop? I said on another post that "Use based on each code for example, you can add things to the page, for example. Basically, when you want "side effects" it is very good. I do not know what the side effects mean. array.prototype.map = function (FNC) {var A = new array (this.length); for (var i = 0; i & lt; this.length; i ++) {a [i] = fnc (this [i];};) a;) array .prototype P.fireh = function (funk, scope) {scope = scope} for it (var i = 0, l = this.length; i & lt; l; i ++) {happy at end, in JavaScript There are no real uses for methods (since we are not updating a database). Call (this, except the manip, such

php - handing data returned from jquery get request -

मेरे पास एक साधारण jquery script है, जैसा कि निम्न है: $ ('a') क्लिक करें (फ़ंक्शन () {// गीत का आईडी प्राप्त करें जिसे हम var song_id = $ (this) .attr ("id"); // गीत के बारे में जानकारी प्राप्त करने का अनुरोध प्राप्त करें। Get ( "Http://www.site.com/v4/ajax/get_song_info.php", {id: song_id,}, फ़ंक्शन (डेटा) {चेतावनी ("डेटा लोड किया हुआ:" + डेटा);}); // अलर्ट ( Song_id);}); मैंने इसे काम करने के लिए कमाया है और यह कई 'बिट्स' डेटा 'कलाकार' शीर्षक '' गीत की अवधि '' और इसी तरह देता है। मैं अपना काम कैसे करूँ 'डेटा' तो मैं तो प्रत्येक पृष्ठ के साथ अपने पृष्ठ को अपडेट कर सकता हूं। इस मामले में मैं प्रत्येक मूल्य को वापस करने के लिए '' की एक श्रृंखला सेट करना चाहता हूं। धन्यवाद। जो भी सर्वर-भाषा आप उपयोग कर रहे हैं, अपने डेटा को JSON ऑब्जेक्ट के रूप में एन्कोड करें और इसे माइम-टाइप एप्लिकेशन से भेजें। / Json । । जावास्क्रिप्ट / jQuery का पक्ष कॉल करने वाला है जो $। Ajax ({url: url,

java - Broken console in Maven project using Netbeans -

I have a weird problem with my natance + maven installation. I have the smallest code to reproduce the problem: Public class app {public static zero main (string [] args) {// Create a scanner to read from the keyboard Scanner Scanner = New Scanner (System.in); Scanner = new scanner (System.in); String param = s.next (); Println (ultimate); }} When I'm running it as a Maven project inside the Netbeans console, it looks broken. This ignores my input string param = s.next (); (or string like last = s.next () looks like "provisional loop"; is placed in the infinite loop) However this project "Java Action" works fine when compiled as a project. This O.K. Also works if I create and run it from CMD. System Info: OS: Vista IDE: Netbeans 6.8 Maven: Apache-Maven -2.2.1 // Edit Built program (using Netbeans using Maavan) works fine (I can run it from Windows CMD). I just can not test it (do not run and use debug: ( ) using netbeans. And I think I

mysql - PHP detmine numbers in between two numbers then query -

It should be simple, but I can not understand it & lt ;? Php $ testid = 240; $ Curid = 251; $ Cal = $ curid - $ testid; Countercurrent $ cal; ? & Gt; I want to define the number between two other digits, so for this example it determines that there are 11 numbers between $ testid and $ curid, but I do not have to do this. I understand that literally understand the number between $ curid - $ testid which will be 241, 242, 243 in this example ... by 251 all the way I am with them Loop is required to make numbers and one query down with each $ cal = $ curid - $ testid; Mysql_query ("SELECT * FROM wall WHERE id = '. $. $ .cal". ") // and mysql for each number should exclude each data field with those data. Thanks again, you love people. It assumes that $ Testid $ curid Less than: $ testid = 240; $ Curid = 251; $ Num = category ($ testid + 1), ($ curid)); $ Query = 'SELECT * to the wall WHERE id IN' ('. Implode (', ',

javascript - How to access a method of a closure's parent object? -

I have defined a class named MyClass and I have defined two methods MyMethod1 and myMethod2 for: function myClass () {} MyClass.prototype.myMethod1 = function () {...}; MyClass.prototype.myMethod2 = function () {...}; inside myMethod1 , I use jQuery and there is a callback ending defined: MyClass.prototype. MyMethod2 = function () {$ .jQuery ({success: function} {this.myMethod2 ();}, ...}); } The problem is that is not referring to now MyClass . The question is how can I refer to it? At the moment I have allocated it to a variable called thisObj and used it like this: MyClass.prototype.myMethod2 = function () {var thisObj = This; $ .jQuery ({success: function (data) {thisObj.myMethod2 ();}, ...}); } Closing in myMethod2 is there a better way to reach MyClass.this ? Thanks in advance. The method you use is often called "that reference", because the name That is usually used as the name of the copy of the this reference, for examp

cocoa - NSButton blue highlight -

I want to switch the gradient to NSButton but like blue light NSTabView < / Code> select button Is this easy way possible? Or should I draw it manually? If I should draw this manually, then what is the best way to do this? ( CIFilter or simply NSGradient ) Thank you. You have to create yourself with the custom sub-class of NSButtonCell.

drag and drop - jQuery's draggable grid -

It seems that the compiler's 'grid' option is relatively bound to the original coordinates of the element that pulls - if you have Put your drawable divaces in the Top set in relative order with your parents, respectively, with 100, 200, 254 pixels, then just enter: & lt ; Div class = "parent" style = "position: relative;" & gt; & Lt; Div id = "div1" class = "dragable" style = "top: 100px; condition: complete;" & Gt; & Lt; / Div & gt; & Lt; Div id = "div2" square = "drag-worthy" style = "top: 200px; condition: complete;" & Gt; & Lt; / Div & gt; & Lt; Div id = "div3" class = "drag-worthy" style = "top: 254px; condition: complete;" & Gt; & Lt; / Div & gt; & Lt; / Div & gt; ADNs are being able to drag all the 'grid' sets to [1, 100]: draggables = $ ('draggable') ; $. (Drugs,

Equivalent of C# 'as' command in C++? -

In C #, you can use like to change one type or tap. : object o = whatever (); String as string s = o; Is there a simple easy way to get it into C ++? I am using Visual Studio 2010, if this is important. [Update]: It is very important to remember, cast and use as . Casting (at least in C #) will throw an exception if it does not match: object o = null; String S = (string) o; // will crash in C ++, it will be a dynamic_cast, if you have a hierarchy where the object is, then Parents and strings are children. object * p = createMyObject (); String * s = dynamic_cast & lt; String * & gt; (P); If cast (s) {...} Cast casting will return a pointer to an indexed object if the artist is possible, or if not, a tap pointer. In addition, the context of the dynamic casting object of a reference will return if the artist is possible or throw an exception.

c - method vs function vs procedure vs class? -

I know the basics of these methods, procedures, functions and classes but I always want to differentiate between people oriented I can confuse programming, so can anyone tell me the difference between those simple examples? A class , currently, traditional OOP is a collection of data (Member variables) that work on data (member work or methods) are bound together with those functions / processes. The other three words ... well, it depends on whether the class has no relation with the other three words that it is different from "included" (more precisely "related") . A function is a collection of computing statements. So there is a process in some very anal-compliant languages, however, a function returns a value and there is no process. Processes of such languages ​​are usually used for their side effects (such as I / O), whereas the functions are used for calculations and side effects are used to avoid. Most languages ​​are not that anal retaine

SVN always getting errors when I commit (Subclipse) -

I have setup svn on my server and subclips at home I am the only developer and mainly to backup and variant features I am using. Every time I reduce my changes, I get better: Out of old errors or tree collision Sometimes I delete the files and they do not remove them on svn, only the very last item in the directory hierarchy will be deleted, So I have to delete each folder at a time. Update: Another problem I have is that sometimes Eclipse starts synchronizing with the server when I refact a filename Goes on and does something and waits for me, who is upset. And for clarity, this is a normal operation: I can rename a file, change a file to a different folder then change the contents of a file. I select 'Team Menu' and click on 'committed' then I get all these errors above. Do you always update svn before modifying your files? it's mandatory. At the time of deletion, do you want to delete? Otherwise, you should only delete it in Local

android - Wake lock does not seem to work -

I am developing an app that requires a TCP connection to stay alive. I have a type The Ping / Pong system has been implemented, it works perfectly on the screen, but when the phone stops, the pings stop responding after a while. I have created a Wi-Fi wake lock but I am still experiencing the same problem .. This is my code: Private Wifi Manager Wm = GetSystemService (this.WIFI_SERVICE); Private Static WifiLock wl = Faucet; Public static zero lock () {wl = wm.createWifiLock (WifiManager.WIFI_MODE_FULL, app.TAG); If (! Wl.isHeld ()) {wl.acquire (); }} Public static zero unlock () {if (wl! = Null) {if (wl.isHeld ()) {wl.release (); }}} Any ideas? You must obtain PowerLock with SCREEN_DIM_WAKE_LOCK / PARTIAL_WAKE_LOCK flag.

Mapping integers to types using C++ template fails in a specific case -

I am trying to compile the following template based code in VC ++ 2005. #include & lt; Iostream & gt; using namespace std; / * * T is a template that maps to an integer for a specific type. * Mapping is done through partial template expertise * The following t & lt; 1 & gt; Has been mapped to four, T & LT; 2 & gt; Has been mapped for long * and t & lt; 3 & gt; Partial Template Specialists * / Templates & lt; Int x & gt; Has been mapped to float using. Structure t {public:}; The template's & lt; & Gt; Structure t & lt; 1 & gt; {PUBLIC: TYPE TEXT FOUR EXTEP; }; The template's & lt; & Gt; Structure t & lt; 2 & gt; {Public: Long exhaust type; }; The template's & lt; & Gt; Structure t & lt; 3 & gt; {Public: Typefaf float exetype; }; // We will not accept any special T & lt; N & gt; Typically xType can be accessed easily. Typedef T & lt; 3 & gt; :: xType x3Type; / *! * I

How to submit HTML and receive a bitmap? -

itemprop = "text"> I have an app that lets the user access JQuery and Javascript to add images and dynamically I would like to be able to submit the division with all the HTML on a web site and get an image back so that we have a bitmap of the result of the work of the end user. I like a solution in the net. As it is, I am most familiar, but open to many? I submit a division with all the HTML on a web site and receive an image back Would like to be able Try it! Browsers make screenshots of your web design in different operating systems and browsers. It's a free open-source online web application that provides developers a convenient way to test browser compatibility of your website in one place.

visual studio 2010 - Re-add missing project without having to re-add it to all projects referencing it -

Let's say, after you move your entire folder locally to a new location, you say that you are one. NET solution (My VS is no longer one of the projects being referred to in that solution and therefore when you launch VS, it naturally tells you that the project is disappearing and So always you see the project deeply in Solutions Explorer. OK, well I can not reconnect the project again (where there is a different way for the life of that project Please do not forget) until I remove the mistake project reference and then try to add it again in the solution. But how can I relate a project without losing all the references in other projects Who was referring to the missing project? Is this possible? Otherwise every time I reconnect to that missing project, then I get about 8 projects, And give references to all the projects that are tedious. I think that makes sense because every project was referring to the missing project on the old path, so it will break even there, But there

.net - ClientRoleProvider and role caching -

Is it possible to disable the role of caching when using the client Rolyprovider? The application in question is a console application ... I have tried to make 'cacheRolesInCookie' wrong (I know that this is a console app, but I have less idea about ideas Had been!) - but it had no effect. Finally, I created RoleProvider's own implementation due to the calming problem and other business needs.

scripting - Is it possible to call on a Java-method from JavaScript in Java6 1.6 script-engine? -

I want to call my Java-method from a Javascript file via ScriptEngineManager provided in Java 1.6. Is this possible? Yes: There are several ways to do this Java code in global context Push the context of objects, which will look like, like the DOM object looks like a browser JavaScript and JavaScript can install Java objects and reference them.

asp.net - Serialize EntitySet through net remoting -

I have a shared object through pure remoting. The problem is that there are some antitisset and EntityRef attributes in this object. When I try to run the program, I get an exception that tells me that EntitySet has not been marked as serializable. If I mark it as serial enabled, everything is recovering, but when I try to use EntitySet for external representation with external feature, I am not able to use it. Any suggestion would be appreciated. / P> Thanks in advance BTW, does anyone know how TCP can change the channel's default binary serialization? Try to mark the individual properties and properties as serializable; Should get access to A note also sets the set on all the sets.

c++ - Boost::Mutex & Malloc -

I am trying to use a fast memory allocation in C ++ due to licensing / cost, I could not use I was using NEDMalloc in the same threaded setting and received excellent performance, but I am thinking that I should switch to something else - as I understand things, NEDMalloc is just a C-based Molec () Is a replacement for; Free (), No C ++ - New & amp; Delete operators (which I use on a large scale). The problem is that now I should be thread-safe, so I'm trying to malloc an object that is counted (to prevent additional transcript), but in which a mute pointer In this way, if you want to delete the previous copy, you have to first lock the pointer, then release the object, and finally unlock it & amp; Free Mutex. However, the use of malloc to promote: The twists seem impossible because I can not start the personal object as the initial verboton to call the constructor directly. So I have been left out of this strange situation, where I am using new to allocate new

java - M2Eclipse deployes WEB-INF into WEB-INF/classes -

I import Express 2.1 into Eclipse 3.5 with M2 Eclipse. When I put it on Tomcat, my web. XML goes to "Web-INF \ Classes \ WEB-INF \ web.xml". This problem is with exactly the same. I am not getting any problems in the Org.eclipse.wst.commoncomponent file: & Lt; Wb-resource deploy-path = "/ WEB-INF / classes" source-path = "src / main / java" /> & Lt; Wb-resource deploy-path = "/ WEB-INF / classes" source-path = "src / main / resources" / & gt; If I & lt; Wb-resource deploy-path = "/" source-path = "src / main / webapp" /> to by & lt; Wb-resource deploy-path = "/" source-path = "target / appfuse_light_210m1-2.1.0-M1" /> , it works, but whenever I import a project, then I'm here. Eclipse.wst.commoncomponent does not want to modify. What is the reason for this problem?

data structures - String representations: improvements over ropes? -

I want to make a representation for the string with fast integration and editing functions. I have read the paper, but has there been any significant improvement in this area since 1995? Edit: A possibility I have first thought that using strings as leaves, but I have a detailed analysis of this; This gives the addition of continuous-time / interruption at intervals (in the number of fragments of the short string), in contrast to the opposite of ropes. This is an old question! I wonder if someone reads it. But even then it is intraigueing. In your comments, you say that you find it: Use of fast asymptotics, or static factors, or low memory OK, the rope O (1) inclusion, and o (n) walking can not do better than you. Substring and indexing is clearly going to be more expensive. But most of the usage cases for large documents do not require editing or random access. If you insert only at the end, then the list of 1D vector / wires can improve the entry time continuously. I

php - Fetch Products Grouped By Total Sales? -

मेरे पास निम्न MySQL टेबल हैं: टेबल: उत्पाद ------ ---------------- आईडी | उत्पादनाम 1030 | एक्सबॉक्स 360 1031 | प्लेस्टेशन 3 1032 | आइपॉड टॉच टेबल: बिक्री ---------------------- उत्पादक | सैलेट 1031 | 2010-06-14 06:30:12 1031 | 2010-06-14 08:54:38 1030 | 2010-06-14 08:58:10 1032 | 2010-06-14 10:12:47 मैं आज के बेचे गए उत्पादों को पीएचपी का इस्तेमाल करना चाहता हूं और उन्हें विक्रय संख्या और बिक्री की तिथि (यदि संभव हो तो) के जरिये ग्रुप करना चाहिए, उदाहरण के लिए आउटपुट: आज के आँकड़े: - प्लेस्टेशन 3 (2 विक्रय) - एक्सबॉक्स 360 (1 बिक्री) -आईओपीओड टौच (1 बिक्री) धन्यवाद डेविड, प्री> p.id = s.productid पर बिक्री के अंदरूनी उत्पादों में शामिल होने से p.productname, count (s.productid) का चयन करें जहां s.saledate = curdate () समूह p.productname jim जैसा कि मैंने कहा, untested लेकिन 'लगता है' जैसे तुम क्या करोगे .. jim

Large PHP arrays or MySQL temporary memory tables? -

आप अस्थायी रूप से कितने हजारों key = & gt; मान या कुंजी = & gt; एक ही प्रक्रिया में सरणी जोड़े कुंजी पर लुकअप को प्रक्रिया के भीतर लगातार पूरा किया जाएगा, और प्रक्रिया समाप्त होने पर डेटा को त्याग दिया जाएगा। क्या मुझे एरे का उपयोग करना चाहिए? अस्थायी MySQL टेबल? या बीच में कुछ? यह इस बात पर निर्भर करता है कि कितने हजारों का मतलब है और कितनी बड़ी सरणी में हो याद। यदि आप इसे PHP में संभाल कर सकते हैं, तो आपको इसे करना चाहिए, क्योंकि mysql का उपयोग यहां थोड़ी ऊंचा हो जाता है। लेकिन अगर आप एक साझा मेजबान पर हैं या आपके पास सीमित है तो memory_limit php.ini में और इसे बढ़ा नहीं सकते हैं आप MySQL में एक अस्थायी तालिका का उपयोग कर सकते हैं। इसके अलावा आप कुछ सरल और तेज कुंजी मान भंडारण का उपयोग कर सकते हैं या, वे केवल मेमोरी में काम कर सकते हैं , और चाबियों का एक वास्तविक फ़ास्ट लुकअप है (लाल वादे)

SQL Server 2005: When clicking "Add" database I keep getting 'verify that the path or file exists' -

When I right-click on the "database" in SQL Server 2005 Management Studio, and then click> Attach ...> I get the following error: C: \ Documents and Settings \ Administrators \ My Documents \ SQL Server Management Studio \ Projects \ Path \ MDF \ and \ LDF \ Files \ Specified Paths or Servers But verify the file that you have the necessary security privileges and that The file or file exists. The answer is simple - where MSDF and LDF files were removed when a drop command issued (via my dev machine) to the nant But, MDF and LDF After changing the files, I want to add the database again but the above error keeps coming when I select "Add" In addition, I already attached the database to the query "Attach "And now it is not left under" database " Is not. I have tried to replace a copy of MDF and LDF files in the referenced folder and that does not work. Any ideas as a way to get rid of this error? Verify that you have

python - Django colon syntax in template tags: only in newer versions? -

I have posted an application on a new server, and although I am using VirtualAv, I have a new environment The production server was installed, which has a different architecture. Anyway, I have not found any TemplateSytaxErrors in development, but on the production server, I get: exception type: TemplateSyntaxError exception value: caught Syntax error Time: Invalid syntax (views.py, line 25) Abusive line is: {% url administrator: password_change as Password_change_url%} On removing that row, TemplateSyntaxError goes to the next line in which there is a colon (and to other template tags) Hires). My question is: Are there any discrepancies in the versions of Python / Django that will allow or deny the namespace of namespace? The template tags are in Dinggo-Grapeili (), so I do not want to go through it, rewrite their code and all the template tags. Development Server: 32-bit Debian Python 2.5.5 Django 1.2.1 Production Server: 64-bit CentOS Python

cookies - jQuery if not exist -

इसका अर्थ है " यदि मौजूद है " अगर ($ संरचना बदलने के बिना " यदि मौजूद नहीं है " कैसे लिखूँ? / Div> न तो ऑपरेटर ! प्रस्तुत करें यदि (! $ .cookie ("movies_list")) {// कुछ करना}

php - Parse text from an HTML page -

I know that it is possible to get information (text) from any other page. For example, there is a div named news on the page. How do I get text from this div? Yes, this is what is for other options. / P> Example: $ html = file_get_html ('http://www.page.com/'); $ Mydiv = $ html- & gt; Search ('div [id = news]', 0) - gt; Plain text;

c++ - Passing template into boost function -

टेम्पलेट & lt; class EventType & gt; वर्ग इवेंट; वर्ग IEventable; Typedef बढ़ावा :: कार्य & लेफ्टिनेंट; शून्य (IEventable & amp;, आईवेवस्ट & amp;; & gt; behaviorRef; टेम्पलेट क्लास इवेंट को उत्थान समारोह में रखने का सही तरीका क्या है? इस कोड के साथ मुझे ये मिलता है: त्रुटि: कम्पाउंड अभिव्यक्ति त्रुटि के रूप में कार्यरत कार्यशील कास्ट अभिव्यक्ति सूची: टेम्पलेट तर्क 1 अमान्य त्रुटि है: '' 'टोकन' P> बढ़ावा :: फ़ंक्शन को प्रकार की आवश्यकता है, ताकि आप इसे टेम्पलेट का नाम, यह एक टेम्पलेट उदाहरण होना चाहिए। इसलिए या तो एक विशिष्ट उदाहरण का प्रयोग करें typedef boost :: function & lt; void (IEventable & amp;, एवलवेंट & lt; SomeEventType & gt; & amp;) & gt; behaviorRef; या पूरी चीज़ को एक टेम्पलेट में डाल दें: टेम्पलेट & lt; Typename EventType & gt; Struct foo {typedef बढ़ावा :: कार्य & lt; void (IEventable & amp;; एंजेलेंट & lt; EventType & gt; & amp;) & gt; behavio

Show a Copying-files dialog/form while manually copying files in C#? -

I'm manually copying some folders and files via C #, and I want to show the user That's actually going on some. Currently, this program looks like like it is frozen, but it is actually copying files. I thought that there is already a built-in dialog or form that shows the process, is there anything available to copy / move files in the same Windows Explorer, or everything from scratch Will make Besides, is this the best way to show the user that something is going on actively? Thanks for the help! Do not fool a Microsoft.VisualBasic.FileIO namespace name , It's a very low name for C #. In the stable class file system , there is CopyFile and copyDirectory method which has the capability. In both CopyFile and CopyDirectory , note the UIOption . It emulates the Windows Explorer copy window. FileSystem.CopyFile (sourceFile, destinationFile, UIOption.AllDialogs); FileSystem.CopyDirectory (Source Directory, Destination Directory, UIOption.AllDia

ruby on rails - How to know my username and password in mysql console -

I have installed mySQL .. I have entered my password, but I do not remember that they gave me a username It is said ... Is it the administrator or the root? I have a Rubyrenales database. IML I can remember that I have got a command which tells me the username and password in mysql console .. but it can not be found again! I want to add that part to my database.yml development: adapter: mysql database: myprojectname_development username: unknown password: devrailspassword host: localhost Since I started development only, I have no database yet, so there is no way of trial and error (I do not know) user 'unknown' @ '%' is identified by 'devrailspassword' Received; Allow all authorizations on 'myprojectname_development`. * '' '%' With grant option 'unknown';

git - Should checkins be small steps or complete features? -

Two usage of version control directs different test styles. Distribution Centers : A complete feature will usually be displayed in the changes. Generally these checkins will grow. Rollback Centered : Changes will be small steps in the individual so that history can act as an incredibly powerful undo. These checkin in general will be small. This style is more developer friendly. I would like to use my version control in a really powerful way, while some persistence codes / in this way I am scared of making drastic changes to try just one possible solution. However, it gives me a history of a split file with checkins "did not work well" checkins. Instead, I try to fully reflect my changes, I use software for my version control experiment, however, it is easy for users / maintenance to find out how code is developed. There are many advantages for code reviews, management of many branches etc. So what is a developer to do? Checkin small steps or full features?

sqlite - How to append an integer to a const char value in iphone? -

I have a SQL query statement that was used to display the content in the table. The Sql statement contains such a section, the addition of numerical value as 1, 2 3 etc. depends on the material already selected. I'm assuming numerical as integer and I want to add it to the sql statement which has four values. I can add both values. Please help me out My query ==> select * from book where id = 1; I have an ID value integer thanks. You force the parameter eg: sqlite3 * Db; ... // open database sqlite3_stmt * pStmt; Sqlite3_prepare_v2 (db, "choose from book, where id =?", -1, and pstmt, tap); Sqlite3_bind_int (pstmt, 1, bookId); See the SQLite document and the prepared statement. You can reuse the statement more than once. Lets you reset the price

opengl - What does setting the GL color before doing a texture mapping operation do? -

I'm looking at some sample code in a book that repeatedly creates an antelysing effect captured by a view (at different offsets) On an offscreen texture, then using that texture, dragging a tractor repeatedly in the main scene with some visual content set up. The code is set to make the color such as "correctly": glColor4f (f, f, f, 1); Where f is 1.0 / number_of_samples , then binding to the offscreen texture and rendering it. Since the textures come with their color and alpha data, what effect (mathematical and spontaneously) that sets the overall "color" in advance? Thank you. The default texture environment is GL_MODULATE, meaning that the top color (set with glColor) Is multiplied by. So, mathematically, it does: fragmentColor = texcolor / numberOfSamples (alpha = 1.0) Hope this Tells.

coldfusion - structDelete doesn't affect the shallow copy? -

I was playing around error because I tried to create an error using a large XML document object. & lt; Cfset XMLByRef = variables.parsedXML.XMLRootElement.XMLChildElement & gt; & Lt; Cfset structDelete (variables.parsedXML, "XMLRootElement") & gt; & Lt; Cfset startxML shortlove = getTickCount () & gt; & Lt; Cfloop = "1" from = "#arrayLen (variables.XMLByRef) #" index = "variables.i" & gt; & Lt; Cfoutput & gt; # Variables.XMLByRef [variable. I] .id.xmltext # & lt; / Cfoutput & gt; & Lt; Br / & gt; & Lt; / Cfloop & gt; & Lt; Cfset stopXML short loop = matching () & gt; I hope to get an error because I removed the structure that I was referring to. From LiveDocs: variable assignment - creates an additional reference, or alias for the structure. Any change in data uses a variable name changes the structure that you access using other variable names. This technique is

vb.net - ASP.NET MVC - How do I implement validation when using Data Repositories? (Visual Basic) -

I have created a UserRepository interface to communicate with the SQL Data Layer from my LINQ, but I want to know that How to implement validation This is how it looks like my addUser sub-routine public sub addUser (as by string as byVal, date-time birth as born Date, as well as the OpenID string, by field field integer, as the ByVal website string) IUserRepository.AddUser Dim User = About the new user user.About = user.BirthDate = Date of birth user.LastSeen = DateTime.Now user.MemberSince = DateTime.Now user.OpenID = openid user.RegionID = regionId user.UserName = String.Empty user.We BSite = website dc.Users.InsertOnSubmit (user) dc.SubmitChanges () End Sub And then my controller will simply call adduser (...) < / P> But I do not have the most awkward idea about implementing both client side and server side verification on it. (i think i edit: @ 's right, to use jQuery's AJAX and on the server See all the assumptions, but I'm completely open t

c# - Binding a collection in silverlight -

For example, I have a collection of integers 1 - 10. I want to dynamically display 4 (5, 6, 7) How can I archive the collection of silver to get the following collection in the DataGrid column? C1 C 2 C3C4R1 1 2 3 4R2 5 6 7 8R3 9 10 Fortunately though, Silverlight (and Silverlight Toolkit) provide you with the tools for which you need to complete something that is designed to create a custom view of lists of items, especially the item controls. has gone. Since "WrapPanel" is not included in the default Silverlight Toolkit, you have to catch the excellent Silverlight Toolkit, which has one. You can add items control and rappanel to get the wrapping set again. & lt; Items Controlled Items Source = "{Binding Number List}" & gt; & Lt; ItemsControl.ItemsPanel & gt; & Lt; ItemsPanelTemplate & gt; & Lt; Control Toolkit: RapPanel / & gt; & Lt; / ItemsPanelTemplate & gt; & Lt; /ItemsControl.ItemsPanel> & Lt; Item

Migrate MySQL database to Sql Server -

MySQL bug has caused a problem in my production database recently, in the bug timestamp column. To avoid any inconvenience, I want to migrate the database to SQL Server. Is there any free tool to migrate data and table structure easily and reliably?

Moq Example using out and ref needed -

I'm trying to test against some legacy method that applies the parameter Can you give me an example How are you doing this? simply assign or test riff Parameter. Looking at this interface: Public Interface ILegacy {Bull Foo (outside string bar); } You can write an exam like this: [TestMethod] Public Zero Test13 ( ) {String bar = "ploh"; Var legacy stub = new fake & lt; ILegacy & gt; (); Legacy stub .Setup (L = & gt; L. Fu (Out Bar)). Return (true); Assurance ITRT (Legacy stub.foo (out bar)); Assurance Requel ("ploh", bar); }

jQuery scroll on hover -

HTML: & lt; body & gt; & Lt; div वर्ग = "शीर्ष-कोने" & gt; & lt; / div & gt; & Lt;! - पूर्ण, शीर्ष: 0 - & gt; & Lt; div वर्ग = "नीचे-कोने" & gt; & lt; / div & gt; & Lt;! - पूर्ण, नीचे: 0 - & gt; & Lt; a href = "#" वर्ग = "शीर्ष-लिंक" & gt; शीर्ष & lt; / a & gt; & Lt;! - तय, शीर्ष 50%, बाएं 0 - & gt; & Lt; a href = "#" वर्ग = "नीचे-लिंक" & gt; नीचे & lt; / a & gt; & Lt;! - तय, शीर्ष 60%, बाएं 0 - & gt; & Lt; div शैली = "पैडिंग: 1500px 0;" & gt; & lt; / div & gt; & Lt;! - स्क्रॉल परीक्षण के लिए - & gt; & Lt; / body & gt; स्क्रॉलो प्लगइन का प्रयोग जेएस $ ("शीर्ष लिंक")। (फ़ंक्शन () ($ ("body")। स्क्रॉल करें ($ ("टॉप-कोने"), 3000);}, फ़ंक्शन () {// निरंतर रोकें}}; $ ("। नीचे-लिंक")। हॉवर (फ़ंक्शन () {$ ("body")। स्क्रोल

css - How to make one button for open and close div, in this jquery code? -

$ (दस्तावेज़) .ready (function () {$ ('# content1')। Hide (); $ ('A # open') क्लिक करें (फ़ंक्शन () {$ ('# content1')। शो ('धीमी');}); $ ('a # close')। क्लिक करें (फ़ंक्शन () {$ ( '# Content1')। छुपाएं ('धीमी');})}); इस खुले और बंद करें बटन के कोड में अलग है & lt; a & gt; और & lt; id = " बंद करें "& gt; मैं खुले और बंद होने के लिए समान बटन & lt; a & gt; बनाना चाहता हूं और खुले और नज़दीकी स्थिति के लिए अलग पृष्ठभूमि छवि देना चाहता हूं $ ('a')। क्लिक करें (फ़ंक्शन () {$ ('# content1') .slideToggle ();}); यदि आप अपनी सीएसएस बदलना चाहते हैं, तो आप इसे निम्नलिखित तरीके से लिख सकते हैं। $ ('a')। फ़ंक्शन () (यदि ($ ('# content1')। है (": दिखाई")) {// अपने सीएसएस को यहां बदलें // जैसे। $ (# Content1)। Css ('background-image', first_image) ; $ ('# Content1')। ('धीमी') को छिपाने के लिए;} else {// अपने सीएसएस को य

javascript - Difference between screen.availHeight and window.height() -

I am implementing the following javascript on my browser (Firefox). Console.debug ("Height of the screen =" + Screen. Evelight ); // outputs 770 console.debug ("height of window" = <+> $ (window). >); // output 210 (I am also using jQuery) What is the difference between the two? In 770 pixels and 210 mm? Similarly, when I write $. Hey () and $ (window) .height () , what's the difference? window.outerHyight this screen window It contains the pages and bars of all visible browsers (location, status, bookmark, window title, limitations, ...). This no is similar to JQuery's $ (window). Outer () . window.innerHeight or $ (window) .height () This is the height of the viewport that shows the website Not only content, browser bar document.body.clientHyight or $ (document). Height () The height of your document shown in the viewport is higher if it exceeds $ (window). Hi () You get scrollbar to scrol

objective c - why most of the objects we create in iphone are pointers -

Why are we the most object indicators created in the iPhone? Like I create NSString * str, NSMutableDictionary * dict .. etc short answer Because Object-Objects can be allocated only on a heap and manipulated as pointers. Long answer Objective-C is required to allocate classes on the heap and tampering as a sign because polymorphism requires the use of pointers Because the indicator of the interface is always the same size, whereas different implementations of the interface can have different sizes. In C ++, anyone can use both automated (stack) and dynamic (heap) storage; However, in the former case, someone should be careful to piecemeal (when a derivative type is assigned to a base type, resulting in the object being lost from the material which makes it a derivative type instead of the base type ), And Obj-C as the only indicator eliminates these potential flaws. In addition, the stack-allocated objects can be used as a reference calculation plan Tilts, which are i

tortoisesvn - Remove all of file type from tortoise svn repository -

I have exceeded my SVN hosting limit so I need to remove all its binary and images. For example all * .jpg How do I issue an order to delete and ignore the files? Simply deleting files will no longer recover Space it will be marked as deleted, but old The amendments are still stored in the repository. To dump a repository ( svnadmin dump ), the only way to completely remove all the marks in a file is to filter the unwanted files ( svndumpfilter < / Code>), and create a new repository from the modified dump. I will talk to your hosting service, because I hope you do not have the necessary access to do this.

Perl: Value of response code in HTTP::Request -

So, I'm writing a code to get a document from the Internet. The size of the document is approximately 200 KB. This code is: #! / Usr / local / bin / perl -w stringent experiment; Use LWP :: UserAgent; My $ ua = LWP: UserAgeent-> New; My $ url = "some url"; My $ req = HTTP :: Request-> New (GET = & gt; $ url); My $ res = $ ua- & gt; Request ($ req); If ($ res-> is_success) {print $ res-> material. "\ N"; } And {print} "Error:" $ Res-> Status_line; } Now, the only problem is that I can not mention what the URL is. However, the output is: "Error: 500 time to read" When I checked the link externally, the data is being downloaded within 5 seconds. I have also changed 1000s to finish the time, but it still does not work. How should I go about finding more information related to the reaction? The size of the file (about 200 kb) is not enough to provide a time-guarantee of reading. The server is not too busy, when

asp.net - Can a page have multiple ScriptManagers? If yes then under what condition will it be required? -

Is there a single page manager in a page? If so, in what situation would it be needed? No, you can not be more than one (emphasis my): < Blockquote> One page can contain only one script manager control in its hierarchy. To register services and scripts for nested pages, user controls or components, there is already a ScriptManager control on the parent page, use ScriptManagerProxy control for more information, ASP.NET UpdatePanel with the master page See Using Control

java - Getting all ActiveDirectory groups using OpenSSO Client SDK -

I hope someone has the experience of Sun OpenSSO (now ForgeRock OpenM) here. I am trying to get all the groups in Active Directory using the OpenSSO client SDK in Java / Jabs EAP 5.0. I tried to combine different specimens and code snippets found on the web, but it failed, and ultimately the log "is not permitted for membership other than users." Basic approach AMIdentityRepository -> getRealmIdentity () -> getMemberships (IdType.GROUP) was to use: SSOTokenManager manager = SSOTokenManager.getInstance (); String token string = URLDecoder.decode (TokenID, "ISO-8859-1"); SSotoken token = manager.createSotoken (tokenString); If (manager.isValidToken (token)) {SSOToken adminToken = (SSotoken) AccessController doPrivileged (AdminTokenAction.getInstance ()); AMIdentityRepository rep = New AMIdentityRepository (adminToken, "/"); Common Identity = Rep. Set up groups = identity.getMemberships (IdType.GROUP); } Note that I am not trying to determ

cloud - What technologies exist for app level clustering? -

Assume I have an application that is guaranteed to drown a server even after optimization. Is there a technique that allows a web application to be split on multiple servers while maintaining a server? For example, a multi-player online game Generally, in the craft of World War I have many servers with my game state which I see is something that this game state can do in many servers Will allow sharing. EDIT: The platform does not really matter because it is for a web application, so there is no point in the backend. However, there are rail and Java possibilities. Besides, Woah was just an example, I am interested in this kind of technology; A big game will be a good application for this. In fact, for really low latency, high-throughput in-memory applications like real-time online, Not in the game, not as a piece of at least arbitrary middleware. On the side of applicability and complexity, made a commendable effort, but found (surprisingly) that it was not scaling.

.net - Linq to Entities : Many-to-Many join a Table and a View -

मेरे पास कई तालिकाओं और दृश्य हैं: टेबल्स: - aspnet_roles < / Code> (RoleId और अन्य कॉलम के साथ) - स्थिति (स्थिति आईडी और अन्य कॉलम के साथ) - रोलस्टैटस (RoleId और StatusId और रिश्तों के साथ) ) जब मैं लिनक्स टू एंटिटीज एडीएमएक्स फ़ाइल बनाता हूं, तो यह एक status सूची कोड में aspnet_roles और एक aspnet_roles < / कोड> सूची में स्थिति । अभी तक ठीक है। लेकिन अब मेरे पास StatusId कॉलम के साथ एक दृश्य है। मुझे जो चाहिए, उस दृश्य और aspnet_roles तालिका के बीच एक सम्मिलित होने के साथ एक LINQ क्वेरी बनाने के लिए परिणाम सेट में RoleName कॉलम जोड़ना है। एसक्यूएल में ऐसा कुछ होगा: एक का चयन करें। *, Aspnet_roles.RoleName खोज से देखें एक भूमिका में शामिल करें। स्थिति = RoleStatus.StatusId में शामिल करें aspnet_Roles RoleStatus.RoleId पर = Aspnet_rol Es.RoId लेकिन मुझे यह नहीं पता कि LINQ को इकाईयों में कैसे करना है। समस्या यह है कि मुझे कभी भी RoleId या StatusId तक पहुंच नहीं है क्योंकि ये फ़ील्ड "code" aspnet_roles और स्थिति द्वारा

msbuild array iteration -

& lt; आइटम समूह & gt; & Lt;! - यूनिट टेस्ट प्रोजेक्ट - & gt; & Lt; MyGroup शामिल करें = "हैलो.एक्सएमएल" / & gt; & Lt; MyGroup शामिल करें = "GoodBye.xml" / & gt; & Lt; / ItemGroup & gt; मैं एक ऐसा कार्य कैसे कर सकता हूं जो इस सूची के द्वारा दोहराता है और कुछ करता है? & lt; XmlPeek XmlInputPath = "% (MyGroup.Identity)" क्वेरी = "/ परिणाम" & gt; & Lt; आउटपुट टास्क पैरामीटर = "परिणाम" आइटम का नाम = "myResult" / & gt; & Lt; / XmlPeek & gt; यदि मैरियसल्ट के अंदर एक निश्चित पाठ है, तो मैं एक त्रुटि संदेश को बताना चाहता हूं। हालांकि मेरे जीवन के लिए मुझे पता नहीं है कि एमएसबिल्ड में एरे के माध्यम से कैसे पुनरावृत्त करना ... किसी को भी यह कैसे पूरा करना है? आप आंतरिक लक्ष्य पर उपयोग कर सकते हैं, जैसे: & lt; आइटम समूह & gt; & Lt;! - यूनिट टेस्ट प्रोजेक्ट - & gt; & Lt; MyGroup शामिल करें = "हैलो.एक्सएमएल" / & gt; &

multithreading - How to spin an independent dispacher thread for a Silverlight UserControl -

I am trying to move a lot of elements very often from 1 pixel and in parallel. Trying to do this on a dispatcher thread means that the element is visited one after the other. The result is that the more elements I have to slow down, all of them will move forward. In WPF I was able to use a HostVisual described to solve it. P> I do not see anything similar in Silverlight. Is this a blame of light structures or is there something that I have not stumbled yet? I am using SL4. If there is only Silverlight on a single user interface (Primary Dispatcher) thread, then the lack of lightweight framework. If you can back up the batch, you can use a background worker, so you can do any other thread and do all the non-visible functions.

javascript - How can you tell if an HTML dropdown is displaying the list of options -

Is there any way to determine whether a given drop down is currently active and displaying a list of options is? I am currently in the dropdown on the Masuduno event and when the user clicks on it, I am populating the options. Unfortunately, the Masudown incident burns when the user also chooses the option. If I can determine that the drop down is already displaying its options, then I can populate the option. This will tell you that the selected element has its options in javascript document.getElementById ("mySelectElementId"). Options.length In JQuery $ ("# mySelectElementId") [0]. the option . Length Edit: Try using Focus Events on the Select Selection Element rather than using the Maussaiden Event, it will also ensure that To get the selected entries you have to adjust the controls using the tab by the user.

windows - Is it possible to Create a Named Pipe on a remote machine (by IP address)? -

Is it possible to create a named pipe on the remote machine (by IP address)? AFAIK pipes are not referenced from the IP address in windows. You can make a designated pipe for inter-process communication, or make a Winsock TCP socket - which is less popular on Windows.

apache - 503 server response for Googlebot -

I put an .htaccess file in my webroot with the following contents RewriteBase / RewriteCond% {HTTP_USER_AGENT} ^. * (Googlebot | Googlebot | Mediapartners | Adsbot | Feedfetcher) -? (Google | Image)? [NC] REERRR * / Var / www / 503.html This website is in maintenance mode, and I should not index yet. I have tested the code with the Firefox User-Agent Switcher Plugin, and after entering the login log it shows at the end of each log entry, but looking at Tepperda or Firebug, it still returns 200 server feedback instead of 503 . What am i doing wrong Content of " > " Mozilla / 5.0 (compatible; Googlebot / 2.1; + http: //www.google.com/bot.html) " /var/www/503.html & lt ;! DOCTYPE HTML Public "- // W3C // DTD HTML 3.2 / EN" & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; 503 - Service temporarily unavailable & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1 &

architecture - What is the best Networking implementation for my application? -

I am in a project planning stance for myself, this is a single and multi-player card game. I would like to track the figures of each person such as world ranking etc. ... My problem is that I know the best way for clients - server architecture and programming. My original goal was to program everything in C # because I want to be proficient in that language. My original idea was to run a back end server on a back-end database and some kind of hosting on the internet, although it seems expensive for such a small project that it can not make any money or can. I have tried to search for cloud services, although I am unfamiliar with technology, and I'm not sure that I can make them fit to my needs, especially when most like Google's cloud The more you understand your use of your coding architecture. > Finally my last problem is that I would like to have an architecture which can be used for different languages ​​so that I can keep it from PC to iPhone, Xbox etc. ... D

asp.net - Is Microsoft.Web.Mvc.Internal.ExpressionHelper.GetRouteValuesFromExpression(expr) exposed now? -

मैं इस पद्धति का उपयोग करना चाहता हूं: Microsoft.Web.Mvc.Internal.ExpressionHelper.GetRouteValuesFromExpression ( Expr) लेकिन मैं Microsoft.Web.Mvc का उपयोग नहीं करना चाहता, क्या यह कॉल asp.net mvc में अब समर्थित है? नहीं। फ़्यूचर्स में और इसलिए केवल Microsoft.Web.Mvc।

jquery - jCarousel scrolling from right to left -

I am trying to reverse the scrolling direction of Jacarosell and it is scrolling from right to left. Anyone knows how it is done? I attach a link to the Jacquel code file here, maybe it can help. Thank you! solution + demo = (vertical in my case, config option changes it into horizontal)

System.Property<T> refactored out of Silverlight 4 System.dll? -

I am in the process of migrating a Silverlight 3 project on Silverlight 4 (plus RIA services v1.0 RTW and the latest Rx The fall of.) I believe that I have worked with one on all DLL refactoring and namespace changes, but one. In the Silverlight 3 project, I System.Project & lt; T & gt; However System.Project & lt; T & gt; is using Silverlight 4 System.dll . Using Reflector I think the following Silverlight 4 is unavailable from system.dll : IProperty & lt; & Gt; IPropertyGetter & lt; & Gt; IPropertySetter & lt; & Gt; Property Property & lt; & Gt; PropertyChangedEventArgs & lt; & Gt; My question is, where do they live in Silverlight 4? Thank you for your help! I am sorry, should read above: "I use the system Property & lt;> However System.Property & gt; Silverlight 4 System. Dll. " Thanks.

ruby on rails - Activerecord-PostgreSQL Adapter Error -

संभव डुप्लिकेट: जब "रन डीबी: माइग्रेट" चलते हैं, तो मुझे निम्न त्रुटि मिलती है: कृपया पोस्टग्रेस्क्ल एडेप्टर स्थापित करें: मणि सक्रिय करें- postgresql-adapter स्थापित करें (dlopen (/ library / ruby /Gems/1.8/gems/pg-0.9.0/lib/pg_ext.bundle, 9): कोई उपयुक्त छवि नहीं मिली। क्या मिला: / लायबरी / रब्बी / गेम्स / 1/8 / ग्राम /pg-0.9.0 / लीब /pg_ext । बंडल: मच-ओ, लेकिन गलत आर्किटेक्चर - / लाइबरी / रबी / गेम्स / 1.8/ ग्राम /pg-0.9.0 / लिब / जीपी_एक्स। बंडल) पोस्टग्रेस 8.4.4 का उपयोग करके इंस्टॉल किया गया पूर्व निर्मित छवि फ़ाइल। फिर sudo gem install pg को पीजी-0.9.0 इंस्टॉल करने के लिए चलाया गया कॉन्फिग / डेटाबेस.इमिल: विकास: एडेप्टर: पोस्ट ग्रेसकॉल क्या किसी को पता है कि समस्या क्या है? समस्या इस तथ्य से संबंधित है कि मैंने प्रीपेकेज इंस्टॉल PostgreSQL से उपयोग किया है। इस ब्लॉग में अच्छे निर्देश:

.net - Programatically WPF Fade In (via extension methods) -

मैं एक साधारण (अकेले खड़े) सी # एक्सटेंशन विधि को एक सामान्य WPF UIElement के फेड-इन में लिखने की कोशिश कर रहा हूं , लेकिन समाधान (और कोड नमूने) जो मैंने पाया था जिसमें बड़ी संख्या में चलती हिस्से होते हैं (जैसे कि एक कहानी आदि की स्थापना करना ...) यहां संदर्भ के लिए एपीआई के प्रकार का एक उदाहरण है विधि मैं बनाना चाहूंगा यह कोड एक UIElement को प्रदान किए गए मानों (वैल्यू, टू वैल्यू, अवधि और लूप) के अनुसार घुमाएगा, जिसमें से , बूल लूप एनीमेशन): जहां टी: UIElement {रिटर्न (टी) uiElement.wpfInvoke (() = & gt; {डबल एनीमेशन डबल एनीमेशन = नया डबल एन्निमेशन (सेव्यू, टू वेल, नई अवधि (टाइमस्पेनफ्रॉस्सेकंड्स (अवधिइसीसेकंडे))) रोटेटट्रांसफ़ॉर्म रोटेटट्रांसफ़ॉर्म = नए रोटेट ट्रांसफॉर्मर (); UiElement.RenderTransform = rotateTransform; uiElement.RenderTransformOrigin = नई प्रणाली.विंडो.पॉइंट (0.5, 0.5); अगर (लूपएनिमेशन) डबलएनिमेशन। पुनरावृत्तिवर्णन = दोहराएंविवाहक। हमेशा के लिए; rotateTransform.BeginAnimation (RotateTransform.AngleProperty, doubleAnimation); वापसी uiElement ;}); }

Hot python input loop -

I have to do something like the following pseudo code: There is no input and timer & Lt; 5: input = getChar () timer = time.time () - start with the timer; = 5: Print "took too long" Second: print input Anyway to do it without threading? I would like an input method that was called the last time, or none ( null ) if nothing was recorded, whatever has been entered. with the * nix you want sys.stdin . On Windows you want msvcrt.kbhit () and msvcrt.getch () .

recursion - How can invoke a shell to make a new environment to run a make inside another make? -

I want to have a goal rule in my GNUmakefile that opens a new shell and then with a clean slate of new shell What is the syntax for doing this? I tried to do this but it does not work: .phone: setup setup: shell cd myDir; Make; CD. It becomes infinite repeat of the following error: create [1]: directory `/ disk4 / home / user / parent ' Shell cd myDir; Make; CD. / Bin / sh: shell: command not found [1]: Directory `/ disk4 / home / user / parent / shell 'is entering CD myDir; Make; CD. / Bin / sh: shell: command not found [...] requires parance Not in any method, each row is applied in its own shell. There is a mandatory shell string in your recipe, which will try to execute your shell as command (/ bin / sh (your shell, not to create) ; shell: command not found ). In addition, make -C parameter is easy in this case. In addition, use shell, $ {MAKE} macro. .proney: setup setup: unset macflow; $ {MAKE} -C myDir

reflection - How do you do dynamic script evaluation in C#? -

What is the status of dynamic code evaluation in C #? I am working for a very advanced feature of an app, I want users to enter a line of C # code, which boolean should be evaluated. Something like this: DateTime Now.text & gt; 12 & amp; nbsp; Amp; DateTime.NowHow & lt; 14 I want to develop this string dynamically and want to get the result as a boolean. I tried Microsoft.JScript.Eval.JScriptEvaluate , and it worked, but it is technically disliked and works only with JavaScript (not ideal, But practical). In addition, I would like to be able to push the objects into the script engine so that they can be used in the evaluation. Some resources I used to dynamically mention to gather assemblies, but I think that is higher than that. I want to deal with it. Then, in C # What is the status of the script evaluation? Is it possible, or am I out of luck? If you use DLE's ScriptEngine, here is an example:

How do I create a duplicate instance of object contained in a shared pointer in c++? -

I have an object on which a copy constructor and assignment operator is defined. It is attached inside a shared indicator. I want to create a shared sharing indicator that has a copy of the original shared pointers (i.e. the new shared pointer for the new shared space, however, the same data as the original object). Thank you for any help. You are creating new objects per constructor: std :: shared_ptr & lt; C & gt; Ptr1 (new C) // default constructor std :: shared_ptr & lt; C & gt; Ptr2 (new c (* ptr1)); // This CoP invokes the constructor In this case, if you have a regular, dumb signal then it is not really different.

On Ubuntu, how do you install a newer version of python and keep the older python version? -

पृष्ठभूमि: मैं उबुंटू का उपयोग कर रहा हूं नया अजगर मैं कमांड लाइन से "अजगर" को कॉल करते समय पुराने संस्करण को डिफ़ॉल्ट अजगर के रूप में रखने की योजना बना रहा हूं मैं योजना बना रहा हूं PythonX.X (XX नया संस्करण है) का उपयोग कर नए अजगर को कॉल करने पर। पृष्ठभूमि को देखते हुए, आप अजगर का एक नया संस्करण कैसे स्थापित करते हैं और पुराने अजगर संस्करण ? मैंने python.org से "स्रोत से इंस्टॉल" * .tgz पैकेज डाउनलोड किया है। रीडमेम बहुत आसान है और कहते हैं, "तीन आज्ञाएं निष्पादित करें: ./configure; बनाओ; परीक्षा करें, सुडो को स्थापित करें"; अगर मैं उपरोक्त आदेशों को करता हूं, तो क्या पुराने संस्करण अजगर मेरे पास (मुझे निश्चित रूप से पुराने संस्करण की आवश्यकता है)? जब आप से इंस्टॉल करते हैं स्रोत, डिफ़ॉल्ट रूप से, अधिष्ठापन / usr / local में जाता है - विशेष रूप से निष्पादन योग्य हो जाता है /usr/local/bin/pythonX.Y इसे सिमलिंक के साथ किया जाता है नामित / usr / local / python । उबंटु की अपनी स्थापना / usr / (जैसे, / usr / bin / python

delphi - How can I read values' names and data from the registry? -

I have collected a list of items GridView down as the registry: FrmPOSConfigSet .tblCatItems.First; While not frmPOSConfigSet.tblCatItems.Eof be started RegItemSetting.WriteString ( 'STK Group \ Candy', frmPOSConfigSet.tblCatItemsCODE.Text, frmPOSConfigSet.tblCatItemsSPHOTO.Text); FrmPOSConfigSet.tblCatItems.Next; End; In the registry editor, I have this: STK group - Candy -> YUPI_GUM_HB, C: \ Users \ tea \ images \ POS item images \ image1.jpg -> YUPI_GUM_SBKISS, C: to \ Users \ tea \ images \ POS items images \ image2.jpg I close the form and then open it again, GridView All values ​​have gone in. From the Registry: (\ Users \ Tea Picture \ POS Item Images \ image1.jpg eg.c) and put it in GridView when I load the form how can I get the President (.YUPI_GUM_HB) and its value? After this does not look quite like you using TRegistry (also several criteria write string ), but if you were, you can use to get back the registry it. I suspect you're

html - CSS: How to get two DIVs side by side with automatic height, to the height of their container? -

I am preparing a website for a customer, and I have two side-by-side I am attempting to get the DIV% of the container I have been side-by-side, but I have been left in the same height as the correct DIV. You can see the problem here: "Challenges" and "Benefits" should be manually side-by-side and the same height without specifying the height of the DIV . how can I do this? Your problem is that the external device is automatically shaping by internal content, You have a few options: Use the background solution mentioned in @ R0MANARMY, whose answer is equal to two lengths. Columns Set the height of the two internal devices as the exact number (using PX or M) Set the height of the external device to the correct number. Play with display attribute and try different values ​​like table-cell. Keep in mind that it is not supposed to work in some older browsers. Use a simple table with one line and two columns. I know that the last one is th

xhtml - if we are providing a seperate "printer friendly page" for each page of site then do we need to use print media css in site? -

If we are providing a separate "printer-friendly page" for each page of the site, then we use the print media css Need to Site? In this case only screen css is enough? You do not need to use the print css , but You should. Anyway, there's a smart way to create a "printer friendly" page - you do not need to do any extra coding. Many users do not either see or use the "Print" or "Printer-friendly" button, it is much more natural to kill Control-P . I've never complained to a user that ads, banners, and menus disappear while printing a page. ; -) ETA: There are some useful tips for print css.

php - Using ftp_*, how could I determine the public html directory? -

If I do not know the public web directory, then one method is that my script can determine the web directory, so that the script To know which directory to upload file? If I do not know the public web directory, there is a way to determine my script web directory , So that the script will know which directory to upload the file? If you are talking about determining the web root, the remote host that you are connecting to using FTP, the answer is no, certainly not . The FTP account that you are using to log on, the root settings on that may be completely different, which is virtual host (configured) on the server. They have nothing to do with each other, and there is no way to interact. Usually some overlaps (such as the FTP directory, such as /htdocs/domain.com / but no pattern you can depend on.

Server-side rendering using blender and twisted (python) -

I am working on this time, basically takes an image and then using blender from the command line Presents the video. At the moment I am using to deal with the requests, but there is definitely something that I am doing wrong because it is not working how I like it. You can see the gist of the program (I have stripped anything unnecessarily). The render of Blender is presented by a subprose (I know twisted twisted), along with the rendering is provided as a texture to configure and use the image. The program should be able to handle as many connections as possible. Presently subprocess is present at one time but ideally it will check the number of CPU / parallel render and adjust the optimal number. Each render is custom for the user, when the user render is complete, then they should render their render (an AV file). My question is this: has the right option turned for it? Are there any other options? If not, is my implementation of the system wrong? I appreciate any thoughts