Posts

Showing posts from May, 2014

variables - How to edit user input in Python 3.3.4 -

I have a program where the user uses a number for each specific criteria, this number is then created in a variable , Who wants to change the whole program. For example, I am called "power": strength = int (input ("power:")) Later, I try Let's add 10 to this number, but I could not. I tried to put it: strength == strength + 10 this did not come with an error message, but this variable did not change Use the same symbol for the assignment: Strength = strength + 10 There are two identical signs

How i use AND operator in sparql querys in java -

I'm learning how to create SPARQL queries in Java. Can anyone tell me how I can experiment in 2 or more questions? For example: string query string = "select * where {" + "? A SPARQL does not have and triples patterns just a second There are several synatx sort cuts placed after SELECT * WHERE {? A & lt; http: //dbpedia.org/ontology/capital> ? B? B.RDF: Type & lt; http: //dbpedia.org/ontology/big_city> . }

Clojure: how to avoid eval-ing the not-found expression in map get -

I have a map called "code> robots looking at the map, if given a robot by the given key If not present then I want to make one. not found RG is exactly the same as I want. However, it seems that is not found expression is evaluated eagerly. How can I stop this assessment so that I can create a new robot, if someone is not present? robot> (Def robot {1 {: name "R2D2"}}) # 'robot / robot robot & gt; (Get robot1) {: name "R2D2"} robot & gt; (Get robot 1 (printlane "fight it")) This (i.e. "R2D2"} I agree completely, but if your map has incorrect or zero values, its implementation will not work. Here's a more accurate solution: (If robot 1 is included) (get robot 1) (printline "beep boop")) and fancy macro: (defmacro get-small [map key not found] `(map # ~ map key # key) (Includes # map # key included) (get the map # key # ~)) To eliminate the possibility of generating some side-ef

javascript - How do I hide the iOS7 status bar when returning from PhoneGap Camera API? -

I have come across a problem when using Cordova / PhoneGap to create an app for iOS7. Can not hide very well. Initially I went to the plug in the encode and added all the correct settings to make the status bar invisible in this solution. It works great until I hit the Cordova camera with the API. When I take my app to go to the Camera app to take an app (then put it in the screen). Once the image is selected and returned to the app, the status bar is visible again. I have installed the status bar Cordova plugin and I am trying to hide the status bar as soon as he returned, the camera device in my device surprised - it does not work! However, I can enable a button that enables a button to hide the status bar when I click on it - but I want it to happen automatically. I have inserted my code below: div id = "ccamera-fun" data-role = "page" data-title = "camera fun activity" & gt; ; & Lt; div data-role = "header" data-theme =

innodb - How to Enable/Disable doublewrite buffer in mysql? -

मैं mysql में डबल-टाइप बफर कैसे सक्षम / अक्षम करूं? डबल-रेमिट बफर सक्षम है या नहीं या विकलांग? वहां समान नाम वाला एक सर्वर चर है, जो कि यह लिखने की विधि को जांचने के लिए इस्तेमाल किया जा सकता है सक्षम है: mysql & gt; @@ innodb_doublewrite चुनें; + ---------------------- + | @@ innodb_doublewrite | + ---------------------- + | 1 | + ---------------------- + 1 सेट में पंक्ति (0.15 सेकंड) इसी मोड को सेट करने के लिए, या तो का उपयोग करें - सर्वर प्रारंभ (सीएलआई) या innodb_doublewrite कॉन्फ़िगरेशन फ़ाइल डायरेक्टिव के लिए --इन्निोड-डबल-लिखें पैरामीटर।

osx - Application not supported on this type of Mac -

I have created a purpose-application that works on 10.9, but not 10.5 (Mac Mini Core Duo; 32 - bit). When I open the .dmg file (on mini), the icon includes the 'no' symbol (through it-cycle with a one-line). When I try to launch an application, I get an error that reads you can not open the application [name of application here] because it is not supported on this type of Mac. . OS X Deployment Target: OS X 10.5 Screenshots: Relevant: / P> What am I missing? Settings X text "> Standard Architecture (which is - IIRC - XCode 5.1 to x86_64 ). To make it for 32bit and 64bit you will need to see which architecture is listed with different options of architecture currently Universal and create a universal 32bit and 64bit app. Architectures listed for standart architectures can change with future updates of and Universal Xcode, if the apple will be any other for your desktop environment Start supporting the architecture.

JSF, CDI, EJB + JPA and Transaction -

With the JEE 7 setup using JSF, CDI, EJB + JAPA, I took part in this issue "failed to start a collection". I got a solution but would like to confirm that this is a proper solution and I have understood it correctly. Setup is basically: JSF - & gt; CDI Bean - & gt; EJB3 - & gt; JPA In the JSF page I basically: & lt; ui: Repeated value = "# {dishService.dishes}" var = "dish" & gt; & Lt; ui: Recurrence value = "# {dish.ingredients}" var = "components" & gt; # {ingredient.name} & lt; / UI: Repeat & gt; & Lt; / ui: Repeat & gt; cdi bean: @entententent @ named public class dish service {@ inject private database service local database service; Public listing & lt; Dish & gt; getDishes () {return database Service.getDishes (); }} EJB: @Stateless Public Class database service executes databaseService Local, DatabaseBaseRemote {@ PrestigeContacts (entity name = "distl

parse a delphi text , Access violation with function call -

I want to parse an ASCII text for all instances of the instance (bla, bla, bla), of the following code Using text in parenthesis function filterText (const. Source, tagstart, tag and string): TstringList; Surcharge; var startups, endosse: integer; Start the result. Clear; Try StartPos: = PosEx (TagStart, Source); While StartPos & gt; Start Ink (Startups, Length (Todstart)); And Piece: = Points (tag, source, startup); result. Add (copy (source, startpiece, endosse - startup)); StartPos: = PosEx (TagStart, Source, and Peace + Length (Tagind)); End; Finally the end; End; I call this function using the following code memo1.Lines.AddStrings (Filter text (memo1.Lines.Text, '( ',') ')); Rather than returning all the text between the brackets, I get an AV .... why ???? this line: result. clear; Calls to an initial variable type of TStringList . It is undefined behavior in your case that appears as an access violation. You can instantiate the st

php - Rewriting url having more than one url parameter -

The way to rewrite URLs using the .htaccess file has been researched. After more time investment, I still have a very vague idea of ​​how the URL will be rewritten. Actually, I have a URL: http://mehthesheep.com / Bali / Zimbaburn / BluePoint / 1 I would like to rewrite it: http://mehthesheep.com/countries/hotel php? hotel_id = 1 & amp; State = Bali and City = Merger How do I know about having more than one parameter in the URL? A few simple explanations will be appreciated! Put this code in your DOCUMENT_ROOT / .htaccess file: Rewrite code% {REQUEST_FILENAME} on rewriting! -d Rewrite Convert% {REQUEST_FILENAME}! -f revised rule ^ ([^ /] +) / ([^ /] +) / ([^ /] +) / ([^ /] +) /? $ / countries /hotel.php?hotel_id=$4&state=$1&city=$2 [L, QSA]

c# - Use custom conventions when persisting Rebus sagas in MongoDb -

When I store my domain in mangodibi, I use a custom convention (as stated) I have been here to continue my songs as they represent the string, since we found it easy during debugging. I want to do this in the form of storage as my saga using Reebus using Mogodibi. Is there any way to do this? Okay, my bad ... conventions are used globally in the Conventions Registry var conference = new meeting pack (); Conferences Add (New EnumSerializationConvention (BsonType.String)); ConventionRegistry.Register ("Saga Conventions", Conventions, x => True); The key is the third parameter of the register method, which acts as a filter for selection of which class has been affected by the conference (in my case I was filtered by namespace , And that is because the sonnet data was not correct).

Eclipse Download file "Not a valid archive" -

I downloaded the eclipse for PHP (Helias win 32) from the eclipse site but when I open the downloaded file If I try, it says "zip file is not a valid collection" Any help is appreciated. Thank you, thanks in advance, HP looks like your download is just corrupt . You can get the checksum (in the column on the right) to compare to download.

int - How to sort the digits of a number and get another number in Python? -

Beginning on Python and trying to code this program: a = 0 number = int (Input ("Choose four digit numbers:"), while the number! = 6174: #Captrecor continuously sorted (number) sorted (number, reverse = true) big = "" .joined (sorted (number, reverse = true)) small = "" (Sorted) number = (int) - int (small)) a + = 1 print (a + "repeated.") I get the following error : sorted (number) typeError: 'int' object is not iterable Then how do I get the number and the second number Do you? First of all, sorted around a nearby Not only does not change, you need to do something like a = sorted (a) . Now for your example, both of you are trying to work with number as int and a str < / code>. You need to convert between str and int when necessary: ​​ a = 0 number = input ("four digit number Select: ") number = =" 6174 ": large =" ".joined (sorted (number, reverse = true)) small

ImageMagick Convert: how to add alpha shadows upon RGB image? -

Image
एक आरजीबी छवि को देखते हुए: एक ग्रे स्केल, अस्पष्टता 0% अस्पष्टता 100% काली छवि को देखते हुए: शेल कमांड का उपयोग करके आरजीबी छवि पर अल्फा छाया जोड़ने के लिए कैसे? (ImageMagick कन्वर्ट के लिए preferemce) मैं ऑपरेटर का उपयोग कर छवियों की रचना करेंगे। कमांड एसआरसीपीपीपी ओवरले पर रूपांतरण करें- कॉम्प्लेज मल्टीप्ले -ऑमेट्री 948x630-कॉम्पोजिट आउट पेज। पैदा करता है:

Removing database dependency from 3 tier architecture -

I've worked as part of a team on some 3-level applications for a long time, I like this architecture, But in all these applications I have seen the huge dependence of the top two layers on the data abstraction layer. This makes test and counterfeit hard work, as it is practically impossible to execute the application or perform some large scale without any existing database connection. Is there a pattern that tries to solve this problem? (Dip, one of the solid principles) relates exactly to the situation you describe: A high-level module should not be dependent on low-level modules. Both should depend on separation B. Abstraction should not be dependent on the details. The description should be dependent on your stages. For your situation, it is particularly relevant: to reference the data layer rather than the UI and business logic, those layers should only depend on the residue (eg interface) Which can be implemented in different ways. For business level this mean

c# - Convert Distinguished Name to Canonical Name -

System.DirectoryServices (अर्थात DirectoryEntry वर्ग) का उपयोग करना है जिस तरह से सक्रिय निर्देशिका उपयोगकर्ता & amp; में विशिष्ट नाम विशेषता को परिवर्तित करने के लिए, या कैनोनिकल नाम प्राप्त करने का तरीका। कंप्यूटर स्नैप-इन? मुझे लगता है मैं नियमित अभिव्यक्तियों का उपयोग कर ऐसा कर सकता हूं, लेकिन मैं एक अधिक विश्वसनीय दृष्टिकोण को पसंद करता हूं। उदाहरण के लिए, मैं इसे CN = Murdock, James, OU = अक्षम उपयोगकर्ताओं, ओयू = GOG, DC = contoso, DC = स्थानीय इस contoso.local / GOG / निष्क्रिय उपयोगकर्ताओं / मर्डोक, जेम्स यह एक निर्मित विशेषता है निर्देशिकाईंट्री पर, आपको ताज़ा करेंकैश का उपयोग करना होगा: var de = new DirectoryEntry ("CN = Murdock \", जेम्स, ओयू = अक्षम उपयोगकर्ता, ओयू = जीओजी, डीसी = कॉन्सोटा, डीसी = स्थानीय "); de.RefreshCache (नई स्ट्रिंग [] {"canonicalName"});

javascript - Bootstrap Datepicker attributes not being set -

I am trying to set the start date with autoclose with the datepicker automatically: true. However, it does not work Can you please tell me what am I doing? I have code on jsfiddle effective date: I have written for datepicker that the javascript is as follows: jQuery (function () {var efDP = jQuery ("# ​​effectivedate") ; EXDP.datepicker ("setdate", new date (date.N. () () () (), (), (), (), () ("#include"), jQuery ("# ​​end Date "), Date Picker (" SetDate ", New Date (EffectDetate Time) + 259200000); jquery (" # expirationdate ") datepicker (" update ");});}); You are trying to update a non-existing datepicker on some lines first Are there. exDP.datepicker ({autoclose: true}); Creates a new example: You must set the option directly: jQuery (function () {var efDP = jQuery ("# ​​effectiveness"). Recorder ({Autoclose: True}); var exDP = jQuery ("Date picture (" activated &q

python - Will SQLAlchemy update the content of objects in the middle of a session? -

In SQLite docs, it says: "When using a session, this meditation It is important to keep in mind that objects related to objects are proxy objects for transactions conducted by the session - there are many types of incidents, which can cause the object to reuse the database to keep synchronization. Separating objects from the session, and using them To continue, however, there are warnings in this exercise. This means that generally, you can re-associate allies again and another session when you want to work with them again so that they If you are in the middle of a session in which I read some items, some manipulations and more questions, you can resume your normal work of representing the database status. "[ And will be updated to protect before saving some objects, so there is no risk that changes in DBS by other users when I do I object to what you have been working with them unexpectedly? In other words, what are the "diversity of events" mentioned abo

c# - Why WPF ListBox.ListItems do not raise MouseRightButtonDown -

मैं कोशिश कर रहा हूँ RoutedEvent उदाहरण WPF 4 Unleashed book से। उदाहरण में विंडो पर कई नियंत्रण हैं और विंडो के शीर्षक बार में इवेंट स्रोत को प्रदर्शित करने के लिए विंडो पर MouseRightButtonDown परिभाषित किया गया है। इसलिए जब हम विंडो के किसी भी बच्चे के तत्व पर सही क्लिक करते हैं, तो उसका नाम, प्रकार आदि विंडो के शीर्षक बार में दिखाया जाता है। हालांकि जब मैं लिस्टबॉक्स की सूचीइटम पर राइट क्लिक करता हूं, तो इसका नाम, शीर्षक आदि विंडो के शीर्षक बार में सेट नहीं करता है। क्यों? कोड निम्नानुसार है: XAML & lt; विंडो x: कक्षा = "TempWPFProj रूटिंग एवेन्ट ड्रीम "एक्सएमएलएनएस =" http://schemas.microsoft.com/winfx/2006/xaml/presentation "xmlns: x =" http://schemas.microsoft.com/winfx/2006/xaml "शीर्षक =" WPF 4 के बारे में अनलेश्ड "साइज टू कंटेंटेंट =" चौड़ाई और हाइट "पृष्ठभूमि =" ऑरेंजराड "माउस राइट बटटनडाउन =" विंडोमाउस राइट बटटनडाउन "& gt; & LT; StackPanel & gt; & lt; लेबल फॉन्टवेइट =

How to add total price in a cart php -

Hello, I'm currently making a project for assignments to create a website that sells games, so far everything is fine On the issue of linking the shopping cart's totals. Below is a PHP part of the cart file that shows every game and puts the price of the game every time it carts. The only value I get is 0. I query this php file at the top of this file Query ($ query); $ numrow = $ results- & gt; num_rows; ? & Gt; I'm not sure why this code is not working: $ i = 0; While ($ count & lt; $ numrow) {$ i = $ gamePrice * $ quantity; } echo $ i; Cart.php & lt ;? Php $ count = 0; While ($ count & lt; $ numrow) {$ row = $ result - & gt; Fetch_assoc (); Extract ($ line); Echo "& lt; div & gt;"; Echo "& lt; div class = 'recommended_games' & gt;"; Echo "& lt; img src = 'picture />. GameIMG.' '/'> "; Echo" & lt; / div> "echo" div class

PIC Assembly: Decrementing register with 0 -

If there is 0 in the register and I reduce some value from him, what will be the value inside the register? Will he call zero flag in the status register and how can he check that we are going in negative numbers? For example, in this code MOVLW b'00000000 '; The value in W is 0 SUBLW b'00000001 '; I am trying to reduce W register, what are the outcomes? The value must be subtracted in SUBLW W, be it zero or not. Course result will be W = W - literal; If W = 0, then it is a denial if the type is signed, or wraps around if it is not unsigned. Before: W = 00000000 - 1 after ____________________: w = 11111111 (-1) But if W is zero, then it is minus zero Subtract from zero to zero, so zero flag will not start If you need to know if the value is negative or not, use both flag and zeros flag < pre> results carry zero positive 1 zero zero 1 negative 0

c# - Making a jukebox, adding track list to list box from .text file -

Correct I am relatively new to programming and I am currently in the middle of my second work, which is creating a jukebox using the array. I have many text files that are kept in this way 2 other Big Bats John (1961) - Jimmy Dean, the list box, the media player, the text box, the timer and the menstrip. MP3 My Ding A Ling - Chuck Berry MP3 The first line contains the amount of tracks and the style of the second tracks is the actual tracks of the rest, what I have to do is display the tracks in the list box and when I scroll In the Use List tab, it displays the next set of the following styles. The following is a small piece of my code, I currently have some global public string MediaPath = System.IO.Path.GetDirectoryName (Application.ExecutablePath); Jan Int. Listbox [] Media Library; And then I use numbers for array columns if I have done it correctly. Private Zero JukeBox_Load {Object Sender, EventArgs E} {StreamReader} inputStream = File.OpenText (@ "C: \ Users \ J

ios - Compress CSV file with GZIP in xcode -

I need to create a large table in the CSV file and compress it. I can create a CSV file like this: Is it possible to include it with GSI? Thanks for all. Best regards. This will generate a zip file called "somefile.zip" in the temporary directory, which will contain a file named "data.csv"

java - JSON validation using REST assured -

I am trying to validate the Jason object. I use, import static com.jayway.restassured.module.jsv.JsonSchemaValidator.matchesJsonSchemaInClasspath; Static org.hamcrest import. MatcherAsertSet; Import org.junit.Test; Public class testclass {@Test public void validates_schema_in_classpath () {// string jasonstring = "{\" status \ ": false}"; // The response of the greeting / again emphasizes that (JsonString, Maxen Sachema Inclasspath ("Gritter Schema. Jason")); }} greeter-schema.json: I have a good result, even if JsonString is not with the success of "{\": "wrong} ". For example, I get the result correctly when JsonString = "{\" is success \ ": false}, {\" isfalse \ ": true}", or "{\" isccess {": false}, Testetstets Your JSON schema only checks that the attribute "isSuccess" exists, it should not be either Right or wrong, you can do it with Jason Schema, but I do not

c# - Asp.net Identity Login can't login -

I'm just testing the login function on my website. Login is working fine lately, but now I'm getting the error Login user failed for 'Dolapo'. This session has been assigned a tracing ID for 'e25c9fb4-3ec4-4ce1-9f7f-c01988c856a7' when you need help, then provide this tracing ID for customer support. On line var user = Wait UserManager.FindAsync (model.UserName, model. Login method Public Attachment Task ActionResult Login (Login Visual Model, String Return URL) {if (ModelState.IsValid) {var user = UserManager.FundSync (Model UserName, Model Passor D); if (user! = Null) {sign in async (user, model waiting in memory); return redirected local (return url);} else {ModelState.AddModelError ("", "invalid user name or password." );}} // If we found this, then some failed, see the form return view (model);} login page @model bitwebsite.model.} & lt ;! - This is the login page to use logon on the website to use the

Git bash console on windows does not start -

Image
While trying to start a git bash window on any folder in my windows 7 machine, the git bash window is immediately closed She goes. / P> I do this by clicking on the "Git Bash" option in the context menu. When I started the Git Bash If I try to do the console window temporarily starts for a few seconds and comes out from the 'Logout' message. I tried to go to GIT location and run "Git Bash.lnk" which comes out of this message: D: \ Devpogs \ installed Gone \ git-1.7.11 \ git & gt; Git Bash.lnk "Welcome to Git (version 1.7.11-previews 20120710) Run 'git help git' to display support index. 'Git help & lt; command & gt;' Play Eddie @ Agean / $ Logout D: \ Devprogress \ Installed \ git-1.7.11 \ git> Something is wrong to display support for specific commands. ? System Info: Windows 7 64 bit Professional Edition. Git 1.7.11 Try git v1.8.4 for windows, it works fine for me. It seems that the new versi

apache - Block access to http version, not https version? -

I'm looking at creating a relay rule everywhere that only applies to http: // versions of the website and Not http: // version. Actually, for a login page, I am trying to block all access to the http version so that the user is forced to enter through a secure page. In my case, the example is: http://shop.example.com/admin (blocked) https://shop.example.com/admin ( Access) Can anyone help me with this? And if I am searching for the wrong keywords, please do not lower my score just what advice I have and I will remove this question and continue my searches. I therefore have only an index.php file and an .htaccess file for the entire website? Enter this code in your DOCUMENT_ROOT / .htaccess file: Reviving OnRightConnect% {HTTPS} Close ReversionContact% {HTTP_HOST} ^ Shop \ .example \ .com $ [NC] Rewrite Rule ^ admin - [F, NC] This will return the forbidden error to all http://shop.example.com/admin requests

python - creating directories from for loop -

I need to create a directory with loop. I have a list. a = [Banana 1234, Sep 456, orange 789] And I need to make folders by the names of those numbers with numbers in the list Finished for example. c: \ folder \ 1234; C: \ folder \ 456 and so on. Atrinkta for length code is: folder = re.findall (r '\ d {9,}', length) os.makedirs ("D: / Python_study / images / skelbimai / "+ folder) but I get an error " Type error: can not add 'str' and 'list' objects " / strong> Do not know what to do. Any help please edit I tried my method a second time, after deleting the created folder for whatever reason, Python gives me an error WindowsError: [Error 183] The file that already exists when a file can not be created: 'D: / python_study / images / skelbimai /' 2ndEdit shaktimaan, I get another error now AttributeError: There is no attribute 'group' in 'NoneType' object . what does it mean?

3D transformation of matrix in Matlab -

Image
मुझे 3 डी-रूपांतरण / रोटेशन के लिए Matlab समाधान चाहिए एक मैट्रिक्स का जो घुमाने के लिए ऐसे तरीके से है कि शुरुआती अंक को कुछ कोण में बदल दिया गया है, लेकिन अंतिम बिंदुएं समान हैं। इस परिदृश्य को चलाने के लिए मेरे पास एक P वेक्टर है इस मैट्रिक्स को आगे के संस्करणों (अधिक प्रोजेक्टाइल एक मूल प्रोजेक्ल से) में बदलने के लिए क्या सुझाव दिए जाएंगे, जिससे कि यह प्रक्षेप्य की दिशा की दिशा बदलता है और लगातार अंतिम स्थिति रखता है लक्ष्य मारने के लिए।! मैं ड्राइंग में बहुत सटीक नहीं हूं क्योंकि यह 2 डी में है, लेकिन मैं एक ही अवधारणा को 3D में चाहता हूं, यहां लक्ष्य फेंकने का अंतिम स्थान है, जो कि suppoesed है वही iin पूरे scenerio, लेकिन शुरुआती अंक माता पिता प्रक्षेप्य से व्युत्पन्न कुछ कोण / दिशा को trasformed हैं। मुझे आशा है कि मैं अपने मामले को साफ़ कर रहा हूं। पी वेक्टर: P = -21.8318 19.2251 -16.0000 -21.7386 19.1620 -15.9640 -21.6455 19.09 88 -15.9279 -21.5527 19.0357 -15.8918 -21.4600 18.9727 -15.8556 -21.3675 18.9096 -15.8194 -21.2752 18.8466 -15.7831 -2

sql - Mysql `using` syntax for multiple tables and one joining column -

के बजाय SELECT * से a, b, c WHERE a.jid = b (जेड) में शामिल हों JOIN C USING (jid) या SELECT * से एक JOIN b उपयोग कर रहा है मैं इस तरह से कुछ का उपयोग करना चाहूंगा: SELECT * से a, b, c USING (jid) यह एक सुविधा की तरह प्रतीत नहीं हो सकता है, लेकिन जब मेरी क्वेरी 4 तालिकाओं के पार चलाती है और शायद अधिक, यह एक असली सहायक हो सकता है। Ie वहाँ एक स्तंभ है जो मेरे डेटाबेस में काफी कुछ तालिकाओं को एकजुट करता है क्या उस स्तंभ को केवल एक बार नाम से कई तालिकाओं की क्वेरी करने का कोई तरीका है? आप नैतिक जोड़े स्वचालित रूप से एक ही नाम के साथ कॉलम पर आधारित टेबल में शामिल होने के लिए। हालांकि, आपको यह सुनिश्चित करने की आवश्यकता होगी कि jid एक ही नाम के साथ एकमात्र कॉलम होगा, अन्यथा आपको वह परिणाम नहीं मिलेगा, जो आप चाहते हैं। एक प्राकृतिक JOIN एक संयुक्त कार्यवाही है जो आपके लिए एक अन्तर्निर्मित प्रवेश खंड बनाता है, जिस पर शामिल होने वाली दो तालिकाओं में आम कॉलम पर आधारित है। सामान्य कॉलम कॉलम हैं जो दोनों तालिकाओं में समान नाम हैं। चुनें एक प्राकृतिक से जुड़े

Get resize mode of WinForm in c# -

Assume that I have a simple form in C # .NET, and it has to be changed again. The size is changed during the form, how can I get the maximum, and at least when ?? Is there any resize mode property in any event? The form object is a windowstate property whose value is FormWindowState < / Code> is one of the enumerated values: normal , least , or maximized . If you check that property in your resuscitation event, will he tell you what you should know?

jsp - semantic search using sparql-dl and owlapi -

I have a jsp based web application that uses Tomcat as a j2ee server, please apply to me one Recommend semantic search with the necessary steps? I have added the code below. Public string query ontology (string value) throws overlotation activation {Ollantilla manager manager = OWLManager.createowLOntologyManager (); OWLDataFactory dataFactory = manager.getOWLDataFactory (); File otology file = new file ("D: \\ on.owl"); Ovlontology Psychological Ontology = Manager. Load Ontology Pharmatology Document (Ontology File); // OLLRJason Arstermarkt = New Structural Reasoner Fattarter () Vs. Regener (psychological ontology); OWLReasoner rHermit = New Reasoner. ReasonerFactory (). Make Reasoner (psychiatricOntology); {QueryEngine queryEng = QueryEngine.create (Manager, RHermit); Query query = query Create ("Select" C where {class (? C)} "); Query result result = queryEng.execute (query); Return result. ToString (); } Hold (query parser exception ex) {// return

ASP.NET MVC: How to reference the MVC Area root in View script paths? -

I have an ASP.NET mvc 4 application with some sub-areas. Ideally I would like to have every field as self-contained as possible, which includes all the materials, images, etc. Is it possible to override the behavior of "~" (tilde) characters Alternatively, there is no other common way to reference area Root? Resource paths within your area view script should always refer to area routes rather than application routes? Example: @ * "" / / area / my niftyearia / images / logo page "should indicate: * @ @ Url.Content ("~ / images / logo.png"); Note: The reason behind this is that I have some small applications I'm building an ASP.NET MVC web application, and I want to make sure that apps can be easily broken out and rearranged as needed, where there is a need A that the road should be separated into its own applications, without dividing all the resources / script files and clearly changing one group - the definitive path. Of

php - this code have error Object of class mysqli_result could not be converted to string -

यहां कोड दर्ज करें $ tt1 = mysqli_query ($ con, "SELECT MAX ('task_id'), MIN (task_id) ) कार्य से "); प्रतिध्वनि $ tt1; इस कोड को MySQL से कनेक्ट होने के बाद $ tt1 = mysqli_query ($ con, "चुनें MAX ('task_id') एएस अधिकतम, MIN (task_id) से कार्य से न्यूनतम)"); $ पंक्ति = mysqli_fetch_row ($ tt1); प्रति पंक्ति गूंज ['अधिकतम']; प्रति पंक्ति गूंज ['मिनट']; आप mysqli_fetch_row () के बजाय mysqli_fetch_array () या mysqli_fetch_assoc () कर सकते हैं क्योंकि आप प्राप्त करने का प्रयास करते हैं एक पंक्ति, और चुनिंदा क्वेरी में उपनाम को कॉलम में जोड़ने के लिए, उपनाम से परिणाम कॉल करने के लिए: MAX ('task_id') अधिकतम == & gt; $ पंक्ति ['अधिकतम'] ।

Matlab 3-layered Image Matrix -

I am currently learning matlab and treat troubles as an image section. I have this PowerPoint slide about the matlab image: **** Image matrix * 3 -Star image matrix - read 'A' rainbow Jpga ???? IM IM2 for subset IM ??? E.g. (155: 184, 145: 164, :) * 1 layer of an image ??? Find the red layer in IM2 **** I want to ask (155: 184, 145: 164, :) What does that represent? What does each value represent in parentheses? Apart from this, what does the semi-colon signify? Thank you! Say that you have 3 dimensional matrix A and you are listing your matrix. I will use the example given above: A (155: 184,145: 164, :) 155: 184 In the first entry, means to carry 155 to 184 rows, take the column from 145 to 164 in the second entry, and in the last entry the semi-colon means that every element with the third dimension is meant. So if you have 200x200x3 , then the semi-colon will take 3 dimensions.

Binary file not being read properly in Java -

I am trying to read a binary file in Java using bufferedreader. I have written that the binary file using "UTF-8" encoding. Writing code in a binary file: byte [] inMsgBin = null; Try {inMsgBin = String.valueOf (cybertext) .getBytes ("UTF-8"); // SYSTEM.out.println (CIPHER text: complete: write binary: "+ inboxbun);} hold (unsupported encoding exception preceding) {Logger.getLogger (EncDecApp.class.getName ()) .log (Level.SEVERE, null , ex);} (File Optical Stream Out = New FileApplyput Stream (filename + string.valuef (New SimpleDetermate ("YYMDhamdham"). Format (New Date ()) + ".encmsg")) {out.write (inMsgBin) ; out.close ();} hold (IOException pre) {Logger.getLogger (EncDecApp.class.getName ()) .log (Level.SEVERE, null, ex);} System.out.println ("cybertext charCount =" + cypherteext.length ()); Here 'cybertext' is a string with some content, the total number of characters written in the file is given as 1st. Aft

regex cant match string with start and end -

So I've never had this problem ever, but now I do not know how to deal with it, my example : So I have a simple string: "1" and a simple regex: ^ [0-9] & amp; it does not match! It will match properly without the beginning and the end, but I need them (for a bigger problem) why do anyone have any ideas? Thanks, nico & amp; String anchor is not the end of the b भाव. This is usually the use of $ is ^ [0-9] $ it allows a string made of a numeric character.

algorithm - Maximum Profit given n apples to sell -

Looking at an array of N and sell the value of n integer, such value [i] represents the value But I can be selling 1 apple. Combine maximum revenue which we can generate in any combination by selling N apple which we can choose. Example: The given 8 apples and value arrays are as follows: - {1,5,8,9,10,17,17,20} meaning 1 Apple = $ 1 = $ 4 Total sales price of $ 5, etc. The maximum revenue will be generated by selling 2 + 6 apples for a maximum of 5 + 17 = $ 22. I have a simple recursive solution in my mind, but I wonder what is the complexity of the best time that we can achieve? Is there an opportunity to implement dynamic programming or memoison? Thank you! definitions let dp [k] optimum By the form, DP [0] = 0 DP [K] = Max {DP [I] + Benefits [K -] > Then we can define, the recurrence relationship is as follows:}, where 0 & lt; = I & lt; k You can DP [n] . Interested in computing. Conclusion You can apply it easily Down-up

sql server - SQL Job Agent DB Restore fails with error #6107: Only user processes can be killed -

We have a SQL service agent who has "V hour" to restore our local database (Fudata) from the production backup Runs in. First of all, the database is set to SINGLE_USER mode and any open process is killed. Second, the database is restored. But with the error 6107, sometimes three steps fail: "Only user procedures can be killed" It appears that once a week or twice a week It seems the interval in Here is the code for step 3 where failure occurs sometimes: USE Master; Go exec msdb.dbo.KillSpids FooData; Set up Fondue FooData SET MULTI_USER; Anyone have any idea what might be the reason for this error? I am thinking that some automatic process may start during Phase 3, or are some users trying to log in during that time? I'm not DBA, so I'm guessing at this point, though I believe a user should not be able to log in, while DB is in SINGLE_USER mode. A user is probably not logged in. The system may be working some of the exec sp_who or sp_wh

verilog - endmodule error while compiling -

I'm trying to code a memory test algorithm in Verilog. This code is a part of it. I am trying to write a state machine to read the signal to read. Any help would be appreciated. p> This is my code: module exam (q, clk, reset, data_in, r_s); Input clique; Input reset; Output [0: 2] Q; Output data_in; Output r_s; Reg data_in; reg [0: 2] Q; // address space reg [0: 2] state; // state machine reg r_s; Integer = 0; Reg [0: 1] l = 0; Always start @ (posedge clk or posedge reset or state) start 1 / if (reset) state & lt; = 1; Q & lt; = 0; End and start case (state) 1: // Begin the first four steps (8) Start @ (posedge clk) (start!) Start case (L) 0: Start q & lt; = q; End 1: Start q & lt; = q; End 2: Start q & lt; = q; End 3: Start q & lt; = Q + 1; Did & lt; = 1; And Endes and End @ (Neighage CLK), while (! Work) start case (L) 0: Start L You do not have an" end "between the end of the label with" end-repeating "and"

scalability - How can I test how many connections/active users does a Heroku dyno support for my app? -

Is there a way to know the device or how many connections do before my slow app together with my HQ app (a dino Can manage feedback time or time together? I read about Blitz and New Relics, but this is uncertain how I use it! A quick and easy way to understand how your app is scaled, but the process is usually Launch your target environment (a single dion in your case) Set up monitoring on all possible metrics about which you care about Usually it will include: CPU load, memory usage, I / O operations, database connection coming B. Also, for any relevant application metric Herokee, I recommend using it for a full monitoring set. To run load tests that match the general uses of your application, this does not mean that it is easy to read only about static pages, but rather dynamic operations like user registration, complex API calls , And you feel that anything is relevant. The tools used here really depends on your app's work and how it is made. See where you have

asp.net - Trying to secure all aspx files in a folder secure by IP address -

I would like to save an aspx file to ~ / secure / in a folder, which is specific I can access the aspx files of the IP address folder I added the following web.config file to folder, hoping that the parent web.config : & lt; Adds to configuration & gt; & Lt; system.webServer & gt; & Lt; Security & gt; & Lt; IpSecurity allowUnlisted = "false" & gt; & Lt; Clear /> & Lt; add ipAddress = "192.168.100.1" /> & Lt; add ipAddress = "169.254.0.0" subnetMask = "255.255.0.0" /> & Lt; / IpSecurity & gt; & Lt; / Safety & gt; & Lt; /system.webServer> & Lt; / Configuration & gt; The problem is that when I try to access any aspx pages in the folder, I get this error: This configuration section It can not be used on this path when this section is locked at a parent level. Locking is explicitly set by default (override modestfault = "prohibition") or a

java - Android Studio : " No JVM installation found. Please install a 32-bit JDK " -

Image
I have read a lot about this problem, still can not figure out what is wrong. This is a picture of my settings: Any thoughts? Update: [As you see in the picture, im using java 8 , is it wrong? Your environment variable dialog shows that you have a named JDK_HOME Variable, while the error message is telling you to call it JAVA_HOME . You are also using a version of Java which is not compatible with Android. Instead you need to use Java 6 or 7. The latest Java 7 can be found continuing.

jquery - Do Javascript bindings take up memory while not in use? -

I have a calendar that I have created, and the function is run when click on the calendar on one day. You can go from calendar to month to month, and it generates months as it goes. Since every day is shown on the calendar or not, using an all "days" category is bound to an event, so I'm worried about the number of "binding" in thousands of people. // is generated after a new month, Day TD Off ("Musudown"); TD = $ ("Table Day"); TDS ("Musudown", Teddy Mausedown); When I was learning C # / Monogame, I learned about the tasks that are very quick to update game elements very quickly. Therefore, I was thinking that Javascript works in the same way. Is the JavaScript engine forced to see if it has happened again and again? So some one structure like this: function repeat60timesPerSecond () {if (element1isClicked) {// blah} if (element2isClicked) {// blah} if (element3isClicked) {// blah} } Or is javascript able to actuall

ios - UITableView with Additional Header "Layer" -

Image
I was not sure how to say my title, but what I am trying to do is copy the UTableView multiple header "Layers" essentially, instead of 2D array (class * rows), I break it in various ways in the UIView s in 3D mode (class * sub-squares * rows) Want to sub-squares versus classes Actually, such formats, but in a UITableView: etc. Is it a way to do it relatively easily, or I would have to go through setting logic to find out what kind of handler handler viewForHeader , In the line insertion , heightForHeader , etc. and in trying to handle accordingly? Multiple table views Pseudo header with the archive within the table view The last option is to say that ([Sub-section 'is EqualTo: 1]), then see section header view for sub-section header, however, your subdivision will be in reality in the stream It should not be so bad to do with archive footage or above.

javascript - TypeError: errors.each is not a function -

I am trying to pass data in an aded template like this; Error: Function (user, feedback) {// Create Flash Message with Errors and New Page Reeler for Different FailureAyers = $ .JSOS (Responsible Response Lessons) .Rors ; var error view = new schemma. View. Email message (); $ ("# error_messages"). Attachment (errorView.render ({Errors: Failure Years}) .l); } and has a flash error view; Skimma View. Email message = backbone View. Extension ({Template: JST ['Flash / Error_message'], Render: Function (template data) {this. $ El.html (this tremlettata); Return this;}, < p> While the Flash error is the template; button type = "button" class = "close" data-discarded = "alert "& gt; & lt; i class =" icon lift "> Gt; & lt; / div & gt; & lt; br & gt; & lt; / div & gt;}); What can be the problem? The original javascript objects are not each property. & lt;%

Apple push notification time to live -

Is it possible to indicate the value of time for Apple Push Notification? For example, if they were not pushed in 10 seconds to kill them, or they were ignored when they arrived. Yes, it is possible, if you are using one of the advanced binary formats in which termination Is the property. end date 4 bytes is expressed in a Unix era date second (UTC) Recognizes that the information is no longer valid and can be removed. If this value is zero, then APN stores the notification attempts to notify the notification at least once, to specify that the notification immediately ends and the notification to the APN Must not store at all.

want to generate dynamic grid id for enhancedgrid in dojo -

I want to create a random grid ID for the extended grid, as in a scenario when loading the extended grid page in the IIM dialog The box is showing an error message below: ** error {info: "id == Try to register the widget with the grid, but that ID is already registered", Stack: (...), Message: "id == Try to register widget with grid but this ID is already Is registered "} INFO: Tried to register widget with id == grid but this ID is already registered" ** What page loads But is there any way of dynamically generating IDs? As the page is loading, while creating its grid Thanks in advance. If you want something unique, you can use the dojo's UUID or any other UUID generator You can. If you do not care what the id is going to be (you can use the widget later through another), then you can only leave the id attribute and the Dojo registry can automatically create an id.

yesod - types mismatch on runSqlite and newTVar -

at fpcomplete.com, I was reading a tutorial to use yesod forms. Based on the tutorial, my main task is main = do titems & lt; - Atomically $ newTVar [] liftIO $ warpEnv (link title) What I want to do is start an SQL database in memory, and then put all the data into forms in memory . But even a very simple example does not work: main = runSqlite ": Memory:" $ do - runMigration migrateAll - MichaelId " - $ person insert "Michael" $ 26 - - Michael & Lieutenant; - Michelle Edie - LeftIo $ print Michael Times & lt; - Atomic $ Nutv [] Upper $$ warpEnv (Link Title) I get the error src / Main.hs@39: 13-39: 36 Expected type 'especlarist t (control.monad.loger.logging t (control.monad trance.resources.microsoft.com) is not in real' io (TOE [a0]) 'in a' do 'block In an STMT: tithem & lt; - atomically $ newTVar [] in the second argument of `($) ', that is,` `{titems & lt; - atomically $ newt [[]; liftIO $ warp

html5 - Form validation -

I'm new to web development. I have a form and have to set up verification: Can not be empty and should print it down or on the same page The value of the last name of the input is printed in reverse. When the user has selected the week's favorite day, print the date of the next 6th edition of the day. HTML & lt; Form role = "form" & gt; & Lt; div class = "form-group" & gt; & Lt; Label for = "fName" & gt; First name & lt; / Label & gt; & Lt; Input type = "text" class = "form-control" id = "fName" placeholder = "first name" & gt; & Lt; / Div & gt; & Lt; div class = "form-group" & gt; & Lt; Label = "l name" & gt; Last name & lt; / Label & gt; & Lt; Input type = "text" class = "form-control" id = "lName" placeholder = "last name" & gt; & Lt; / Div &

blocks and variable scope in Ruby -

Russ ऑलसेन के अलौकिक रूबी के p.226 से: सभी चर जो कि करना या { से पहले दिखाई दे रहे हैं, अभी भी एक कोड ब्लॉक के अंदर दिखाई दे रहे हैं अपने लिए यह देखने के लिए, मैं निम्नलिखित कोड चलाया वर्ग Foo def आरंभिक एए = 1 एफ़ डीईएफ़ show_a डालता है "विधि से: एक का मान # {@ a}" उपज अंत अंत बार = Foo.new bar.show_a {ब्लॉक से "डालता है: एक का मान # है {@ ए}" } आउटपुट, मेरे आश्चर्य के लिए, विधि से: 1 का मान 1 ब्लॉक से: मान ए है क्यों इसे @ ब्लॉक में नहीं बना रही है? ठीक पहले bar.show_a {डालता है" ब्लॉक से: एक का मान # {@ a} "} है, एक डालता है कोड में चिपकाएं। यह शून्य भी होगा आप पाएंगे कि उस क्षेत्र में कोई भी @ ए मौजूद नहीं है, क्योंकि @ ए फ़ू वर्ग के एक उदाहरण चर है। तो ब्लॉक ईमानदारी से आसपास की गुंजाइश में @ ए की कमी को दर्शाता है। इसे दूसरे तरीके से स्थापित करने के लिए: एक ब्लॉक उस क्षेत्र पर बंद होता है जहां यह बनाया < / em>, नहीं, जहां यह बुलाया जाता है ।

javascript - Selectize.js custom rendering with static html -

I am using the great selectize.js library to create an attractive selection box with option groups. It's all working, but I am stuck in the fact that I can not use a custom renderer from the example page (email contact) because "item" is not aware of the "email" attribute I know how to do it in javascript Is, but how can I define two attributes in static HTML? In JS, this wish $ ('# id'). Select ({... option: [{name: "Martin", email: "martin@asdf.at"}], ....} I tried the following : & lt; select & gt; option value = "Martin Martin @ ASDF.At" data-name = "Martin" data-email = "Martin @ ASDF .ttt; Martin & lt; / option & gt; & lt; / select & gt; but this is not working ... finally taken from the examples Function: Render: {item: function (item, escape) {return '& lt; div & gt;' + (item.name? '& Lt; span class = "name" & gt; '+

c# - What to do if string sent to SqlCommand.ExecuteNonQuery is too long? -

The string inserted in a table is about 2,070 characters long and I think I get this error when I Send it to ExecuteNonQuery: The Incoming Table Data Stream (TDS) Remote Procedure Call (RPC) protocol stream is incorrect. The RPC name is invalid. If I copy / paste the string from the debugger into SQL Server Management Studio, it will be properly inserted. This is the reason why I think this string is the length. My question: Is there any way to run this insert statement? 77 values, so a stored procedure will need to accept all those standards and the parameters can not always be in the same order. I can always send inserted as a string parameter in a normal process, which executes only dynamic SQL, but I try to avoid completely dynamic SQL. Any help is appreciated. Thank you. this was my error ExecuteNonQuery executable method also includes command type parameter That is what I was not specifying. By default, this text will play as a command-line. Storage Processor

asp.net mvc - Umbraco 7 mvc how to get current page id -

I have a custom controller to send a message, so I get the name of the property area and the nickname = "email" Need to do this, it will be used to send email. This code works below var Id = umbraco.uQuery.GetNodeByUrl ("/ contact-us"); IPublishedContent root = Umbraco.TypedContent (id.Id); Return route. GETProperty ("email", true). Valal.ToString (); However the problem here is that if the page name changes, the URL will change and the code will be broken. How can I change the above code to the current page ID and put it here (???) ;? I think the code should be something like this: IPublishedContent root = Umbraco.TypedContent (???); Return route. GETProperty ("email", true). Valal.ToString (); Any help will be received Your solution is if you If there is more than one 'contact' node, or none, then you do not know who can be. (Actually it is found in the node tree first, but then anyone can change their order ..

javascript - Free scrolling and parallax issue (jQuery Scroll Path + Parallax) -

In a project where I want to create something similar to the famous parallax-driven Mario Cart v. Experience site, which comes with horizontal And vertical scroll (if you have not seen it, then it is :) For scrolling effect, I caught the JQuery scroll path plugin (website here :), and it is free to suit my needs Scrolling The problem occurs when I get the parallax effect Some plug-ins to various'm trying to incorporate these. I tried several plugins (including Stellar.js, jInvertScroll, Parallax.js, Parallax-JS), but none of them is working properly. I think there is some kind of relationship between the custom scroll with the scrolling path plugin and the pulldown plugin is required to work to navigate the navigator. I found a similar situation of searching for Google (i.e., implementing the scroll path with some parallax plugin) but I did not find any in my current situation, and it seems that the scroll path plugin Not created anymore. PS: Sorry for the grammar mis

Not able to find external files -

I am a cheat programmer and having trouble directing my compiler that I use const char to create some image files Find me I c. Kelly is reading through a program, "Programming 2D games", and when I look at my code, she uses this line to find her image file. const char NEBULA_IMAGE [] = "Image \ NasaNebula.jpg"; // Photo source nasaimages.org When I do this I get an error that I did not get the file. However, if I use this line: const char NEBULA_IMAGE [] = "E: / TestProject / Pictures / NASA Nebula JPG."; // photo source NASA does this work Can anyone tell me how can I configure my project so that these files can be found without defining their exact path? I've been looking around for some time, but in fact I do not need it. Thanks Since that path is used on runtime (time compilation Not in), to find and load that file, you need to make sure that the relative path of this type is understood by the current state. You need to make

How to instantiate from a string class name in PHP? -

How to create a new example of return names? Unfortunately, I get this error: Error: Class name should be a valid object or string This is my code: square fu {public function selClass () {return 'home ()'; }} $ Foo = New Foo (); $ Bar = new $ foo- & gt; Cell class (); It looks like you're looking for something like this: Class Home {Public Function Run () {Return 'Hello World'; }} Square fu {public function selClass () {return 'home'; }} $ Foo = New Foo (); $ Bar class = $ foo- & gt; Cell class (); $ Bar = new $ bar class; Revert $ Bar- & gt; Play (); // Hello World Note that the code you specify should be named selClass alone, without brackets, and that after bracket $ BarClass are optional.

java - Table stops responding to clicks after refresh -

मेरे पास निम्न कोड है: पुनर्प्राप्त करें Messages.addMouseListener (नया MouseAdapter () {public शून्य mouseClicked (MouseEvent arg0) {model.resetList (); top.remove (Scrollpane);। फ़ोल्डर = नए getMessages () getMessagesInstance (); folder.initGetMessages ();। मॉडल = नए MessageTableModel () getModelInstance (); तालिका = नई JTable (मॉडल); table.setTableHeader (शून्य); println ( "यहाँ करने के लिए मिल गया"); Scrollpane = नए jScrollPane (टेबल); scrollPane.setPreferredSize (नया आयाम (150,150)); top.add (Scrollpane , BorderLayout.CENTER); तालिका.सेटविजयबल (सत्य); संवाद .सेटविजयबल (सत्य);}}); फ़ोल्डर = नए मिल संदेश ()। GetMessagesInstance (); folder.initGetMessages (); मॉडल = नया संदेशटेबल मॉडेल ()। GetModelInstance (); तालिका = नया JTable (मॉडल); table.setTableHeader (शून्य); scrollPane = नया JScrollPane (तालिका); ScrollPane.setPreferredSize (नया आयाम (150,150)); Top.add (स्क्रॉलपैन, बॉर्डर लेआउट। सीए); । Table.getSelectionModel () addListSelectionListener (नई ListSelectionLi