Posts

Showing posts from March, 2014

java - clientidentifier in hibernate -

I am using a connection manager's spring configuration, where I set up client identifier for each connection Required and can be used in database policies Here I have a problem when more than one request is coming in parallel, it is messing up due to the user name of the connection that I am using. I am just following the link below using the spring jar. One extra thing I am doing is a variable user name in my client identifier class and has a setter and gator method and opens it as a parameter for the stored procedure. My problem occurs when there is an old copy of the user name that has a parallel transaction that the customer identifier Singleton Bean has been injected, which I have passed. Is there a better alternative to setting up a dynamic method to pass the username to the request from this bean and should recover the correct value when retrieving the bean. Any help is appreciated. Create a Utility (Fixed Variable / Math) Class with ThreadLocal Variables. ...

c++ - Change byte in int - casting byte to an integer -

I am streaming data from the server. Server sends different BigAndDan variables, but sends bytes too (representing number is). Accepts one (int length, char * array) of my SocketClient.read overload . I want to pass an integer variable indicator in this function (in unsigned byte) in the get 0-255 value . What I've tried: unsigned int UNSIGNED_BYTE; Socket.read (1, & ((* Four *) and UNSIGNED_BYTE) [0]); // I am changing 1 byte of a variable - C ++ uses little endian / I know that reads function 6, and that is what I got by 1 byte stady :: COAT & lt; & Lt; (Int * (* four *); UNSIGNED_BYTE) [0] to be & lt; & Lt; ") \ N"; // 6 - Correct std :: cout & lt; & Lt; UNSIGNED_BYTE & lt; & Lt; ") \ N"; // 3435973638 - What the hell is that? According to the above, I am changing the wrong part of int . But what else should I change ? My class announcement and implementation: / * declares: * / bool read (int bytes,...

AngularJS - Bootstrapping data into a service on page load -

In an angular application, I'm trying to use a custom service to catch the main data of the app, "Items" However, I want to boot on the data on the initial page load to get it to avoid a different Ajax request on the server. app.factory ('items', function) var itemsService = {}, item = [] item; Service.list = function () {return item;} item itemservice = add and on the backend I am using node.js + expressjs + jade, so I use data In the page I'm injected: ! {JSON.stringify (item)} From the server your bootstrap data is in the global form Keep Javascript Variable

python - Sending multiple commands to a bash shell which must share an environment -

I'm trying to follow this reply: I have more than one command command Needing to execute the same environment is my test case simple: import subprocess CMD = subprocess. Popen (['bash'], staden = subprances .ppe, stadout = subprances .ppe) # First command command = Export greet = hello \ n "cmd.stdin.write (command) cmd.stdin.flush () # To do that the data should be shipped in the hair result results = cmd.stdout.read () print result #, type the second command command = "echo $ greeting world \ n" cmd.stdin.write (command) cmd.stdin .flush () # Make sure that the data results in the hair process = cmd.stdout.read () print result let me know which Hopefully (on the basis of the referenced answer) it is that "Hello world" has been printed. What really happens is that it is hanging on the first cmd.stdout.read () , and never Why can anyone explain cmd.stdout.read () never returns? Notes: It is absolutely essential that I run many ...

How do I properly scope a Ruby lambda? -

मेरे पास यह लैम्ब्डा है: echo_word = lambda do | शब्द | शब्दों को many_words = /\wss(.+)/ 2.times do sleep 1 match = many_words.match (शब्द) डालता है [1] यदि मैच की अंत नींद 1 एंड मैं इसे प्रत्येक को एक ब्लॉक के रूप में देना चाहता हूं, और भविष्य में कई और अधिक ब्लॉक करना चाहता हूं। def is_there_an_echo_in_here * args args.each और echo_word # फेंकता है नाम त्रुटि का अंत है_तोरे_आ_छोआ_इन_हाँ 'हैलो आउट आउट', 'मज़ेदार बार' लेकिन जब मैं my_funky_lambda.rb को इस लैम्ब्डा पद्धति से चलाता हूं, तो मुझे एक नेमअरेर मिलता है। मुझे यकीन नहीं है कि इस लैम्ब्डा के दायरे के साथ क्या हो रहा है, लेकिन मैं इसे is_there_an_echo_in_here से प्राप्त नहीं कर सकता। echo_word ठीक से है स्कैड और प्रयोग किया जाता है यदि मैं इसे निरंतर ECHO_WORD बना देता हूं और इसे इस तरह प्रयोग करता हूं, लेकिन एक अधिक सरल समाधान होना चाहिए। इस परिदृश्य में, एक्सेस करने का सबसे अच्छा तरीका क्या है echo_word अंदर से lamba is_there_an_echo_in_here , उदाहरण के लिए एक मॉड्यूल में इसे लपेट...

.net - Programmatically define system.web/compilation tag on WCF Service -

I am trying to define all my WCF service configurations in code, I get it in the system.servicemodel section and let me Found right. But I want to set the debug attribute to the correct compilation section (this self hosted service): & lt; System.web & gt; & Lt; Compilation debug = "true" strict = "false" clear = "true" target = Fraamework = "4.5" /> & Lt; HttpRuntime targetFramework = "4.5" /> & Lt; /system.web> I have done this already, but I do not know where to add it to work: A slow WebConf as a new system .vb .Configuration.CompilationSection webConf.Debug = True webConf.Strict = False webConf.TargetFramework = "4.5" directly in your startup method

c# - Validation.GetHasError always return true for WPF ValidationRule -

I saw a good solution to check the validity of the group of contrÃ'ls: In my window. Xaml.cs: Private bool ISValid (Dependency Object OBJE) {// dependency object is valid if there is no error in it, // and all your children (which are dependent items ) Are error-free! Validation Gethas Error (OBJ) & amp; Amp; LogicalTreeHelper.GetChildren (obj). OFTIP & lt; DependencyObject & gt; (). All (Children => IsValid (Children)); } My problem is, in my case, even if I get an error, then the VID is always right back. I think a xaml mistake The reason is ... but? My windows XAM is: & lt; window. Resources & gt; & Lt; Commandbinding X: key = "binding" command = "save" execution = "save save" CanExecute = "Save_CanExecute" /> & Lt; /Window.Resources> & Lt; Text box name = "Type textbox" grid. Column = "1" vertical alignment = "center" height = "20" & ...

c - WriteFile to Standard Output fails -

I want to write on a random output, from which can be STD_OUTPUT_FILE I WriteFile , but it does not seem to be written in something. Handle Out H = GetStdHandle (STD_OUTPUT_HANDLE); Listfile (outh, absolute, strollon (ultimate), and written_b, tap); I solved it. There was an error in redirecting the standard output, in which it should be as it should be, it was doing something wrong. Do not know yet. I will update my answer.

ruby on rails - Declaring custom failure action for warden not working -

Currently in my warden manager has been declared a custom failure app. Rails.configuration .middleware.use Warden :: Doing | Manager. Manager.default_strategies: Password Manager. Failure_app = Lambda {| Env | However, for one of my strategies I want to use a different failure action, so I tried to declare custom action in failure. Such as: Certify Duff! Email = consultant ["email"] || Consult ['session'] ['email'] pw = counseling ["password"] || Params ['session'] ['password'] user = user.find_b_mail email if user & amp; Amp; User.authenticate_and_activated (PW) Success! Throw User (: Warden, Accessories = & gt; "Foo" ,: Action = & gt ;: Failure) End End And even in my Controller action : def sign_in @user = warden.authenticate! : Action = & gt; : Failure ... and And here is my failed action: Deaf failure warden.custom_failure! Render: Jason = & gt; {: Success = & gt; Incorrect:...

python - Using a Class method/property outside of an instance variable -

मेरे पास निम्न वर्ग है: वर्ग गोलाकार (ऑब्जेक्ट): def __init __ ( स्वयं, शॉर्टट, लोंगजी): स्वयं। शॉर्टकट = शॉर्टकट self.longax = longg self.alpha = self.longax / self.shortax @property def वॉल्यूम (स्व): रिटर्न (4 * np.pi / 3) * self.shortax * Self.shortax * self.longax बाद में कोड के एक टुकड़े में, मैं निम्नानुसार एक वॉल्यूम फ़ंक्शन का उपयोग करता हूं: x = np.arange (5,8.5, डीएक्स) y = एनपी.रेंज (5,30, डीई) एक्स, वाई = एनपी। मेसेग्रिड (एक्स, वाई) जेड = वॉल्यूम (एक्स, वाई) वॉल फ़ंक्शन ठीक उसी तरह है जो @ प्रॉपर्टी के रूप में मैं अपनी कक्षा में परिभाषित किया है। इस कोड को काम करने के लिए, मुझे क्लास @ प्रॉपर्टी को कॉपी और पेस्ट करना पड़ता है और इसे इस तरह एक नियमित फ़ंक्शन में बदलना पड़ता है: def vol (a, b): वापसी (4 * Np.pi / 3) * a * a * b मुझे हमेशा कहा गया था कि कोड कॉपी करना और चिपकाना यह एक संकेत है कि मैं कुछ गलत कर रहा हूं तो मेरा सवाल यह है, क्या कोई तरीका है कि मैं अपने वर्ग को फिर से डिज़ाइन कर सकता हूं ताकि मैं उस आवृत्ति @ प्रॉपर्टी / पद्धति को कॉल कर सक...

c++ - CPU Percentages found in Perfmon -

I am able to collect performance data from the client's programming data window. This data will be sent to the central server to store information and display graphically. I am using the Windows Display API to collect system data. But now I have a little problem. The server needs to know how I send data relates to each other and I can not find anything useful on the web about the CPU counter. My question is, How to stand in relation Example % time of processor +% idle time = 100% It is not too hard to find out other percentages on the hard work The Interrupt time, Biseshadikarit time or can not find any information on the user's time. For example, how are these standing in relation to the time of the processor, the final goal is to add all these values ​​and finally to get 100%. Thank you in advance and sorry for my English, I hope my question is clear. (in the end "in 15%" paragraph) % Privilege Time +% User Time +% Idle Time = 100% Which...

visual studio 2008 - create simple atl object with connection points Fire methods not being generated -

I created the ATL dll project in Visual Studio 2008 and generated the following category ... template & Lt; Class T & gt; Class CProxy_IAutomateEvents: Public IConnectionPointImpl & LT; T, & amp; __ uuidof (_IAutomateEvents), CComDynamicUnkArray & gt; // This class will be revived by the Warning Wizard. Public: }; I added methods to dispatulate IAutomateEvents in IDL and then compiled. I can not understand how this generates fire_ methods. Which wizard is talking about? I do not want to do so manually because I could become a fashion that has become old or if the run said at some point in place of the magician. I find this option to click on the class and select to add a connection point, but this option does not show help? When you update the event interface, the proxy class has not been automatically updated, so when you Changes are made with, you need to reproduce the proxy class so that new methods appear on it. Replacing the proxy class, fo...

sql - Comparing Supervisor's Salaries -

I am trying to show employees who help at least 25% of their supervisors. So far, I have a code that can show myself to the supervisors, but I'm not sure how to "hold" supervisor salaries: SELECT TOP (100) PERCENT Firstname + '' * Employee, id, jubilate AS [Job title] as the last name, Straw (round (pay / 12, 2), 12, 2) AS [Monthly Salary] from the employable WHERE (in the id ( Negative WHERE from the Selection Supervisor (not Supervisor)) Last name by order, First name - First of all, search for employees and supervisors Emp.id, emp.Salary, Sup.SuperVisor, joining Sup.Salary employeetable emp employeetable emp.supervisor = Sup.id where emp.Salary & gt; = .25 * sup.Salary To eliminate those people where there are supervisors and not emp.id (select different supervisor from employeetable Do)

python - Stripping Commas and Periods -

I am currently trying to input a text file, I separate each word and arranged it in the list. I am here. The current problem I am doing is getting rid of commas and periods from the text file. My code is below: #Process a '* .txt' file. Def process (): name = input ("What is the name of the file that you want to read?") File = open (name, "r") text = [word in the line in line for the word in the line. () .split ()] word = word Location (",", "") word = word Location (".", "") Print (text) I am currently in the output: ['this', 'is', 'The', 'first', 'line', 'key', 'the', 'file. As you can see, the word "file" and "line" have the same one, as you can see, "file" and "row" I am reading the text file: This is the first line of the file. This is the second line. Thanks in advance. These lines h...

javascript infinite loop error in my array -

This is the code I am writing ATM: var array = [3, 6, 2, 56, 32, 5, 89, 32]; Largest = 0; For (var i = 0; i & lt; array.label; i ++) {if (i> largest) {i = largest; }} Console.log (biggest); The largest number in this array should be cautious, but it seems to be stuck in an infinite loop. I think you want for (var I = 0; i & lt; array.label; i ++) {if (array [i] & gt; largest) {largest = array [i]; }} Basically you are saying "if i is greater than 0, then set from i to 0, which I always want for the option between 0 and 1.

javascript - Show and hide rows in a table - things are getting shifted around -

I have some fields that I've put in a table for layout purposes, there is a drop down selection based on selection That shows / hides the rows on the table. My code is working the way I want it in IE9, but every time a row in Chrome and Firefox that was previously hidden is shown, the content of the line is transferred out of the position There are many fields and many selections (which I have sorted in the code below), so I can tell you what I am using a switch statement to show and hide Chrome and Hayrfoks could work like IE9 am so not moving when the display line content? & lt; HTML & gt; & Lt; HEAD & gt; & Lt; / HEAD> & Lt; Body & gt; & Lt; Form ACTION = "#" name = form> & Lt; Select Name = "Type" onchange = "changeTable ()" & gt; & Lt; Option value = "A" & gt; A & lt; / Options & gt; & Lt; Option value = "b" & gt; B & lt; / Options & gt; ...

javascript - hide div menu when clicking somewhere else -

When I click elsewhere on the page, then my goal is to disappear. Below is the code that opens my code and closes when two divs click on themselves. var content_nav = ''; Var content_select = ''; Window.onload = function () {content_nav = document.getElementById ("content_nav"); Content_select = document.getElementById ("content_select"); Content_nav.addEventListener ("click", show_or_hide); } Function show_or_hide () {if (content_select.style.display! = "Block") content_select.style.display = "block"; Else content_select.style.display = "none"; } You should listen to click events on the whole page and hide the menu Was out of content_nav, try it (you may need to zoom it to work, I do not know your HTML): $ (document) .click (function ( E) {If $ (E.target) .closest ('# content_nav') length) $ ('# content_nav'). Hide ();});

php - API credentials are incorrect -

I tried to customize the example with PHP: messages received () PHP_EOL;} ... but I always take it back: I double-checked the API credentials (user, pass and signature) and they are in the form of appearing in the right profile page. I would like to fully X-Paypal-DEVICE-IPADDRESS and X-Paypal-SANDBOX-EMAIL-ADDRESS . I'm not sure about whether I have done something wrong or left some curl options. What can you do in your code? Some unbearably, CURLOPT_HTTPHEADER option no Header = & gt; Add value, only takes a list of stars, each of which should be a full HTTP header. Therefore instead of $ Headers = array ('X-Paypal-Security-USERID' = & gt; PAYPAL_API_USER, ...) you $ headers = array ( 'X-Paypal-SECURITY-USERID:' is required.PAYPAL_API_USER, ...)

regex - How to use Windows Command Line Regular Expressions -

I'm having trouble finding ways to execute regular expressions in the Windows command line. I would like to use regular expressions for many situations, but basically now what I want to do, opens a file with regular expression in my name. Example: s.html It's OK to get started, but start *. What does Html do not work? Thanks Unlike many Unix shells, the Windows Command Line Processor automatically Wildcard does not extend it's responsibility to increase the wildcard of each program because it looks fit. Many programs do not support wildcards only. In those cases, you can always issue the same command on the set of files specified by the wildcard. You can create a for loop. For example for (* .txt) resonates the names of all * .txt files in a directory. Use this to get help for more detailed help on any Windows command ie help regular expression To: findstr , I do not know any underlying Windows commands which supports regular expressions.

actionscript 3 - Fahrenheit to Celsius converter is there a better way? -

Here I have an AS3 fahrenheit for Celsius Converter, I'm thinking that keeping this thing in mind only A better way of completing the function is the dose work for time? & Lt; & Lt; Only when there is 2 decimal places & Gt; & Gt; Function RandomNumber (minimum: number, max: number = 0): number {return mathematical (Math. Random) * (maximum - minimum)) + minutes; } (Var i: int = 0; i & lt; 20; i ++) {var fahrenheit: number = random number (-50, 100) function fahrenheit 2 celsius (fahrenheit): number {var celsius: number = fahrenheit celsius = Fahrenheit - 32 Celsius = Celsius = 1.8 Celsius = Celsius * 10 ^ 2 Celsius = Celsius + .5 Celsius = Celsius / 10 Returns (Celsius)} Trace (Fahrenheit + "Fahrenheit", Fahrenheit 2 Celsius (Fahrenheit) + "Celsius" ,}} Why not: Function Fahrenheit 2 Celsius (Fahrenheit): Number {Var Celsius: number = (5/9) * (Fahrenheit-32); Return Mathematical (Celsius); // & lt; - If you want to round the ...

ASP.Net C# create a cookie that expires at midnight -

I know how to add a cookie day, but I'm unsure how to create a cookie that starts at midnight Thank you in advance for any help using days of ASP.NET and C #. It should: Response Cookies ["cookieslasidiid"]. Expire = Datetime. Today. Adidas (1);

Is it possible to post a Twitter "tweet" from an small embedded system? -

I think I can use some "big" Twitter API or run PHP code. There is not a very small platform based on my ARM M + + bare metal (no OS) and want to post the "tweets" to the device. For example, whatever I see, it means that I should be connecting to SSL. This small processor is probably possible, but not very realistic, oyth and thus no one is working. My orientation is to create my own "service" on my home server, which can accept the username and password and tweets, then take heavy loads to post from everyone embedded device , But it seems that I have a cop. Is it really hard to post to Twitter? [edit: I'm writing the code at very low level] If I were you I would start here:

too much recursion scheme javascript -

I am using a scheme interpreter in JavaScript I'm getting the error "too much Recursive "when I try this code: ;;; Define basic things (map (lambda (fla)) (if (faucet? L) L (opposition (F (car L)) (map f (CDR L)))) (defined filter (lambda (PL) ( (Define (L? L) L (If (P (Car L)) (Cons (Car L) (Filter P (CDR)) ((PPC (CDR L))))) (Define (Lambda (initial) From the sequence) (if the (empty sequence) submit initial (oppose the order) (initial sequence (CDR sequence)))) (define (Lambda (Sequence Sequence) (Lambda (Sequence Sequence) (Operation (Car Sequence) (CDR Sequence)) () (Lambda (L1 L2) (if (empty? L2) L1 (End (opposition (car L2) L1) (CDR Make-List (NFL) (if (= N) L (Make-List (N1) F (Distribution (FN) L)))) Define (Make-List 2 Define - (Lambda (FN1N 2L) (if (> N1N2) L (make-list 2-F (+ N1) N2 (Disp (FN1) L) )))) (MANI-LIST 2 (Lambda (FN) 1 N2) (make-list 2-FN1N 2 analog)) Define identification (Lambda (X) X) (random (lambda (L) (NT (seat (* (random) (length )...

extract similar terms Solr -

I want to remove from a data set, all of which are the same terms and then ask the barrier to deny them Are there. for example. For the index set, how would I tell that BlackBerry and Nokia have two similar words. Or say there are two common things can it be obtained through solr? This is not synonyms but I need to get the obstacle to equality. Definitely you are looking for the exact situation, but you can check it out. Mahout provides support for topic modeling, which will help you group groups from your dataset. A theme model, roughly a hierarchical biiscience model, with each document One possibility connects the possibility distribution to the "subject", for example, in the newswire collection, a document about "sports", such as "baseball", "home run", "player", and steroid use About Word Include May be. Baseball may include "sports", "drugs", and "politics", note that labels "spo...

java - JLabel background image... weird behaviour? -

Image
I have an image in which to create 8x8 grid, so this is the background of the board. I am told that it is possible to use this image Incon and JLABB, which I tried to do and it does not work. This does not allow me to add components In addition to when the program is running and I click on a square - it disappears, Not because it is considered background. Here is the code: for (int i = 0; i Full code: Am I doing something wrong with this background image? Any help would be appreciated, thanks in advance. Are you looking for something like that? import java.awt *. Import javax.swing *; Public class chisboord jepframe (personal jepineal panel; public chisboord () {panel = new zpn (); Panel.setLayout (new grid layout (8, 8, 0, 0)) // Create board // Add for JLLLs ( Int i = 0; i

c - How to change values of a struct passed to a function -

Hello friends I am practicing the structures I have these two functions which gives back the structure and I I copy into local structure. My second function changes those local structure members by entering various entities. Now I have printed the result after calling each function, for my surprise, I think the results printed after both functions are the same. I am unable to understand what is happening here? | Can you tell me please explain to me ?? Thanks! #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; Structure Student {Core Name [30]; Float marks; }; Structure student read_student (); Zero read_student_p (STREET student student 3); Zero print_student (student student 2 structure); Int main () {struct student student1; Student1 = read_student (); Print_student (student1); Read_student_p (student1); Print_student (student1); System ("pause"); Return 0; } // This is my first function structure student read_student () {struct student stude...

sql - sqlite union all optimization -

I have a sqlite DB query that looks something like this: As a group of groups, groups, groups of groups, groups, groups, groups of groups, groups, groups, groups, groups, groups, groups, groups, groups, groups, Where TMS = Group Zone Association selects all the group, originals, destination, weight, rate, GroupCZones group group, where tms = groupZone union Select all groups, destination, weight, Rate, group group as group group, where tms = groupZone Is there a good way to optimize a question like this? I'm trying to create a simple scene that connects these 4 tables with the use of this visual query, taking questions about 13 seconds in the scene. I tried to make indexes for 4 tables but it could not help. When I talk about SQL, I am a simple newbie, I know enough to do simple things, but I am still learning advanced moves. Any signs or information can be helpful. CL told that I should run the EXPLEN QUERY PLAN command. This showed that two out of 4 indexe...

javascript - Disable send button -

I am using this code to check if the value is selected in the Open drop down. $ (document) .ready (function () {$ ("send") Click (function () {if (document.getElementById ('dropdown1'). SelectedIndex == 0) $ ("# Msg_dropdown1") HTML ("required");}); $ ('# dropdown1') .changes (function () {$ ('# msg_dropdown1'). Hide ()})}); Is there a way to disable the SUBMIT button until a value is selected? & lt; Input type = "submit" id = "send" value = "send" class = "gb btn" /> change $ (click "send") (function () { Click $ (# "send") from (function () {

java - How to TestNG tests a @PreAuthorize annotation and its spring EL specified by a spring MVC Controller? -

I defined this method in my Spring MVC controller @PreAuthorize (" @RequestMapping (method = RequestMethod.POST, value = "/ trade / createrequisition") public @ResponseBody void createRequisition (@RequestBody CreateRequisitionRO [] request, @RequestHeader (" Valid Only ") Boolean Valid Only) {.....} Then in my TestGG test, I would like to call this method and make sure PreAuthorize status is verified. . When I call this method in a normal way (do not test), Preauthorize gets verified. If this is possible, how to test this annotation in a testgag test and how to catch an exception, if he throws one? Best Relationship In my opinion you do not have to worry about testing Chapters Exam You should only test your method. Instead, you should write an integration or functional test for this scenario. Since this whole application will be launched, you can test all the circumstances.

php - Use a trigger to stop insert to a table not working MySQL -

Image
इस सवाल का पहले से ही एक उत्तर है: 3 जवाब हाय मैं MySQL ट्रिगरर्स , मैं MySQL 5.5.8 का उपयोग कर रहा हूं, मेरे पास टेबल है चूंकि इनपुट मान गलत है I को देने का प्रयास किया गया क्योंकि MySQL अनुमति नहीं चेक बाधा, मैंने एक इनपुट कोड की जांच करने के लिए TRIGGER का उपयोग किया है एक संदेश और रोकें तालिका में अभिलेख डालें। लेकिन यह मेरे TRIGGER को अनदेखा करता है, तालिका में दर्ज डालें यदि इसमें अमान्य डेटा है तालिका CREATE TABLE pupil_data (PupilID पूर्णांक (10) नहीं NULL AUTO_INCREMENT, PupilForeName varchar (255) नहीं NULL, PupilLastName varchar (255 ) नहीं NULL, लिंग CHAR (1), DateOfBirth दिनांक, PhoneNumber पूर्णांक (10), FamilyID पूर्णांक (10) नहीं NULL, प्राथमिक कुंजी (PupilID), विदेशी कुँजी (FamilyID) दें संदर्भ family_data (FamilyID) अद्यतन CASCADE पर हटा CASCADE पर, अद्वितीय (फोननंबर)) इंजन = इन्सोनेट; ट्रिगर परिसीमक $$ ट्रिगर बनाना `` check_pupil_before_insert` प्रत्येक पंक्ति के लिए pupil_data` पर डालने से पहले CHAR_LENGTH अगर शुरू ( NEW.Dat...

sql - Trying to search a field with or without dashes in a query? -

I have a table (table.foo) where I'm trying to search for a specific area. I have an MS Access Form that uses SQL Query to output results. I have a user who wants to search for this field If I use a simple select query SELECT foo from table WHERE foo LIKE '% xyz% ' I will get a string with XI, but if the user searches for X-Ways, they will not get any record where table.fu =' XIZE ' / Code> Return the results regardless of the presence of a dash in the search string How do I configure a query? I know that I can copy table.fu columns and create a table. You can strip the dash from the Foo-Search column and the new field, but it seems that this place will be useless useless and plus it will need to maintain a second column in the database. Here you can go: Select foo from the table OUTPUT: x-Yz

c++ - Calling derived class function without marking it as virtual from a class in middle in multi-level inheritance -

I think this may be a repetitive question, but I tried to read almost all related posts and none of them Not even specific was what I was looking for. OK, so I understand that unless virtual is marked, you can not call a function in a class derived from a base class pointer. Like reference program 1, this B class can not call 'Kaunasclass () if no virtual is marked. # include & lt; Iostream & gt; using namespace std; Class A {public: const char * Which square () {return "A";}}; Class B: Public A {Public: const char * Which square () {return "B";}}; Int main () {B b; A and A = B; Cout & lt; & Lt; "In class" & lt; & Lt; A.Which class (); Return 0; } If I mark it as a virtual one, then it tells the work of the most derived class from the base class. Now suppose that if I connect B to the second class C (as shown in program 2), and if class B is not marked as virtual, then how the base reference (& A) Call Class C? A...

java - How to figure out that 95 pecentile of time calls came back within certain milliseconds -

I am working on a project that I should profile on our REST service . And after that figure, how much is our code of 90 counterfeit or 95 percent ? Which means that the histogram of my call has been made under 90% time or 95% percent time - between 1 and 2 ms 0 Came back between 3 and 4 ms back between 5 and 8 ms back between 9 and 16 ms back between 17 and 32 ms 2205 came back between 33 and 64 ms 141 and 65 128 ms returned between 50 to more than 128 ms From the subsequent histogram it means, 2205 65 and 128 ms Income back in between 33 and returned between 64 ms , 141 calls . So now I'm trying to figure out how it is 90 percentak or 95 percent ? This means that 90 percent of the time how many milliseconds call back? I have a map for a histogram, if we can not understand this prediction from the histogram above, then we can also use this map from this map only , I am making the above histogram - {213 = 1, 114 = 2, 185 = 1, 131 = 1, 40 = 145, 6...

How to create a new R workspace -

I tried to reset my R via RM Comrade but now it does not recognize the CSV import code. I know that the code is right because I left my laptop and started it. However, now my ray on my desktop is completely useless and I do not want it to be so. I have removed and re-installed several times and it still refuses to work any suggestions? The default saved workspace file is likely to be corruption which is the name . Rdata . In both Windows and Maccode, this file is invisible (aka a dot-file or system-file) by default. Default history file, . History is also susceptible to corruption. If this is your problem, then you need to use the system function from the command line to remove corrupted files and then restart R.

git - is there anything like .gitonlytrackfiles? -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब हैलो वहाँ कुछ भी है .gitignore लेकिन इसके विपरीत के साथ? समस्या मैं हमेशा जैसे git add file1.png git add file2.php फाइलें जोड़ती है , और इसी तरह। कुछ ऐसा .gittrack बहुत मदद करेगा file1.png file2.php फ़ोल्डर / आदि। आदि धन्यवाद आप ऐसा कर सकते हैं .gitignore फ़ाइल जो डिफ़ॉल्ट रूप से, सभी फाइलों को वाइल्डकार्ड * वर्ण का उपयोग करते हुए अनदेखा करती है, लेकिन उन पथों के अपवाद हैं जिन्हें आप ट्रैक करना चाहते हैं (अपवाद ! चरित्र)। उदाहरण के लिए, .gitignore में आपके पास हो सकता है: *! File1.png! File2.png! फ़ोल्डर / etcetc

Layout in background is getting intracted when tap on foreground layout Android -

I am designing a tab based Android application and using fragmentation. There are some edits in my first piece layout and after navigating to another piece, which is not any editing technology, virtual keypad is going to appear on the tap. And after a few hours of testing, I found it because of its editing caption which is in the previous section. How to stop it? Use it in ur activity where you do not want a virtual keyboard activity = this.getActivity (); InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService (Activity. INPUT_METHOD_SERVICE); InputMethod Manager (PHP)

c# - summary of the gridview -

मुझे पाद लेख पर ग्रिडव्यू सारांश की आवश्यकता है ... संरक्षित शून्य ग्रिडव्यू 1_रॉडेटाबाउंड (ऑब्जेक्ट प्रेषक, GridViewRowEventArgs ई) {दशमलव totalPrice = 0M; Int totalItems = 0; अगर (ई.रॉ.रॉ टाइप करें == डेटा कंट्रोलरव टाईप.डाटारो) {लेबले एलएलएलपीआरिस = (लेबल) ई.रो.फंडकंट्रोल ("एलएलएलपीआरआईसीईसी"); दशमलव मूल्य = दशमलव। पर्स (lblPrice.Text); कुल मूल्य + = मूल्य; कुल आइटम = 1; } अगर (ई.रॉ.रॉ टाइप करें == डेटा कंट्रोलरव टाईप। फूटर) {लेबल एलएलबीओएलएलपीआरसीई = (लेबल) ई। आरओ। फ़ंड कंट्रोल ("एलएलएलटोटलपेरस"); LblTotalPrice.Text = totalPrice.ToString (); }} लेकिन इसका काम नहीं कर रहा है कोई भी विचार? कुल मूल्य और कुल घोषित करें इस तरह ग्लोबेल वैरिएबल के रूप में दशमलव कुलप्रिस = 0 एम; Int totalItems = 0; संरक्षित शून्य GridView1_RowDataBound (ऑब्जेक्ट प्रेषक, GridViewRowEventArgs ई) {...}

c - What happens to pointers after function call -

What happens after you have made a function call from an indicative composition point to another indicator that memory is allocated is? I had asked a question before, which inspires me to ask this question: For example: struct example {// variable and pointers strip clip * next; } * Head and then I have the datatype indicator of the string in the function: struct example * newNode = malloc (sizeof (struct example)) ; And in the same function, I link the first node (head) to another node (new node): head-> next = newNode; What is linking / pointing after the function is exited? I'm not sure that he understands, but when you add a new node at the end of your link list, then you have to go through the linklist in the first place where it ends (next indicator = zero). For example: zero insert_at_end () {// We have an indicator CP that runs through the linked list, initially CP-> We just create a new node, // the straight example CP and NewOn get moloc...

google drive realtime api - How to reproduce UserRecoverableAuthIOException on Android device? -

When I debug with the Google Drive API, I found this problem: The first time When I call service.about (). (). Execute in my application (); It will be UserRecoverableAuthIOException and start my code call. But after confirming the Oath dialog , it will never be shown again I want to debug the entire auth routine, but athlete How to erase the data and take exception to it again? Just use the app you use with an app like "Managed app" setting in the Google Drive webpage, Can unconnect the app.

text - HTML listing product properties -

I would like to list product properties like the following properties: property 1: items Property 2: Item Property 3: Item Property 4432: Item Note that the "item" starts like an indent. I know that it can be accomplished by using tables and divs, though I think a novel can be a little bit me, does anyone tell me how it usually applies ? Thanks in advance! A definition list would be appropriate here: & lt; Dl & gt; & Lt; DT & gt; Property & lt; / Dt & gt; & Lt; Dd & gt; Related items & lt; / Dd> & Lt; Dt & gt; Property 2 & lt; / Dt & gt; & Lt; Dd & gt; Second related item & lt; / Dd> & Lt; / DL & gt; To display that list, as you show in your question, use the following CSS: dl dt {float: left ; Margins: 0 10px 0 0; } DL DD + DT, DL DD + DD {Clear: Left} DL DD + DD {Float: None} See JSfield here: Alternatively A simple noodle list creates cleaner code, though a lit...

c# - Constructor over-injection with types focused to collect data -

I know that this argument is well here, especially But in other questions too; But to be suspicious is to stay suspicious. I have typed the words which collects data and unit or business objects for questions The focus is on principles. So, if I have one type that depends on it (or even with more fields): public class animal {private redone name string; Private redone alias string; Private readonly visceral weight; Private readonly ext. Atwithhers: Private redone color main collar; Private Redoni Bull Malé; Private Redoni Bull is grateful; Public animal (string name, string nickname, int weight, intuitive extractor, color is main color, bull male, boole is absent) {// left omitted} public string name {get {this return.name; }} Left left Is this a case of constructor over-injection ? There are suggestions to keep the book low, the number of dependencies, 2 to 4 (if I'm not mistaken). Is it possible for this type of anti-pattern not applicable? IIRC,...

django - Not able to expose 'auth_user_groups' table in Tastypie UserResource -

I am struggling to know that my UserResource Tastypie modelResource is a way to unselect the 'auth_user_groups' table. I am able to receive groups and users, but it is not certain how the user is assigned within my user resources. Here are model resons I: GroupResource (ModelResource): Class Meta: queryset = Group.objects.all () always_return_data = True resource_name = 'groups' detail_allowed_methods = ['get'] List_allowed_methods = {'Get'] filtering = {'username': ALL,} authentication = ApiKeyAuthentication () class UserResource (ModelResource): class meta: queryset = User.objects.all () always_return_data = true resource_name = 'user' excludes = ['Active', 'is_staff', 'is_superuser'] authorization = user authorization () detail_allowed_methods = ['go', 'post', 'put', 'delete', 'patch'] list_allowed_methods = ['get', ' Post filtering = {'username...

android - Can't set video quality for media recorder -

I can not set the camcoder profile in my code private zero initRecoreder () { File directory = new file (environment. Gatestile store directory (.) GetPath () + "/ registrator / video /"); Recorder.setProfile (CamcorderProfile.get (CamcorderProfile.QUALITY_HIGH)); Recorder.setOutputFormat (MediaRecorder.OutputFormat.THREE_GPP); Recorder Setmexation (900000); // 15 minutes if (! Dir.exists ()) {dir.mkdirs (); } Recorder.setOutputFile (dir.getAbsolutePath () + "video.3gp"); } Private void Tayarrekha () (Recorder Ksetpradrshnpradrshn (holder. Getsrffs ()) {try Recorderkprepare ();} catch (IllegalStateException e) {EkprintStackTrace (); end ();} catch (IOException e ) {EkprintStackTrace (); end ();}} @ override public Whoid successful Chenjed (Srfl holder holder Int format Int width, Inti height) {} @ override Public wide Silset (holder holder) {Tayarrekorder (Surface) ; InitRecoreder ();} @ Override Public Zero Surface Blast (SurfaceHall Fear holder) {if recordi...

web applications - JavaScript ExtJS - Access Handling with Privileges -

I'm planning a webapp to use ExtJs to create my frontend and ASP webservice for backend. Communication through Json. Although there is a big question in my mind, I have different user controls available for different types of people. Just like a Superior can see this button and so on. My privileges have been applied in my own backend, but what is the best way to see which buttons I should display and what should not be seen? I can not send a request for only one control which can be used by everyone I do not think it will be Fosi: D .. If you have experience with this issue, please tell me! I have worked more than once on this issue, I personally have roles in the customer-side I also want to implement some kind of manager who has the current role and privilege that comes with that role. In your opinion, you can simply ask the manager that the current user is authorized to see special controls. I normally have all the different roles in any type of enum-like structur...

Viewing Dynamic Flash website in ipad -

Hello people I really have to face a major inquiry. I have created a dynamic AS3 Flash website that loads images and text from an XML file. Everything is fine, it works fine. In addition it dies completely in the iPad / iPhone. My client did not have any information about it. And now she is going ballistic about the significance of the IPAD in today's world etc. I know that IPAD does not support Flash. In addition to the OBVS solution to recreate the entire website in HTMF etc, I just wanted to know that someone has tried something else that can work in some way. I have heard of the following, I would like to know if none of these is understood: 1 Flash, like the Photon, Skyfire, Puffin Flash, Use: These bros are any good! Comments !! 2 Flash Professional tried to change Flash in HTML5 using Swift Extension for CS5, but the output was: (1) Google SWIFY Accident. Ignore the XMLlist, .... The list of errors is endless. (2) Use Flash Professional CS6 / Toolkit fo...

Pessimistic locking worst case -

We are using JavaEE and creating an appellation, where in the worst case, the message queue robbed the message Come in the form of a single user. So we are considering pessimistic, select theory for locking the theory and solve our problems in fisrt trials. But we are afraid of Deadlock. Classical people: User X Lock A, the user locks the YB lock But there are a lot of suspicious: system crash, network work, ... and so on. The database is not locking the system, not knowing the reason for it. We will use modern databases such as: Oracle, MS SQL and Postgrescill. What do we want to know, the pessimistic locking used in production and the prospects of the candidates? Thanks in advance! The worst problem I have seen with pessimistic locking is the mandatory bottleneck that the database is created In other words, your code is stopping deadlock at the app level (as you say in your post), the display becomes problem - drops throughput because only 1 user at a time One can up...

zend framework - zend_session goes wrong after get the second product -

im a launcher. And when I was roaming with zend_session I had a problem like this. Everything works fine with one item but more than one item stops adding more items or enhances the mail account. Here is my code // $$$$ intQuantity = $ it-> Get value from & gt; _request-> GetPost ('intensity'); $ IntSize = $ this- & gt; _request-> GetPost ('intSize'); $ IntProductId = $ this-> _request-> GetParam ('productId'); // Call Model Cart $ cart model = new Default_Model_cart (); // input value matched in function value matched row / * * array * (* [0] = & gt; array * (* [product_id] => 7 * [product_price] => 1600000 * [product_image_url_50] Itam Output Array = & gt; 50_nike-janoski-new-1363618892.jpg * [product_size_title] => 6.5 *) *) * * * * / $ cartArrays = $ cartModel- & gt; Idea Itam ($ intProductId, $ intQuantity, $ intSize); // Add quantity in the cart. Array / * * array * (* [0] = & gt; Hey * (* [product...

php - Get mysql table field names in ZF2 -

I want to store the CSV data in mysql table dynamically. According to my CSV column header, I want to add data in my column to mysql table. For this, I need to get all the table field names from the Zend Framework Controller or Model. I have tried with it: ** $ metadata = new zend \ db \ metadata \ metadata ($ adapter); $ Table = $ Metadata- & gt; GetTable ($ tableName); $ Table & gt; GetColumns (); However, this error shows: Fatal error: class 'import' model \ zend \ db \ Metadata \ metadata not found. How do I get all mysql table field names using Zend Framework 2 ? Please help me. You have to use a backslash before the right of the right: $ Metadata = new \ zend \ db \ metadata \ metadata ($ adapter);

java - How do you recursively replace occurences of a string in an array -

Then consider a class A with two string variables "name" and "value" Class B is a variable that is set set is a set that looks like this A.name = "$ var1" value = "x + 10" gt; 2 "A .name =" $ var2 "Evolution =" 11 + y% 10 == 0 "A name =" $ var3 "= values ​​$" var1 "and" $ Var2 " What I need to do is evaluate these expressions. I am using jexl for this to be me through the set and repeat these variable names with their respective Need to change with the values. In this case, the object named $ var3 is named "x + 10" 2 & amp; 11; + Y% 10 == 0 " How do I do this? 2 make the Hashmap, translated and toTranslate . You parse your set. For example, if you see any value, if the value is any number in the $ element ( $ sign in), then you can enter in your translated HashMap keys $ Element . If it's there, then you can search in your transl...

osx - Undefined symbols for architecture x86_64: _MSImageSelectionIsDoneNotification -

Image
I am trying to solve this problem, but no solution can be found. I is an MSCropImageView defined extern NSString * const MSImageSelectionIsDoneNotification; In your header, and NSString * const MSImageSelectionIsDoneNotification = @ "MSApp.MSImageSelectionIsDoneNotification"; In MSCropImageView.m But when I call [[NSNotificationCenter defaultCenter] addObserver: Self Selector: @selector (Selection command :) Name: MSImageSelectionIsDoneNotification object: self.imageView]; I get an error from the other file The undefined symbols for architecture x86_64 include the header file in I'v that defines the symbol. This is not just a header file, my guess is that MSCropImageView.m is actually in your built-in app Not included. In other words, go to the list of files for your project and then open the "File Inspector" view (which is on the right). For me, it looks like this: Be sure that the rotating checkbox is checked for your buil...

css - Why padding is not working in Chrome -

Image
यह IE8 में ठीक काम कर रहा है लेकिन क्रोम में काम नहीं कर रहा है। क्रिप्या मेरि सहायता करे। मैं निम्नलिखित कोड का उपयोग कर रहा हूं: .sortpostdrpdwn {height: 4px; चौड़ाई: 8px; सही नाव; पैडिंग: 15px 8px 5px 6px; } कृपया विस्तार से निर्दिष्ट करें, यह हमेशा व्यक्तियों के साथ आपके उत्तर पर सवाल करने के लिए स्वतंत्र नहीं है अपर्याप्त कोड क्षमा करें, यदि अशिष्टतापूर्ण है। पैडिंग में डिवेल प्रभाव के अंदर होगा जो 8px & amp; 4 पीएक्स आकार 15 8 5 6 के साथ होगा, जिससे कुल ऊंचाई बढ़ जाएगी: 24 चौड़ाई: 22 पिक्सल, इसी तरह, इस तरह से यह IE में ठीक काम कर रहा था। धन्यवाद,

opencv - Macbeth ColorChecker for WPF -

Is there a C # code or WPF tool for Macbeth Color Searcher? That I can use as a reference to my project Macduff is project on Gitob - unfortunately it is not really strong: if the chart is not in front It runs incorrectly in my experiments. The license is good though - it can be a good place to build ... Kego Hirakawa has posted a math code to install color checkers. Code is available, license is slightly more restrictive (non-commercial), not yet tested

java - Junit Positive and Negative Testing -

I have an assignment in which I need to make some tests for my code, we will have to use junit tests, so I Have decided to test positive and negative of their methods. For example, to get names from an ArrayList, I have been tested positive and negative: Postiv: Public Zero TestGate Name () {Entrance entry = 1 new entry ("Susan Holmes", "122 Harringdale", "Workingington," "CA14 2GH"); AssertEquals ("Susan Holmes", entry1.getName ()); Negative: Public Zero testGetNameNegative () {Entry entry 1 = New entry ("Susan Holmes", "122 Harringdale", "Workington" , "CA14 2GH"); AssertFalse (entry1.getName () == "Alison"); I am not sure about this exam: Public Zero Test Entry () {Entry Entry = 1 New Entry ("Susan Holmes" , "122 Harringdale", "Workingington", "CA14 2GH"); AssertNotNull (ENTRY1); } Is there any negative examination on this? ...

asp.net mvc - Enumeration .Except from jQuery Parameter -

I am trying to create a function that takes a string that matches an object within an antum is. The following syntax works fine, but instead of using the parameters passed in the function, I want to be able to change ChannelType.EndUser , is it possible? Here's my job: Close the function (channel) {@ {var channel = Enum.GetValues ​​(typeof (ChannelType)) .Cast & lt; ChannelType & gt; (). Except (New ChannelType [] {ChannelType.EndUser}); } @forq (channel in channel type channel type) {@: var button name = "# canal_" + '@ (channel type.tostring))' + "_Update"; @: If (buttonname! = 'Cancel_EndUser_Update') {@: $ (buttonname). Click ();}}} You do not have to do this in your actual C # code You will be able to exclude that code and leave , then your foreach , make sure that the ChannelType is not passed in the object. Something like this: function closeEdit (channel) {@ {var channels = Enum.GetValues ​​(typeof (ChannelTy...

java - Retrieving SQL Date Datatype from Table with lucene search -

I am using Lucene 3,6,2 as a search engine in my application which is Java derby DB and Swing interface uses Netbeans IDE For now, I'm able to retrieve all the information about the query as a string datatype. I present the code below. // Create some index directory index = new RAM directory (); Standard Analyst Analyzer = New Standard Analyzer (Milan Version); IndexWriterConfig IWConfig = new index configuration (version LUCENE_36, analyzer); Index indicator IW = new index (index, IWCCF); Try {Con = DriverManager.getConnection (Host, UN, UPS); Statement stmt = con.createStatement (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); String sql = "download from app. APPRAGRISHI"; Rs = stmt.executeQuery (SQL); Rs.beforeFirst (); While (rsnext ()) {doc = new document (); Doc.add (new field ("id", rsgetstring ("id"), field.store.Yes, field.index.nlised)); Doc.add (new field ("subject", rsgetstring ("SUBJECT"), field. ...

solr - Using CloudSolrServer as SolrJ client -

My question is that when we are using CloudSolrServer, we specify a zkHost address and LBHttpSolrServer. Now cloud Solersverov extends information about living and dead nodes from zkHost and makes requests. But what if zkHost is specified as a logic then it goes down itself? I think CloudSolrServer should accept a zkHost, as is the case with the LBHPsplore server, which accepts a single server URL. Any thoughts? Thanks According to this: You can pass a comma-delimited list Junk addresses in your artists like: zk1: 2181, zk2: 2181, zk3: 2181, etc.

service - using android:process=":remote" recreates android Application object -

I am using the AIDL service in my app. I also want to run this one more process, so in the manifest Use the android: process = ": remote" in the service announcement. My problem is that when the : remote process begins, it apparently rebuilds the application object. I really do not do this because I override the application object and too many client stuff to be OnCreate () method but I still have to stay in the same APK with the customer. Want service code for Can I get it? Whether the application object is always rebuilt when the new process begins? Appreciate your help to run? What value does the user get to offset the extra RAM, CPU, and battery cost? Very few applications require more than one process. My problem is that when: 'Remote' process starts, then apparently the application re-creates the object Of course I'm not really with it because I override the application object in the 'okt' method and call many c...

hadoop - HBase Stand alone mode Functions -

जब मैं अकेले मोड खड़े हो में शुरू- hbase.sh निष्पादित करता हूं (वितरित या छद्म में वितरित नहीं मोड) शुरू करने वाला क्षेत्र सर्वर, चिड़ियाघर रक्षक, स्वामी को छोड़कर मास्टर बैक अप नहीं करेगा (क्योंकि यह एचडीएफएस फ़ाइल सिस्टम नहीं है जो यह क्षेत्र सर्वर चला सकता है)। क्या HBase के वसूली भाग में यह मोड प्रभाव होगा? उदाहरण के लिए, वीएम को दुर्घटनाग्रस्त करते हुए HBase डेटा अभी भी memstore में है और VM और HBase को पुनरारंभ करना मैंने उपरोक्त प्रयोग की कोशिश की है HBase पुनर्प्राप्त करने में सक्षम नहीं है। कारण क्या होगा?

.net - Alternatives to a windows service for polling application -

I have a C # program that needs to query the database table and call for a webservice at the polling interval is. I know that I could wrap it as a service of windows, though I am thinking that there are no other tools and techniques where I can call my exe on a program without creating a service I am You can start the scheduled task ( taskschd.msc ) You can schedule your program to run using, which is basically the Windows version of cron . You can also run your program at startup and sit in the tray, while sleeping, wait for your timer to expire.

jquery - chart widget using SVG rendering -

I was looking for a widget that creates JavaScript charts, which uses SVG rendering. I found something like www.jqwidgets.com but the licensed version is not free. I found another one called Yui Charts with BSD license which I can use professionally, but it is using Flash. Do any chart widgets that uses SVG rendering and free for commercial use? I believe that the superb library is a subproduct of Raffa, which is essential for you. This is MIT license, uses Javascript and SVG, and there is nothing for the parent library graph, but with vector graphics - with the benefit on canvas approaches that it receives the DOM event . Dependent / unified with J, but in reality it is not needed in practice.