Posts

Showing posts from April, 2015

Sizing jQuery Tabs panels -

Image
) मैं jQuery टैब का उपयोग कर रहा हूं और मुझे पसंद है कि कैसे टैब बाईं ओर संरेखित करें और शीर्ष नारंगी भाग 100 तक ले जाता है आवंटित चौड़ाई का%। लेकिन जब मैं टैब पर क्लिक करता हूं, तब ड्रॉप डाउन पैनल में केवल आधा पृष्ठ के लिए पर्याप्त जानकारी होती है मैं पैनल के आकार को कैसे समायोजित कर सकता हूँ ताकि सभी पैनल केवल पृष्ठ का आधा भाग लें? आप बस हर डिस्प्लेबल टैब सामग्री पर कक्षा शैली जोड़ सकते हैं और इसकी ऊंचाई बढ़ा सकते हैं। & lt; div id =" tabs "& gt; & LT; ul & gt; & Lt; li & gt; & lt; a href = "# टुकड़ा -1" & gt; & lt; span & gt; एक & lt; / span & gt; & lt; / a & gt; & lt; / li & gt; & Lt; li & gt; & lt; a href = "# टुकड़ा -2" & gt; & lt; span & gt; दो & lt; / span & gt; & lt; / a & gt; & lt; / li & gt; & Lt; li & gt; & lt; a href = "# टुकड़ा -3" & gt; & lt; span & gt; तीन & lt; / span & gt...

java - How I suppose to use files in Android -

I am trying to develop applications for Android and I do not know how to write / read a file in Android phone is. / P> Normally I will do the following: import java.io.buffferedReader; Import java.io.buffferedWriter; Import java.io.fileReader; Import java.io.filewiter; Public category test {public static zero main (string [] args) {try {string path = "file.txt"; Bufordedder BV = new buffed vetter (new flamer (path)); Bw.write ("XYZ"); Bw.close (); Buffettder BR = New buffed reader (new flamerdder (path)); String line = "", data = ""; While ((line = br.readline ())! = Null {data = data + line;} br.close ();} hold (exception e) {e.printStackTrace ();}}} You are very close here, something that I did, where I check to see if one SD card, if it will not save locally (Remember, because it is an Android app, all your data will be saved on the phone), then you can create a directory if not there and then file it If you have any questions, as...

svn - Best way to organize a android project into a subversion repository -

I am in the process of learning subversion, and by now I have learned one or two things, and I have a simple project To store, just created a Google code account and a svn repository, my problem is how to organize my svn repository. Imagine I just have an Android project called "Hello World" and a test project called "Hello World Test" Made, why Both projects should import my repository trunk? Does it make sense to put my exam project in the repository trunk? SSIT in local file: From the best practices suggested by Google: / P> You can create a test project anywhere in your file system, but the best way is to add the test project so that its root directory is at the same level as the source / directory of the main application Project This helps you find the tests associated with an application Ta does. For example, if the root directory of your application project is a myofix, then you should use the following directory structure: MyProject / Andr...

scala - Unable to map on HList -

I was trying to solve with formless though I was unable to map HList For some reason I'll call the code for myself. imported waste. _ Import HList._ Case class Fu (A: Option [int], B: option [int]) val a = Foo (some (3), none) val b = fu (some (22), some (1 )) Voodoo voo fooIso = HListIso (Foo.apply _, Foo.unapply _) val on map = new (({{O2 type [A] = (option [A], option [A])}) # O2 ~> Option {def} [A] (X: (option [A], option [A])): Option [A] = X._1.orElse (x._2)} fooIso.fromHList (fooIso.toHList (a) Zip (fooIso.toHList (b)). Map (mapper) error message is: & lt; console & gt; 55: error : The value for the parameter mapper could not be found: the sizeless mapper [useless With java.lang.Object. ~ & Gt; [[+ A] (option [A], option [A]), option [], useless. :: [(option [int], option [int]), useless .: :( (option [sign], option [int]), useless .HNil]]] fooIso.fromHList (fooIso.toHList (a) .zip (fooIso.toHList (b)). Map (mapper) ^ Why does not mapping wor...

xsd - Using the any schema element in wsdl with PHP SoapServer -

I can not seem to work with my SSSD element in my wsdl using PHP Sorchers. According to everything I have read and see how some other companies implement "loose type" wsdls should be enough to obtain and send record information. & lt; Complex type name = "record" & gt; & Lt; Sequence & gt; & Lt; Any name space = "## target namespace" minOccurs = "0" maxOccurs = "unbounded" process = "loose" /> & Lt; / Sequence & gt; & Lt; / ComplexType & gt; Unfortunately, it seems that the PHP Sopers class removes those elements which are not strictly defined. What I found is Request Records on Records Records and sends blank records to the reclaim / filter requests, although the field clearly exists before dealing with the SOAP server. If I specifically define those fields that are lost in this way .. & lt; Complex type name = "record" & gt; & Lt; Sequence & gt; ...

ios - How can i detect whether two CALayers overlap? -

In my app the user can drag the top caller from the stack of CALayers. When the user prevents dragging the CALayer, others should return to their original position at the top of the CALayers until the claire (after dragging) overlaps with other calendars It should be taken under the other calorie. Now, how can I find out that two calories overlap? CALayer's frame property is a CGRact. Fortunately for you, CGGomitry has the following method: CgTTIntecpectors You can use it like this: if (CGRectIntersectsRect (MyLayer1.frame, MyLayer2.frame)) {// code}

- Where Developers Learn, Share, & Build Careers

I have created an app that uses IM to insert data with FMDB wrapper and consult with SQL database The data is displayed in a table view, the problem is that when I do everything right on an iphone 4, but when I do it on an iphone 4s, then this is not a problem. My code is part of: Loading DB: aPools = [[NSMutableArray alloc] init]; NSString * path = [[NSBundle main bundle] Pathfoser resource: @ "pool db" type: @ "sqlite"]; MainDB = [[FM Database Alok] InitVithpath: Path]; [Menadi's Open]; FMResultSet * fResult = [mainDB Execution: @ "selection * from pulse data]]; While ([FRSALT next]) {Puladata = [FRS fruit string fora column: @ "name"]; [APools addObject: pools data]; } [Close to main DD]; Saving: - (zero) saveIntoDB: volume with name (NSString *): (float) volume type: (NSString *) type and DESC: (NSSTING *) Dell [[Menadi Open]; [MainDB executeUpdate: @ "pool, data (name, volume, type, dcc) values ​​(" ,,,,,?) ", Na...

c - Code can stop working with compiler optimization -

I am using the PellesC C compiler Sometimes my code stops working randomly, a special statement Can trigger it. For example, I multiply a variable by sin (c) (c is double) and my code seemed to eliminate execution without execution. Sometimes it gets frozen, sometimes it comes back, but I can always disable it by removing a humiliating statement or compiling optimization, especially "maximum speed" or "maximum speed" if I Adding a printf statement somewhere near that point, if it crashes, the time of freezing will also be about 100% away. I have never found anything to suggest that I am improper to memory I am using the Rike, I'm sure it's a compiler issue is completed. I was thinking that someone could put some light on it. Is it possible that I am actually doing something wrong? Or is it a known issue with the Pelles C compiler? Editing: Change canvas-> pixels [(y * canvas-> pitch) + (x * canvas-> gt; ; BPP) +2] = (unsigned char) (255.0...

php - Drop down selections based on Previous selection -

I have a little question that I am running an event and some of its cities, different dates and different times. I am creating a signup form in jQuery / PHP / HTML I want to show options to appear based on the previous selection. I have 3 cities on "City 1" "City 2" "City 3" and "City 1" "July 22 "& Amp; "25 July" and "22 July" have 2 sessions "2pm" & amp; "5 AM" How can I get started with a form like this? Please give me an example. Thanks pile people Do not do this for you, but I'll give you something First of all, your selection requires an on-line function, and they require each unique ID eg & lt; Onchange = 'update' id = 'box1' & gt; Choose Next, your onchange function needs to detect the current element and update other boxes. I suggest collecting data as a multi-dimensional array, so the update will be something like this: ...

javascript - Stop a loop with an click event jQuery -

I'm looking for a way to stop a loop with a click event (type panic button). If you click on the button you should close it immediately. // Basic Ideas $ Each (some or more, function (index, value) {setTimeout (function () {Console.log (index);}, 5000 * index);}); $ ('# Panic-Button'). Click (function () {// code should stop looping}}: After the loop starts, you can enter $ with the click handler. Each can not interrupt the loop. Javascript execution is single-threaded, so the next time the thread will be queued, the click handler will be queued - after the loop is over. However, as the timer is executed asynchronously, you can cancel them by placing and pasting each of your IDs: var Timeouts = []; $ .eee (some array, function (index, value) {timeouts.push (set timeout (function () {console.log (index);}, 5000 * index));); $ ('# Panic-Button'). Click on (function () {$ .ee (timeout, function (_, id) {explicit timeout (id);}); timeout = [];}...

ruby on rails - Is it possible to generate SQL `OR` clauses by using scope methods? -

I am using ruby ​​on Ruby 3.2.2 and white gem I would like to know that if used in a way If there is a way to generate SQL queries from the SQL states related to those scope methods, then or can be generated. That's it, I have: class articles & lt; ActiveRecord :: base df self.scope_method_1 ... # scope_method_1 End of SQL statuses df self.scope_method_2 ... # scope_method_2 Situations of SQL positions self.scope_method_combination # # I'm looking for some # # where {scope_method_1 | Scope_method_2} # Note: '|' This means that the SQL 'or' Claus Scalcel context # # is in place so that the following SQL query can be prepared: # # Select from the articles, where scope_man_1_1 SQL conditions & gt; Or & lt; Scope_method_2 sql positions & gt; Is it possible to generate clauses (using or not using silk gem) with the methods of sculpture or ? We are discussing this and the original answer does not seem like this. Not least with scope;...

standards - Precendence in C++ if-statements -

संभव डुप्लिकेट: मेरे पास निम्न परिभाषा परिभाषा और एक विशेष उपयोग के मामले हैं: struct foo {bool boo; }; Int main () {foo * f = 0; । । । अगर ((एफ) एंड amp; (एफ- & gt; बुओ)) // & lt; --- विवाद का मुद्दा, 0 और वापसी 1; } क्या मानक गारंटी है कि उपरोक्त if-statement में ब्रेसिज़ का पहला समूह हमेशा दूसरे से पहले मूल्यांकन किया जाएगा? अगर यह नहीं है कोड के उपरोक्त बिट को फिर से लिखना सबसे अच्छा क्या है? वर्तमान में मेरे पास निम्न गड़बड़ है: अगर (च) {if (f- & gt; boo) 0; और वापसी 1; } और वापसी 1; यह शैली का मामला हो सकता है लेकिन आप कह सकते हैं: वापसी (एफ एंड amp; एफ- & gt; बू); ... या थोड़ा और स्पष्ट करने के लिए: वापसी ((एफ एंड amp; एफ- & gt; बू) 1: 0) ;

Jquery validator textbox not equal to default value -

I am trying to validate my form because users enter information on the button click, do not submit. I'm trying to do something that detects that the text in the text box is the default value. However, it is not working I'm not really familiar with jquery validator, this is what I still have. $ (document) .on ("click", "#numexercisesbutton, #submitworkout", function () {// exercise adds jQuery.validator.addMethod ("notEqual", function ( Value, element, absolute) {return.optional (element)} value! == param;}, "Please select a value!"); $ ("# Addworkout"). Validate ({Rule: {weightinputboxes: {Required} : True, notEqual: "Enter weight"}}, Message: {weightinputboxes: {notEqual: "Please enter a value"}}}} ($ ("# addworkout"). Valid ()) {addexercises.call this );}}); Actually this is not really why it is not working I am trying to emulate this post: Edit HTML: & lt ;! DOCTYPE html publ...

Returning an array of column data MySQL/PHP -

I know mysql_fetch_assoc which puts all data in one array from one line. Is there anything parallel to insert any data into an array? Such as the list of Title IDs and you may find everything you're looking for You can group all values ​​with commas using one line, you can use GROUP_CONCAT and then explosions () . PHP will create an array like this (after executing the query): $ col_array = explosion (',' $ line ['kernel']);

linux - Connecting to Mysql on AWS Elastic Beanstalk -

Image
I'm relatively new LAMP Dev I was trying to learn Linux through mainly AWS. I have a live flexible Beanstock example and are running. I did a yum install the following packages: mysql55.x86_64 mysql55-bench.x86_64 mysql55-common.x86_64 mysql55-devel.x86_64 mysql55-libs.x86_64 mysql55-server.x86_64 mysql55- Test .x86_64 seemed to install fine all ... then typed ... mysql -V that I mysql Ver 14.14 distribution 05.05.20, Redline for Linux (x86_64) 5.1 ... use Which confirms that mysql is installed ... but then when I type ... enter mysql -u ec2-user -p password Not: / * empty skip * / I ... error 2002 (Acaiattiatti): Socket to local MySQL server '/ var / lib / mysql / mysql.sock '(2) / Pre> it is now that I ssh-ing in the server went created in AWS console with a security group key pair. The key is authenticating me (.ppk file) when I enter the box as EC2-user. This is my "root" user, as far as I know, there is no password, but I c...

- Where Developers Learn, Share, & Build Careers

I use the System.Web.Script.Serialization library to encode elements from C #. How can I interpret it from the JS function? For example: JavaScriptSerializer js = new JavaScriptSerializer (); String model string = js Cyrilize (model); and want to do JS: var element = decode ('@ ModelString'); You have to use jQuery. var _Model = $ parseJSON (ModelString); Then you can use it: _Model.Name; _Model.Address; // etc ... I hope you want it ...

JSch: sudo sometimes not working -

I have three machines and I need to do them ssh , once again, and Then sudo a command I need JSch to do the following things: ssh This is a code block that I use to run JSch: string homefolder = System.getProperty ("user.home"); JSch jsch = new JSch (); Jsch.addIdentity (homefolder + "/.ssh/id_rsa.pub"); Jsch.setKnowHosts (Homefolder + "/.ssh/known_hosts"); Last session session = jsch.getSession (user, machine); Session.connect (); StringBilder Response = New StringBuilder (); {Try Last Channel Channel = Session. Openchannel ("exec"); ((Channel XAC) channel) .setCommand ("Pado / ATC / Intact DC / ADR Status") channel.connect (); Try in {InputStream = channel.getInputStream (); Output Stream Out = channel.getOutputStream (); Out.written ((password + system.zipproperty ("line separator")). ()); BufferedReader Reader = new BufferedReader (new InputStreamReader (in)); String line = null; While (empty! = (Line = rea...

javascript - Event for when file has loaded -

नीचे दिए गए कोड एक पृष्ठ पर चलता है: (function () {function asyncLoad ( ) {Var urls = ["https://something.com/script.js"]; के लिए (var i = 0; i & lt; urls.length; i ++) {var s = document.createElement ('script'); S.type = 'text / javascript'; s.async = true; s.src = url [i]; var x = document.getElementsByTagName ('स्क्रिप्ट') [0]; x.parentNode.insertBefore (s, x) ;}} Window.attachEvent? Window.attachEvent ('onload', asyncLoad): window.addEventListener ('लोड', asyncLoad, false);}) (); //]] & gt; मुझे एक ईवेंट श्रोता की आवश्यकता है जो यह फ़ाइल DOM में उपलब्ध होने पर आग लगती है। मुझे इस स्क्रिप्ट से वेरिएबल्स का उपयोग करने की आवश्यकता है I मुझे यह जानने की जरूरत है कि जब https://something.com/script.js लोड किया गया है और अगर ऐसा नहीं है तो मुझे आग में बैकअप लेना होगा यह तब हो सकता है जब फाइल को किसी निर्दिष्ट अवधि के भीतर लोड नहीं किया गया हो। वैकल्पिक रूप से मैं एक घटना का उपयोग तब कर सकता जब एक चर स्क्रिप्ट.जेएस...

ARM Cortex-M3 example for interrupt pending -

With ARM Cortex-M3, such as NXP LPC 1788, why would anyone use the interrupt set-pending register (S) Or interrupt clear-pending registers? Can anyone provide a simple, legal example of using these registers? In case of sole use, I can think that triggering low-priority software expansion is high priority IRQHandler Similar to GPIO interrupt handlers Normally you will use PendSV for this, but when you have more than one work or priority level, then you use any unused circumference exception vector can do. Sleep-on-opt-out can be useful in programs using the facility - where AOCC will run only in exception handlers. For example LPC17xx zero ETHERNET_Handler (zero) {// Toggle LED P0.4 LPC_GPIO0-> FIODIR0 ^ = (1

encryption - Decrypting Windows Wireless Passwords using Python -

I am trying to decrypt the stored Windows wireless password in a profile xml file via Python. Let me explain how this is calling Windows using Python's win32crypt module. My problem is that I'm not valid for use in specific state error and it needs to be run using local system You will get that error even if You run CMD.XA as an administrator. Here's where you have a little bit about Windows, which, as Windows NT & B, I did not know: The local system account is different from the administrative privilege. To run cmd.exe with the LocalSystem account, you must install a Microsoft package named PsTools. Inside psTools, there is a program called PsExec, which is like a sudo on a little * un * x Just download the zip associated with the bottom of the Microsoft TechNet page above and open it from anywhere where you can find it. To use PsExec, Open CMD.xe as an Administrator (Open the Start menu in the bottom, type cmd.exe in the search box, and run it as admin Pres...

python - Django Access File on Server -

I'm using Django to send iOS push notifications. To do this, I need to access the currently stored .pem certificate file on the server in my app directory with view.py, models.py, admin.py, and so on. When I try to send push notifications to a dragon shell, everything works fine on the server, but when I try to send a push notification using a DjangoView, it does not send me and gives me an SSLLRer is. I think this is because Django can not find the .pem certificate file. In short, I'm wondering how a Django view function can be read in another file on the server. No problem, I tried to redo it using an absolute file path, and I did this work after restarting Django.

c# - Telerik Free Testing Framework vs Selenium -

I am selecting one of the following to test with: Telereak Free Trial Framework and Selenium is a web site written in C # and Javascript. Can you please tell which of the testers to make a selection and why? To highlight the differences of the above devices for testing? Full disclosure: I am an evangelist for testing telereak studio and test framework, so I get some favoritism. has gone. Awesome of WebDriver I still do many workshops and talk around it. There is also a big story of Taylor's trial frameworks (free, with a paid support option), cross-browser compatibility, vested and apparently waiting around and some other areas. This is a natural progression from the full commercial version of Test Studios - however, you do not have to explicitly go to the paid tooling if you do not want to. Either tool will get the work done. The more important aspects of your long-term success with test automation are to focus on using page object patterns (despite which framewor...

.net - To get visitors IP address -

I would like to get the visitor's IP address. Which is appropriate to use: request. The server ("REMOTE_ADDR") or request. UserHostress Which is the best way? They are exactly the same UserHostAddress just call GetRemoteAddress . public string UserHostAddress {get {if (this._wr! = Null) {this._wr return GetRemoteAddress (); } Return tap; }} Public override string GetRemoteAddress () {return it back. GETServerVariable ("REMOTE_ADDR"); } Both also. Net Framework 1.0 / 1.1 are ahead

mysql - AJAX/PHP send values to server -

I am trying to use AJAX to send values ​​to a PHP file, which then updates mysql database on the server But for some reasons the value has not been transferred to the PHP file. This JS I use: function send_message () {var number = localStorage.getItem ("number"); Var message = sign ("message:", ""); JQuery.ajax ({type: "POST", url: serviceURL + "message.php", data: 'number =' + + + '& amp; message =' + message, cache: wrong, success: function (feedback) {Alert ("Message begging")}}}); } and this is message.php Everything else is inserted on mysql except for the number and the message. What could be the reason for this? You are posting data with AJAX using the post. To listen to those values ​​in PHP, ... Change: $ number = $ _GET ['number']; $ Message = $ _GET ['message']; with: $ number = $ _POST ['number']; $ Message = $ _POST ['message']; ...

- Where Developers Learn, Share, & Build Careers

I have two identical files and I do not understand what's wrong with them Because both are the same module request which defines the same method BBB (); But there is a result in an error while the other does not. Do you know why? NoError in the file XML, V6.0 , error is not a file. then set MSXML2.XMLHTTP60 as code> public xmlHttpRequest set it as the \ tools \ reference ...

- Where Developers Learn, Share, & Build Careers

I have created an html page that contains a text field and a submit button, the user records a word in the text field and Submit click is a servlet that receives the user input through request.getParameter (). Now I want to send this input word to thesaurus.com and retrieve synonyms for the word and want to send this synonyms back to the user as feedback. I want to add this functionality to the above sublettes .... plz help! You can use the java.net API or alternatively you can use the Apache HTTP Client Are there. Create a URL object using the Java.net API To test how the parameter is sent, you can use the Mozilla's http life header plugin

- Where Developers Learn, Share, & Build Careers

Once the app is installed, I've put the app_icon on the home screen Want to remove it now, when the app is about to uninstall I know how to remove ap_icon , but I do not know how to do this Can anyone give me a solution for this? In advance thank you When you uninstall an app, app shortcut The icon will be removed (though many copies you have made).

javascript - jqGrid not filling with data? -

Image
I have installed jqGrid to display my data, even if the data is coming from the server, in the data grid Is not displayed. This is the server response. Here's the JavaScript. & lt; Table id = "grid1" class = "scroll" & gt; & Lt; / Table & gt; & Lt; Div id = "pager" class = "scroll" style = "text-align: center;" & Gt; & lt; Script & gt; $ (Document) .ready (function () {jQuery ("# ​​Grid1") .jqGrid ({url: 'api / matchingservice / webpage / getuser', datatype: 'jason', mitip: 'get', callname: ['Id', 'account', 'ref', 'bidet'], callmodel: [{name: 'id', index: 'id', width: 200}, {name: 'account', index: 'account ', Width: 300}, {name:' referee ', index:' ref ', width: 300}, {name:' bidit ', index:' bidit ', width: 300}], line number: 10, row List: [10, 20 (pager...

javascript - html visibility style doesn't work -

I have a strange problem. I have a button, "next button" which I initially want to hide, but when one If the checkbox is clicked, it should look like. The code below does not work and it does not give any error. I tested it on IE9 and Firefox. 13 I searched other queries but I could not find this problem ... & Lt; Html & gt; & Lt; Top & gt; & Lt; Script language = "javascript" & gt; Enable Function () {Warning ("Clicked"); Var s1 = document.getElementsByName ("Next button"); S1.style.visibility = "visible"; } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Input type = "submit" name = "next button" value = "next" style = "visibility: hidden;" /> & Lt; Input type = "checkbox" onClick = "enableNext ()" /> & Lt; / Body & gt; & Lt; / Html & gt; An array is returned to your code...

php - Search in txt file, sum +1 and write the file -

Good day guys, I'm not really about a person who does PHP coding, That's why I am asking you. I have the file in txt format and in that file I place a line with "count: (n)", where "(n)" can be a numeric value. I need to search for counting: (n), (n) assume, submit it with 1 and save the file again. So if I have to count: 10 this should be 10 + 1 = 11. Thank you! You might want to use some Reggae to parse 'count: n' string from the file post text "itemprop =" text "> $ file = fopen ('text.txt', 'r +'); // Open the file to read and write the file. $ FileContents = file_get_contents ($ file); // Load $ $ variableContents to the contents of the file $ CountString = preg_match ('/ Count: [0- 9] + /', $ fileContents); // See examples of string 'count: n' where n is an integer, load string in $ countString $ count = preg_match ('/ [0-9] + /', $ countString); // $ get the intege...

- Where Developers Learn, Share, & Build Careers

I am trying to implement a datagrid view with both bound and unbound columns. For the bound column I used to type just typed datasets (XSD) how to convert my unbound column to editable and return the changes to the database. I am starting, someone can tell me that someone is good Here are some tutorials How to create columns this DB will be considered more about saving unbound columns

- Where Developers Learn, Share, & Build Careers

My app is made up of four tabs: three scenes with a webview and some text / audit ... the problem is my app Consume too many CPUs and I do not understand why, and the main problem is that when the app is turned on (user uses the Home button), my app is still CPU (about 20% Or more!) And battery consumption. I do not understand what the CPU uses so much, so I have two questions: How do I properly (with eclipse) process ( Method, activity ...) that use a lot of CPU? When I press the user's home button, how can I "freeze" with 0 CPU consumption (I think that is in onPause method, I try it with a full (), this work , But when the user returns to my app, he gets FC.) Thank you very much! Edit: It seems that my webview consumes the CPU, how can I stop this webpage without destroying the webview object? I am getting the solution: The JavaScript content was problematic in the webview. To resolve this: Prevent public null at @Override () {super.onPause (...

Aggregate Root in context of Repository Pattern -

I understand that the total roots are the only objects that will be loaded by the client and all the operations total for the objects within the total route The root is done by the same conference, a repository interface should be defined for a root route and any firmness within the aggreate root should be done by "Aggreate Root Repository" corresponding to the total route for any firmness operation. Does this mean that only the only root object should be passed in the "Gross Route repository" for the tasks related to sub-objects of the total route object gross route? Let me give an example. Suppose you have a school object and student object. Since the student can not exist without any school (you can say that a student can leave school, in this case he is no longer a student), then we have class school {string SchoolName; IList & LT; Students & gt; Students; } Class student {string StudentName; String grade; School miscals; } The school is th...

asp.net - Error in Masterpage -

When I use this code in my master page, it can not be debugged. But before that, I did not use the master page, it worked perfectly. Is there anything wrong with my code? I have kept my code here for your reference. Too much appreciate. & lt;% @ page title = "" language = "c #" masterpagefile = "~ / masterpace.masters" autoinwareWireUp = "true" codefile = "User.aspx.cs" inheritance = "Admin_user"%> & Lt; Asp: Content ID = "Content1" content placeholder id = "head" runat = "server" & gt; & Lt; / ASP: Content & gt; & Lt; Asp: Content ID = "Content2" content placeholder ID = "content place holder 4" runat = "server" & gt; & Lt; / ASP: Content & gt; & Lt; ASP: Content ID = "Content 3" content playholder ID = "contentplayholder5" runat = "server" & gt; & Lt; / ASP: Content & gt; ...

Check for null after malloc in Little kernel bootloader? -

In many places there is no check for zero after the malloc or memalign in the small kernel boot loader. For example: in zero to Flash_init (empty) flash_code = memalign (32, 1024); Char * target_cmdline (char * org_cmdline) {cmdline = (four *) Molk (MAX_CMDLINE_LEN); Memset (CMDline, 0, MAX_CMDLINE_LEN); } Is it supposed to return the malloc zero when booting? shunty, you should probably do some code background research :) Referring to the fact that Google / Qcom by the author of LK, and that part (aboot) is not created using some of the legacy Android bootloader dump, I still have files that look very similar but not published They can do it for the public domain The reason they are not checking for zero is because the legacy bootloader was implemented as a very basic form in the heap, there was no free, no fragmentation, just allocated, pay address and forget that is the reason The pile was not used for a very long time, so there was no problem there, but in the ...

- Where Developers Learn, Share, & Build Careers

I have some old J code that I'm going to C # XmlNodeList ItemTransferOutNodes = strxML .GetElementsByTagName ("ItemTransferOut"); XmlElement itemInfo = itemTransferOutNodes.Item (itemTrOutNodesCnt) .ChildNodes.Item (0) .get_Item ("itemInfo"); I do not see the API c # API XmlNodeList method called get_Item . get_item in c # . Thank you. There is no support for properties like H #, so they use methods instead Are "fake". You can find more information on If some of the property names are named in the C # object: public class dummy {public string SomeProperty {get; Set; }} In J #, you will need to call get_SomeProperty () and set_SomeProperty (string value): public class dummy {private string something credited; / ** @ Property * / Public unwanted setprop property (string value) {someProperty = val; } / ** @ Property * / Public string get_SomeProperty () {someProperty return; }} And the other side is true. If you find...

- Where Developers Learn, Share, & Build Careers

I'm trying to convert some Ruby code into Python. I'm having trouble with this line: digest :: MD5 digist (message) .mpack ('L *') I think Is that I should use the struct module and hashlib , but if I do: struct.unpack ('L', Hashlib.md5 (message) .digest ()) I get this error: struct.error: unpack length of 4 bytes of a object Required What should I do? Thanks, Rubik P.S. Output should be a list of 4 x 32 bits: irb (main): 039: 0> Digest :: MD5 digest ('hash'). Unpack ('L *') = & gt; [631892218, 19671 99 614, 3683860, 94, 4130231798] "post-text" itemprop = "text"> There is no support for arbitrary length ( * Operator). You must specify a criminal manually. Fortunately, the Composition module assigns you a certain length, and the Hashlib module tells you how many bytes are expected before By entering L you can specify the number of times to apply the pattern. And there is a s...

java - Spring AOP, applying protected/private advice -

I'm playing with the Spring App: config XML configuration when I made the advice method a safe / private method , So I expected that I would get a run time exception. However the advice method was executed correctly. Does this mean that the Spring Advice system is amending the access permit, or is there something else going on here? To clarify: Public square fu {public void foo () {} Advised method} Public class bar {Private zero bar () {} // Advice method, this example Both FU and Bar classes are in different packages. When processing a consultation, the spring process will be done through each annotated class reflection, and your class Does not call out directly, so the visibility privileges of your advice are not relevant. Unknowingly, there is no exact documentation that how the spring works so deeply, you have to help dig into the source code. It is understandable that the goal of the document of open-source project is not to explain the interior, but rather h...

c# - Html helper to show display name attribute without label -

मेरे पास यह है: [display (name = "empresa")] public string कंपनी {प्राप्त; सेट; } मेरे aspx में मेरे पास है: & lt; th & gt; & lt;%: HTML.LabelFor (मॉडल = & gt; model.Company)% & gt ; & lt; / वें & gt; और यह उत्पन्न करता है: ; & gt; लेबल के लिए = "कंपनी" & gt; एम्प््रेसा & lt; / label & gt; & lt; / th & gt; क्या लेबल के बिना केवल डिस्प्ले विशेषता को दिखाने के लिए कोई HTML सहायक एक्सटेंशन है, केवल सादा पाठ? मेरा इच्छित आउटपुट यह है: & lt; th & gt; एम्प्रेसा & lt; / th & gt; धन्यवाद! संपादित करें मैंने सुझाए अनुसार DisplayFor या DisplayTextFor की कोशिश की, लेकिन वे मान्य नहीं हैं क्योंकि वे उत्पन्न: & lt; th & gt; अमेज़ॅन & lt; / th & gt; वे संपत्ति के मूल्य वापस आते हैं ... मैं नाम का प्रदर्शन विशेषता से चाहता हूं। देर संपादित करें इन & gt; = MVC4, बस का उपयोग करें @ html.DisplayNameFor इससे पहले अपना स्वयं का सहायक का उपयोग ...

- Where Developers Learn, Share, & Build Careers

I know that WinSock send call may be delayed from MSDN: Naval Algorithm: S_Algorithm Problem Summary : If again the small message with the SOSNDBUF "0" option (& lt; MTU), Function Block 200ms. My question : Why send a message first Delay 200ms? Because TCP is inactive before sending it first, I think the first message should be sent immediately. But the results of the test are not desired. Why delay 200ms in the first message, Thanks for the answer. Add some details : Nuggls algorithm work for small messages such as: 1 If the wire is useless , Then send it immediately. 2. If ACK has not been received for formal message, then ACK & amp; Send 3. TCP Aluminum William McKenzie send the ACC after 200 mms of the window. So, I hope that the first message sends immediately and the second message waits for the first message of 200 ms for the acc. Is this wrong? Typically TCP puts data in buffer, as long as the action is not done by peer...

- Where Developers Learn, Share, & Build Careers

संभव डुप्लिकेट: मेरी वेबसाइट पर होमपेज में कई उपयोगकर्ता हैं, सूचीबद्ध हैं प्रत्येक उपयोगकर्ता के पास 'दृश्य प्रोफ़ाइल' लिंक है जो आपको www.mysite.com/user-profiles/profile.php?id=32 पर ले जाता है, आईडी से संबंधित है उपयोगकर्ता। क्या यूआरएल को यूआरएल का उपयोग यूजर के नाम और उपनाम को डेटाबेस में उस आईडी के लिए खोजना और इसे फिर से लिखना भी संभव है? www.mysite Com / user-profiles / john-a-doe किसी भी मदद की बहुत सराहना की जाएगी ... मैं इसे इस तरह से करने की अनुशंसा करता हूं निम्न प्रारूप mysite.com/user-profiles/ (ID) / (NAME) में प्रिंट यूआरएल > फिर इसका पुनर्लेखन करने के लिए उपयोग करें: रीव्रेट नियम ^ उपयोगकर्ता-प्रोफाइल / ([^ /] *) / ([^ /] *) $ /user-profiles/profile.php?id= $ 1 और amp; नाम = $ 2 [एल] फिर अपने profile.php SELECT के लिए id और नाम ध्यान दें: आप जो चाहते हैं उसे प्राप्त करने के कई तरीके हैं, लेकिन जब से आप (NAME) के लिए पूर्ण नाम का उपयोग कर रहे हैं, तो इसका कारण है एक समस्या (Ronn0 द्वारा नोट) जब दो उपयोगकर्ता...

How to embed authentication parameters in RTSP url for Quicktime -

How do I embed the authentication parameters in the RtsP URL for QuickTime, I was surprised that if QuickTime is its I'm starting to support at all. I have installed QT 7.7 and have tried the following two methods to embed the username and password: & lt; Object classid = 'clsid: 02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width = '200' height = '156' codebase = 'http: //www.apple.com/qtactivex/qtplugin.cab'> & Lt; Param name = 'src' value = 'Loading. Jpg '/ & gt; & Lt; Param name = 'href' value = 'rtsp: // address / store / d8138017caf5c1? Username = abcd and password = xyz '/ & gt; & Lt; Param name = 'target' value = 'myself' /> & Lt; Param name = 'autohref' value = 'true' /> & Lt; Param name = 'controller' value = 'wrong' /> & Lt; EMBED type = 'application / x-rtsp' pluginspage = 'http: //www.apple.com/quickt...

Acess php webservice from android app -

After the text I. But this error`" hopes to try to access the php web service from my Android app: START_TAG {http : //schemas.xmlsoap.org/soap/envelope/} Envelope (Status: START_TAG @ 11.43 in Java io.inputStreamReader@4052d300) ". This is my wsdl file & lt ;? XML version = '1.0' encoding = 'UTF-8'? & Gt; Xmlns: TNS = 'vase: PHP_SOAP_RPC' xmlns:; & Lt Definitions = 'PRODUCT' targetNamespace = 'PHP_SOAP_RPC Colossus' Soap =' http: //schemas.xmlsoap.org/wsdl/soap/ 'xmlns: XSD =' http: //www.w3.org/2001/XMLSchema 'Xmlns: soapenc =' http: //schemas.xmlsoap.org/soap/encoding/ 'xmlns: wsdl =' http: //schemas.xmlsoap.org/wsdl/ 'Xmlns =' http: //schemas.xmlsoap. Org / wsdl / '& gt; & Lt; Message Name = 'gettestRequest' & gt; & Lt; Part name = 'id' type = 'xsd: string' / & gt; & Lt; / Messages & gt; & Lt; Message Name = 'get...

sql - Benchmark MySQL on SSD: Tools and Strategies -

I am currently switching my servers from running on SSD on IISADB on hard drives. I My server has set up: With a Ubuntu 64 + Nginx + MySQL 5.5 +, a 3,800,000 rows (16GB) table is in the form of benchmark tables. ... I have two things that I have to do too much tests: How to affect the sync sensitivity to SSD from the hard drive How to switch to INODB will affect the concurrency I have questions about both the tools and strategies: 'mostly Interest in concurrency, What tools do I use to test? I played with the Siege and I found it really easy to play, but I think that even the most powerful Linux software should be better suited to my needs. completes. How do test strategies look like? I think the option of strategy can be a tight relationship with the device that I have chosen to use. For example, when playing with the siege, I would write PHP scripts that upload some heavy lift MySQL files, upload it to the server, in the form of parameters to s...

extjs4 - Easiest way to ensure browser cache is cleared when debugging EXTJS 4 -

This is driving me crazy. Every time I make a change, the browser has been loaded by the browser (the same behavior is Chrome and FF) at the time of joining JavaScript ... ctrl + f5 There is no effect, I have to clean the browser cache manually - which is a nightmare I have this code in my app.js: Ext.Loader .setConfig ({capable: true, disableCaching: false}); Edit: Chicken & amp; Egg landscape: To set a breakpoint in FF or Chrome, you need to turn on caching (see the above code) so that the '_dc' query string parameter is not in the script file But then you always get a cached copy, so you do not see your changes anyway If you stop caching, then you do not set a breakpoint Because I have closed the cache breaker for the same reason. My solution is to completely stop the Firefox cache (this is a Dev machine so I really do not need it) " About: config "Go to Firefox and search for cache browser.cache.offline.enable to fals...

javascript - Get row data in extjs on cell edit -

I am creating an excise grid that most columns are editable. What do I want if the user changes a column value to blur, then I'll call some method and calculate something based on the value of the other column. And changing the column value with the calculation values ​​is condom. ITaxOverrideModel = new Ext.grid.ColumnModel ([{ID: 'fromDate', Header: "From Date", dataIndex: 'fromDate', Width: 80, Renderer: drenderer, Editor: this.fromDateEditor} {id: 'todate', header: "Date to date", dataIndex: 'todate', width: 80, renderer: drenderer, editor: this.toDateEditor} {id: 'rawTax' Header: "Raw Tax", dataIndex: 'rawTax', width: 80, aligned: 'right', selectOnFocus: true, editor: New Ext.form.NumberField ({"stigma": this.calculateTaxForword}), renderer : Gts.payItemRenderer ()}, {id: 'surcharge', header: "surcharge", dataindex: 'overload', width: 80, sec Draw: ...

.net - How to make a form ShowDialog() itself in C# -

How do you open an example form on a modal path? I tried this. ShowDialog () but this form does not appear modal (you can still use other forms). I think this is because it is in its original form, if it shows itself, but I'm not sure. My problem: I have an application of 2 forms: mainform LoginForm MainForm creates an example of LoginForm to ask the user to authenticate And opens. There is a timer to check in regularly LoginForm and log in to the user - I want to open this timer LoginForm modally I know that this timer will be main form , but I would like to know how to create an example of a form ShowDialog () . Thanks in advance. Make sure that you ShowDialog after initial element : public newForm () {InitializeComponent (); This. ShowDialog (); } My Exams I have Form2 : public partial Category form 2: Form {public form 2 ()} // Public caller ShowModalForm () {InitializeComponent ();); ShowDialog (); }} And without ...

- Where Developers Learn, Share, & Build Careers

So I have been working on a WPF project for some time with Visual Studio 2010. I am using several class library projects which I have written about WPF control. Today I opened a solution for Blend for the first time, and he showed me many errors in this way: "The name xxx is not present in the name space" Assembly, I can see that The square appears at that place name. Also if it does not happen, then Visual Studio will not have compiled it, right? I have examined similar questions, and no, I do not have an issue with the X86 Build platform, all of my DLL .NET 4.0, and there is no missing reference. Is anything else? Blend looks like some bugs by removing the references to the project and then adding it back Fixed it

Ubuntu 12.04 application indicator python -

How do I use the menu item in the Python Pointer application? Menu = Gtk.Menu () buf = "Quit" menu_items = gtk.MenuItem (Click buf) # miss how close the application? Menu.append (menu_items) menu_items.show () ind.set_menu (menu) gtk.main () I would like to submit the buf menu items Application Close def quit: it works for me, at the top Import the system. import the sys And the function that you want to leave are: sys.exit (0) Below are my working examples (except for the applications except for functions): #! / Usr / bin / env python # # Author: Stuart Page & lt; Xxx @ gmail.com & gt; # Import gobject import gtk import Recommended import sys def menuitem_response (w, optionName): print option name def left Request (w, optionName): sys.exit (0) If __name__ == "__main__": ind = appindicator.Indicator (" example -simpl-client "," indicator-message ", Apiaidiactor. CATEGORY_APPLICATION_STATUS) Indkset_stets...

objective c - UIBarButtonItem disappears when replacing DetailViewController, reappears after rotating -

After reading several sources related to this, I can only conclude that I should set my representative at the wrong time , But I can replace the details view controller on the selection of a table row in the master like this: AppDelegate * app = (app deliit *) [[UIPAPRC share application]]]]; CustomerDetailViewController * newvc = [[CustomerDetailViewController alloc] initWithNibName: @ "CustomerDetailViewController" bundle: Zero with customer: [custData objectForKey: @ "name"]]; [App.detailNavigationController setViewControllers: [NSArray arrayWithObjects: newvc, zero]]; This view controller sets in the CustomerDetailViewController, I assign to the delegate: - (id) initWithNibName: (NSString *) nibNameOrNil bundle: (NSBundle *) nibBundleOrNil {self = [super initWithNibName: nibNameOrNil bundle: nibBundleOrNil]; If (self) {AppDelegate * app = (AppDelegate *) [[UIApplication shared applicant]]]; App.splitViewController.delegate = self; } Healthy return; ...

- Where Developers Learn, Share, & Build Careers

I am trying to read from a text file and I am using input to create several different objects . I do not want to read clearly after the file is empty, so I have a method empty () which reads to the point that I want in the file and then reads the test for the next line and zero. The problem is that if it is not empty then the file is read ... but in the second line from the next line, I read the first line to test, but can not read it again. My current idea is to create a dummy object to test it and actually use the same, second object to use. But it is very useless and I think there should be a better way .... Thanks for everyone! Notes: The method that reads is not the same method that is checking the empty bufferedReader is being used for all the objects because otherwise I would re-enter the file name from the user , Which I do not want to do. Why do not you stick to the phrase BufferedReader ? Instead of asking that the file is empty, and if it is not empty then ge...

- Where Developers Learn, Share, & Build Careers

मेरे पास दो पूर्णांक a, b और इस तरह एक पाश है: के लिए (int I = 0; i & lt; 8; ++ i) {if ((बी एंड (0x01 & lt; & lt; i))! = 0x00) {// c ^ = (a & lt; & lt; i); }} ए और बी चार एरे में संग्रहीत होने पर मैं यह कैसे कर सकता हूँ? अहस्ताक्षरित चार परीक्षण (अहस्ताक्षरित चार * एक [], अहस्ताक्षरित Char * b []) {for (int i = 0; i & lt; 8; ++ i) {if ((b [i] & amp; (0x01 & lt; & lt; i)) = 0x00) {shiftleft (ए) ; सी [आई] ^ = ए; चूंकि ए और बी अब एरेज़ हैं, आपको पहले इंडेक्स होना चाहिए और तुल्यता के साथ काम करना चाहते हैं इसलिए, उदाहरण के लिए, c ^ = (a & lt; & lt; i) के स्थान पर; आप कर सकते हैं: c [i] ^ = (a [i] & lt; & lt; i); कृपया ध्यान दें कि क्योंकि ^ = पिछले मान पर निर्भर करता है, सी [i] आरंभ करने से पहले कुछ अर्थपूर्ण होनी चाहिए।

objective c - Open ViewController right after viewDidLoad without .xib file -

I am working with the storyboard, as far as I know that I have not found the file what I want to do I: When the app launches, I want to see that the DB has been written in the last few days and if not, then open a scene which is not a standard view. (Because if DB is not empty then another view should be opened as it is a standard view.) How much I have tried so far: (Deedload / ViewDeepPipper in view) View Controller * vs. [[View Controller New]; [Self present ViewController: animated vs: yes complete: zero]; It leads to a black screen that contains nothings, it just stays black. After this I tried to do a segment but it was the result of reopening it once more. Is there a common / standard way to do this? Thanks a lot! In this case, you can instantiate a UIViewController instance from the storyboard example: UIStoryboard * Storyboard = [UIStoryboard storyboardWithName: @ "YourStoryboard" bundle: zero]; UIViewController * newController = [Storyboard I...

c# - Derived Class Deserialization -

There is a problem with deserialization with my logic simulation program. These are my element classes: public class AndGateData: two inputgate data {} public class two inputgate data: gate data {public two inputgate data () {Input2 = new InputData (); Input 1 = new input data (); } Public InputData Input1 {get; Set; } Public Input Data Input2 {get; Set; }} Public class gatetta: elementadata {public gate data () {outputdata = new output data (); } {Receive public output data output data; Set; }} Public Class Elementadata {public int delay {get; Set; } Get Public Guide ID { Set; }} And here are the sections responsible for sections: Public category inputdata: socketdata {} public class socketdata {public guide id {get; Set; } Receive Public Signal Data Signals { Set; }} Signal data is not important here. So, I will not write it (to keep this question clear) Even until someone says that it is not necessary. CircuitData is very important: [XmlRoot ("circuits...

MATLAB solver, calling on pre-defined variables within the equations -

So I'm wondering how to input the pre-defined variables in the equations themselves. Here's the code. function [A, B, C] = A_B_C_problem_generalized (lambda_1, lambda_2, mu_1, mu_2, gamma_1, gamma_2) Clear clc syms a1 a2 a4b1b2b4 c1 c2c4 [A1, A2, A4, B1, B2, B4, C1, C2, C4] = ... solution ('a1 + a4 = lambda_1 + lambda_2' ... 'a1 * a4 - a2 ^ 2 = lambda_1 * lambda_2 ', ... ..' B1 + B4 = mu_1 + mu_2 ', ...' B1 * b4 - b2 ^ 2 = mu_1 * mu_2 ', ...' c1 + c4 = 'Gamma_1 + gamma_2', ... 'c1 * c4 - c2 ^ 2 = gam_1 * gam_2', ... 'c1 = a1 + b1', ... 'c2 = a2 + b2', ... ' C4 = a4 + b4 '); ... How can I go about doing this? The number of lambda's, mu k, and gamma is expected to be added to you. After Ah, the right approach was not to use the wire instead, instead it was converted to a problem of finding roots. , Which the solver himself does, if you take everything on one side of the equation ... ...