Tuesday, 15 June 2010

javascript - Datepicker onSelect to format new date range -


I have 2 date pictures, one date from one and the other is a date date. I can successfully highlight the range before date (to date) from Showday (), but I need it when new values ​​are selected. There is either a way to turn on the on-stile statement:

1) Trigger before showaway again? Or

2) Find all the dates of the new category and apply them to the CSS class? Showe before

 : Function (date) {if (date> = initialFromDate & Amp; amp; & amp; date & lt; = initialToDate) {return [true], 'UI -personal-date ',' ']; } And {return [true, '', '']; }}, On Selection: Function (Dattext, OBJ) {var Sedet = New Date (date text); Var toDate = $ ("Date.iv2") datepicker ('getDate'); ** Get personalized dates? If formatting for CSS class or individualDate ** (different & gt; = fromDate and amp; personalized date & litter; = toDate),  

< Img src = "https: // i.stack.imgur.com/P21is.png" alt = "image gives CSS and HTML generated for datepicker">

" post-text "itemprop =" text ">

I have done this successfully with a datepicker for a date and a date For the sake of, so I modified it for a date picture. This code is:

  $ (function () {var today = new date (); var this yuan = (today) .getFullYear (); var sadeet = '1/1 / 2000 '// This is the starting date from the date, which is set date date to Date date from the datepicker range var to date =' 1/7/2000 '// Date Date start datepicker .... : Function (date) {// if the date range is in (date & gt; = date to & amp; date & lt; = toDate) {return [true, 'ui-individual-date', '']; / / CSS class is applied to the category} Other {returns [true, '', ''];}}, select: f The system (datetext, OBJ) sets the new range loaded on the // // fresh call, assumes that the last click is (".", "Refresh"); $ (". ClassDp2") datepicker ("Refresh ");},  

Every time you refresh, the ShowDay function is called new with date and toddrate range from H. Variables being functional and modify them You can apply highlighting with CSS on every click.


PostgreSQL SELECT last array key from text[] array column -


How do I make the last key from the SELECT array column?

  from the Select Table; + ---- + --------------- + | ID | Col_array | + ---- + --------------- + | 1 | {"A"} | + ---- + --------------- + | 2 | {"One", "b", "c"}. + ---- + --------------- + | 3 | {"B", "D", "F"}. The desired results for + ---- + --------------- +  

col_array will be: a, c , F.

use

  choose col_array [array_upper (col_array) 1)] from my_table  

matlab - How to change the value of a random subset of elements in a matrix without using a loop? -


I am currently trying to select a subset of 0 in very large metrics (about 400x300 elements) 1. I am able to do this, but it is necessary to use a loop in it, where in each instance it selects the next value in a random length vector. In other words, 50% of the 0 in the matrix were randomly selected, change in one-to-one-time, and 1:

  z = 1; For z = 1: (.5 * Number oopharyzes) A ​​(zeropodia (rpnmopheroza (z), 1), zoropation (rpnmopherio (z), 2)) = 1; Z = z + 1; Where 'A' is the matrix, 'zyopis' matrix has 2-column wide matrix with conditions of 0 (if you want "coordinate"), and 'rpnumberofzeros' one The randperm vector is the number of zero in the matrix from 1.  

For example, for z = 20, the code might be something like this:

A (3557, 2684) = 1;

... so that the 0 that appears in this position in 0 is now 1.

It does this loop thousands of times because the .5 * number is very large number, it essentially takes a long time, so my question can be done without a loop? Or at least, the way the processing takes less time / processing?

As I said, only one thing that needs to be done is changed to 1% of the 50% (or whatever ratio) of 0% is a completely random selection.

Thanks in advance for help, and I know that I can clean anything! I am new here, so apologies in advance if I have made a wrong way.

This is very easy. I want to present you with my friend sub2ind You can take the row and column coordinates of a matrix and convert them to the linear column-major index so that you can convert one of the matrix to the same call With the use of many values. As such, you want the equivalent code:

 % // First use values ​​in rpnumberofzeroes vals = rpnumberofzeroes (1: 0.5 * numberofzeroes, :); % // Now, we use columns of these to set rows and columns, we want to reach% // one lines = jeopardy (vals (:, 1), 1); Cols = zeroposition (Wall (:, 2), 2); Get% // linear index through sub-left ind 1 = all 2 id (size (A), rows, columns); % // Now set this position in 1A (IND 1) = 1;  

The first statement gets synchronized stored in rpnumberofzeroes in the first part of your matrix. The first column is row coordinates, the second column is the column coordinates. Note that in your code, you want to use the value in zeroposition to access the locations located in A , such as the correct zeroposition To know the rows and columns, remove the rows and columns related to rpnumberofzeroes . Once we do this, we will remove these new lines and columns from zeroposition and index A . sub2ind requires three inputs - the size of the matrix that you are trying to access ... in our case, this is the a , line coordinates and column coordinates . Output, column is a set of major indices, which is counted for each row and column pair.

The last piece of the puzzle is to use it in A in the index and sets it to 1 position.


excel - Chart colors change when copying worksheet to a new workbook -


I have an Excel 2010 workbook that has a wide variety of charts used in our reporting, in a new workbook VBA code is written to copy selected worksheets:

  XLMaster.Sheets (x). After that copy: = XLClinic.Sheets (XLClinic.Sheets.Count)  

However, when I do this, the color changes in the chart.

If I open the worksheet 'manually' with the XLMaster, clicking on the worksheet name and

It will be very easy to re-apply the colors to a chart before it is copied, and you will be able to travel through the RGB algorithm is not needed. Select a chart and run it:

  ActiveChart.SeriesCollection srs.Format.Fill.Forecolor.RGB = srs.Format.Fill.Forecolor for each SRS in the form of all the Reckler ChargeFilm CRS .RGB next final sub  

It keeps the same color, but unknowingly unaware of it, which is completely confused color theme system launched in Office 2007. The above work on the top, column, and area chart, which is the format. Line and scatter chart lines and markers also use background and foreground colors.


css - How do I get my Rails app background image to show up correctly? -


I have a page in the railway app that I want to present the background image (I call it "glow" Jpg " ), And are struggling to work it properly. (Other pages have a simple pattern background that looks fine.):

  Body {background-image: url ("in my application.css.scss file 

pixel_we Ave.png ");}

.

I have searched the top and best of all to get the glow.jpg For the top of the page (about exact size / location about a jumbotron - I'm also using Bootstrap, BTW), with the bottom part of the image cutoff. background is tried: Image- Url ('glow.jpg') , background image: url ('glow.jpg') , and some other. Path property / image is

Recently I separated the CSS for this homepage (Glow.JPG BG will be there) in my file, homepages.css.scss here:

and here is html.erb:

  & lt;% content_for (title," concert | home ")% & gt; & Lt; Div class = "intro-header" & gt; & Lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "col-lg-12" & gt; & Lt; Div class = "intro-message" & gt; & Lt; H1 & gt; Welcome home & lt; / H1> & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt;              

Another Note; I have an application.html.erb file which partially presents the header on every page (which I also want on the homepage), which is just a navbar. I wonder if it can be quite conflicting?

Edit: Rail 4.1.5. And here's a screenshot. Actually, I want a background pattern that can be replaced with any other image, which is to fill the entire pages under the Naubar. Enter image details here

Thanks for your help! Please tell me if I can provide more information. Thanks for the tip from @MATD, I was able to work on the basis of the answer - my name was

I now have the "Homepage" controller:

DIF index @ homepage_clash = true end

and application.html.erb:

< P> & lt; Body class = "& lt;% = @homepage_class? 'Homepage':"%> " & Gt;

I have defined the body.homepage in the application.css.scss file and added it to the body tag of the page on which I want the background.


html - How can I ensure that an icon will be on the same line as text, and not on a new line? -


संपादित करें:

मुझे सेटिंग

< pre> <कोड> अवधि {अधिकतम-चौड़ाई: 140px; प्रदर्शन क्षेत्र; फ्लोट: बाइट}

लेकिन अब स्पैन में पाठ ली के नीचे ओवरलैप कर रहा है; यह ऊँचाई सही ढंग से स्थापित नहीं कर रहा है


मेरे पास एक विस्तार योग्य मेनू है जिसमें पाठ के बगल में एक प्लस / शून्य चिह्न है यह ऐसा दिखता है:

  & Lt; li वर्ग = "श्रेणी विस्तारणीय" & gt; & Lt; span & gt; कार्यक्रम और क्लिनिक & lt; / span & gt; & Lt; a href = "जावास्क्रिप्ट: शून्य (0)" वर्ग = "शो-द्वितीय-स्तर टॉगल" शैली = "प्रदर्शन: इनलाइन;" & gt; & Lt; i वर्ग = "एफए-प्लस" & gt; & lt; / i & gt; & Lt; / a & gt; & Lt; a href = "जावास्क्रिप्ट: शून्य (0)" वर्ग = "छिपा-द्वितीय-स्तर टॉगल" शैली = "प्रदर्शन: कोई नहीं;" & gt; & Lt; i वर्ग = "एफए-माइनस" & gt; & lt; / i & gt; & Lt; / a & gt; & Lt; / li & gt;  

मैं यह सुनिश्चित करना चाहता हूं कि विस्तार आइकन हमेशा एक ही पंक्ति पर पाठ के रूप में होता है, क्योंकि यह अपनी लाइन पर होने के लिए खराब दिखता है। यदि "क्लिनिक" को ठीक से अगली पंक्ति तक ले जाना है, लेकिन मैं यह कैसे सुनिश्चित कर सकता हूं कि आइकन पाठ के नीचे स्वयं को समाप्त नहीं करता?

आप छवि पूर्ण ली और मार्जिन के साथ स्थान को संरक्षित कर सकते हैं।

< Div class = "snippet" data-lang = "js" डेटा-छुपिए = "गलत">

 < कोड> .category {सीमा: 1px ठोस # 000000; स्थिति: रिश्तेदार; चौड़ाई: 140px; }। श्रेणी & gt; अवधि {मार्जिन-दाएं: 30px; प्रदर्शन क्षेत्र; }। श्रेणी एक {डिस्प्ले: ब्लॉक; चौड़ाई: 30px; ऊंचाई: 30px; प्रदर्शन क्षेत्र; स्थिति: पूर्ण; शीर्ष: 0; नीचे: 0; सही: 0; मार्जिन: ऑटो; } .category i.fa {background: url ('https://www.gravatar.com/avatar/4ee102e4ae1b9ab69077f7c471365f69?s=128&d=identicon&r=PG&f=1'); चौड़ाई: 30px; ऊंचाई: 30px; प्रदर्शन क्षेत्र; }  
  & lt; li वर्ग = "श्रेणी विस्तारणीय" & gt; & Lt; span & gt; कार्यक्रम और क्लिनिक & lt; / span & gt; & Lt; a href = "जावास्क्रिप्ट: शून्य (0)" वर्ग = "शो-द्वितीय-स्तर टॉगल" & gt; & Lt; i वर्ग = "एफए-प्लस" & gt; & lt; / i & gt; & Lt; / a & gt; & Lt; a href = "जावास्क्रिप्ट: शून्य (0)" वर्ग = "छिपा-द्वितीय-स्तर टॉगल" शैली = "प्रदर्शन: कोई नहीं;" & gt; & Lt; i वर्ग = "एफए-माइनस" & gt; & lt; / i & gt; & Lt; / a & gt; & Lt; / li & gt; & Lt; li वर्ग = "श्रेणी विस्तारणीय" & gt; & Lt; span & gt; बहुत लंबे टेक्स्ट के साथ टेस्ट 2 ... और एक तीसरी पंक्ति & lt; / span & gt; & Lt; a href = "जावास्क्रिप्ट: शून्य (0)" वर्ग = "शो-द्वितीय-स्तर टॉगल" & gt; & Lt; i वर्ग = "एफए-प्लस" & gt; & lt; / i & gt; & Lt; / a & gt; & Lt; a href = "जावास्क्रिप्ट: शून्य (0)" वर्ग = "छिपा-द्वितीय-स्तर टॉगल" शैली = "प्रदर्शन: कोई नहीं;" & gt; & Lt; i वर्ग = "एफए-माइनस" & gt; & lt; / i & gt; & Lt; / a & gt; & Lt; / li & gt;  


iteration - MATLAB While loop for convergence -


I am trying to write a loop request for a while, as if my value converts when it stops. When the new value is only 1% different from the last, I want the code to be closed. Here are the interactive relationships:

change

And here's my Code thus far:

 % values ​​clear all CLC TT4 = 3250 pi_c = 25 alpha = 0.5 M_0 = 1.6 h = 40 t0 = 390.01 a_0 = 967.68 g_c = 1.4 g_t = 1.3 CPC = 0.24 Cpt = 0.296 h_pr = 18400 M_6 = 0.4 pi_Mmax = 0.96 eta_m = 0.99 eta_b = 0.99 table% 6.2 pi_dmax = 0.96 e_c = .9 e_f = .89 pi_b = 0.95 eta_b = 0.999 e_t = 0.89 pi_n = 0.97 eta_m = 0.995% calculation R_c = ((g_c-1) / g_c) * CPC R_t = ((g_t -1) / g_t) * Cpt V_0 = a_0 * M_0 tao_r = 1 + ((g_c-1) / g_c) * M_0 ^ 2 pi_r = tao_r ^ (g_c / (g_c -1)) eta_r = 1-0.075 * (M_0-1) ^ 1.35 pi_d = pi_dmax * eta_r tao_l = (CPT * TT4) / (CPC * T0) tao _c = pi_c ^ ((g_c-1) / (g_c * e_c)) eta_c = (pi_c ^ ((g_c-1) / g_c) -1) / (tao_c-1) f = (tao_l-tao_r * tao_c) / ((eta_b * h_pr) / (CPC * T0) -tao_l)% recycle tao_f tao_f = (tao_r * (alpha (tao_c -1)) + eta_m * (1 + f) * tao_l) / (tao_r * alpha + Eta_m * (1 + f) * Tao_l / ((pi_c * pi_b) ^ ((G_t-1) * e_t / g_t))) tao_fi = (tao_r * (alpha (tao_c -1)) + eta_m * (1 + f) * tao_l) / ((tao_r * alpha + eta_m * (1 + f) * Tao_l / ((Pi_c * Pi_b). ^ ((G_t -1) * ET / Ji_ti))) * (Tao_f). (* (GCM * (Ji_ti -1) * * I_ti I_f) / Ji_ti * ( GC-1)) - 1)) while ABS (Tao_F) - (Tao_fi)) .2 tao_ff = (tao_r * (alpha (tao_c-1)) + eta_m * (1 + f) * tao_l) / ((tao_r * alpha + eta_m * (1 + f) * tao_l / ((pi_c * pi_b) . ^ ((G_T-1) * E_T / G_T) * * (Tao_F). ^ ((((* (G_c * (g_t-1) * e_t * e_f) / g_t * (g_c-1)) - 1)) end  

I'm new to matlab and coding in general, I know that my code is stuck in the infinite loop but I'm not sure why.

Any help appreciated!


matlab - Sort a matrix with another matrix -


Suppose my matrix is ​​ A and I sort the rows of this matrix. How can the same sequence be repeated on the matrix B (the same course of course)?

Example

  A = RAND (3,4); [Val indus] = sort (a, 2); B = RAND (3,4);  

It is best that I came with

  m = size (A). , 1); B = B (BSXFone (@ plus, (IND-1) * M, (1: M) '));  

Out of curiosity, any options?

Update: Profile at 2008a (XP):

n = N

  0.048524 1.4632 1.4791 1.195 1.0662 1.108 1.0082 0.96335 0.93155 0.90532 0.88976  

n = 2m

  0.63202 1.3029 1.1112 1.0501 0.94703 0.92847 0.90411 0.8849 0.8667 0.92098 0.85569  

It just shows that the loops are probably no more thanks for the MATLAB programmer (probably).

A clear way to do this is to use a loop

  A = RAND (3,4); B = RAND (3,4); [SortedA, ind] = Sort (A, 2); For R = 1: Size (A, 1) B (R, :) = B (R, Ind, R, :)); Finally, the loop version is fast for small (& lt; 12 rows) and large (> ~ 700 rows) class array (r2010a, OS X). The more columns are relative to the rows, the loop performance is better.  

Here is the code that I'm hacking quickly for testing:

  siz = 10: 100: 1010; TT = zero (100,2, length (sis)); For s = siz k = 1: 100a = rand (s, 1 * s); B = RAND (S, 1 * S); [SortedA, ind] = Sort (A, 2); Tic; For R = 1: Size (A, 1) B (R, :) = B (R, Ind, R, :)); End, TT (K, 1, S == Siez) = Toss; Tic; I = size (A, 1); B = B (BSXFON (@ plus, (IND-1) * M, (1: M). ')); Tt (k, 2, s == siz) = toc; End of end M = Squeeze (Mean (TT, 1)); For square array  
  ans = 0.7149 2.1508 1.2203 1.4684 1.2339 1.1855 1.0212 1.0201 0.8770 0.8584m (1, :). 0.8445  

Similar to the rows of two rows (number of rows)

  Code> ans = 0.8431 1.2874 1.3550 1.1311 0.9 979 0.9 921 0.8263 0.7697 0.6856 0.7004 0.7314  

java - The need to catch IOExceptions & Exceptions -


Should anyone ever catch IOException / exception if a program is reading in a txt file using scanner object, But does a FileNotFoundException generate?

Should such additional codes be unnecessary or significant?

  Import java.io.File; Import java.io.phileNotFoundException; Import java.util.Scanner; Public class test scanner {public trial (scanner) {readFile ("dummy test"); } Public Zero ReadFile (string filepath) {file file = new file (file path); Scanner scanner = null; {Scanner = New Scanner (File) Try; While (scanner.hasNext ()) {string line = scanner.nxtain (); If (line.matches ("^. + @ Yahoo \\.com? (? Uk)? $")) System.out.println (line); }} Hold (FileNotFoundException e) {System.out.println ("error: can not load" + filepath); E.printStackTrace (); } Finally {if (scanner! = Null) scanner.clos (); My rule of thumb is to go wide with the exception of catching exceptions (to catch exceptions)}}}  

Wrench "What About Runtime Upspace" in this approach allows a school runtime to bubble exception. But what do I think is that in the circumstances where I am catching exceptions, I want them all ... and sometimes throbbles (I was burned because of the exception not catching and throttling).

Some examples:

  Public zero myMethod () throws IOException, FileNotFoundException ();  

In a situation where I do not want to bubble exception (all of them need to deal with)

  try {myMethod (); Hold (exception e) {// handle it}  

In a situation where I'm holding an exception and I have to do something different for FileNotFound.

  try {MyMethod (); Catch (filenoutfound exception fee) {// handle file not found} Catch (exception E) {// handle it}  

In a situation where I am giving the exception to the bubbles because I know That's some very cool exception handling code in the series that is handling it and I want to avoid signing exceptions several times:

  myMethod ();  

In a situation where I left the fileNotFound except for the exception bubble.

  try {myMethod (); Catch (FileNotFoundException fe) {// handle file not found}  

Is it better to avoid inlnine SQL with dapper? -


I've considered using dapper , but I still want to use inline SQL Do not like the idea of. Does anyone have any thoughts on stored procedures , so in this situation that there is a problem with the query, it will not require recompilation , but only one stored procedure Is there any option in a database such as keeping all SQL queries in its class library?

Dapper supports both options, and there is no opinion on this topic.

Your question tells you that deploying your codebase is difficult if it is a client-side code, then it may mean that for server-side code, the app is re-deployed instead of replacing an archived procedure. It is usually easy to do - ideally click through something like 1 TeamKitty. Of course, your stored procedures should also have also process / deployment control.

Keeping SQL in the class library will not buy you too much: you still need to be deployed Get the change Of course, this UI (Etc.) code will present your data in different assemblies -Major code may be able to understand, but this is a local architecture decision.


sqlite : update record using value in another table -


does not support the table of joining in sqlite. I have a stock table:
Price (TEXT) Price (TEXT) PriceInUSD (for updating) - For example, Apple "USD 100" Faucet / Orange "HKD 50" null

and second exchange rate table - Currency rate - E.g. USD 1
HKD 0.13

How do I set PriceInUSD (substr (value, 5) * exchangeRate.Rate)

Post-text "itemprop =" text ">

You can use a sub query

  update stock set INUSD = (select substrost (stock, prix, 5) * Rate from the exchange where the substroke (stock .press, 1,3) = currency)  

c# - Symbol Load Information menu not displaying for Newtonsoft -


When I am moving through the example C # code from the Atasak API, then in the code (in Visual Studio) The line reads it reads

returns Jobbject.Parse (body);

At this point, V. S. It tries to make sure that, whether PDB files or source code files, I am confused even after reading so many posts here Sources not found I know that in Visual Studio almost There is a detailed post about the source not found except that none of them solves my issues. I am using the 2013 Community Edition. I am stepping through this link via the C # sample source code

I am providing hyperlinks to TechSmith Jing SWF video. It shows all related images, such as my directory path for bin and debug and how they hold PDB files for both JSON.NET as well as executables.

The following is a picture of my solution tree that is VS , Which also eliminates the information of the Profitors window for the newtonsoft DLL.

VS was reportedly seeking Jobsec C source code because the parsing method is throwing back When trying to parse the HTML, a JsonReaderException I'm asking why the ATTASK API call returns HTML instead of JSON.


sql - Report Next Date in Sequence -


Our database keeps track of only 5 billing payments each month. How can I write a selected statement on each payment received date,

Which are sequentially seen and if a date is filed for going to the next payment, etc. ... then finally come with an empty field and report that date?

I have tried the following case statement but I think I am on the wrong track; Select db.identifier, case when recdate1 is not empty, then recdate1 recdate2 is not empty then recdate2 is when recdate3 is not zero, again recdate3 end

DB

You should use COALESCE function for this COALESCE function takes the number of input fields, And the first tap returns the input field from left to right. In other words, if you index the recdate field from recdate 1 to recdate 1, then this one is the first one Apas who will not tap.

Here is the code to get it. As a SEC, there is a link to the COALESCE function for more information as SELECT db.identifier, COALESCE (recdate1, recdate2, recdate3, recdate4, recdate5)

Hope it helps.


How to import the AltBeacon library inside my Android Studio 1.0 empty project -


Trying to use the AltBeacon Monitoring example code to monitor your contact contract beacons as described here

I am

I have put a library with an .aar extension dedicated to Android studios in my PC but could not find a way to import it into my Android studio?

H2> First

Please visit the original project page.

Second

Add it to your build, from the link provided by it, as it also tells you:

Steps 1. Get the Library and copy it to your project

Download AAR file

Create a / Libs Directory within your project and copy the AAR file there. .

Step 2. Configure your app's build.gradle file

Add a "flatDir" entry to your repository like this:

  repository {mavenCentral () flatDir {dirs 'libs'}}  

Add Library as a dependency such as AAR:

  Dependencies {compile 'org.altbeacon: android-beacon-library: 2 + @ aar'}  

Source:


php - Android Array with JSON results -


I would like to update a different thread which I have created with some code that I have written which is not working . I am trying to parse my information, after sending the post request, [[user from: "Andrew"], {"user": "Jimmy"}]

I like those users to pick, and add them to the list view. Here is my code for sending HTTP code and then there is my code also to try parsing it and keeping it in the adapter.

  HTTP client httpClient = new DefaultHttpClient (); Http post http post = new html post (htmlUrl); & Lt; NameValuePair & gt; NameValuePair = New ArrayList & lt; NameValuePair & gt; (); NameValuePair.add (New BasicNameValuePair ("user name", "brock")); {Try HttpPost.setEntity (New UrlEncodedFormEntity (nameValuePair)); } Hold (unsupported encoding exception e) {e.printStackTrace (); } Try {HttpResponse response = httpClient.execute (httpPost); // Writing feedback to log logs log ("HTPP response:", response.toString ()); } Catch (ClientProtocolException E) {// log e Write an exception for the exception. } Hold (IOException e) {// log e Write an exception for the exception. } Try {JSONObject Pending User = New JSONObject ("$ myArray"); } Hold (JasonX Express E) {e.printStackTrace (); } // Read the reply to the string {BufferedReader Reader = New BufferedReader (New InputStreamRadder ("UTF-8"), 8); Stringbilder sb = new stringbiller (); String line = null; While ((line = reader. Readline ())! = Null () {sb.append (row + "\ n"); }                 is close(); Result = sb.toString (); } Hold (exception e) {return tap; } // convert to string converter {jsonObject = new JSONObject (results); } Hold (JSOXECTION E) {return tap; } Public Zero getJsonResult (JSONObject Pending Request) {pendingRequests = jsonObject; }  

This is where I try to get it and put it on my list

  HTTPSendPost postSender = new HTTPSendPost (); Post sender.setup (500, 050, "tiest", htmlUrl); PostSender.execute (); JSONObject Pending Request = New JSONObject (); PostSender.getJsonResult (pendingRequests); Try (for {int i = 0; i & lt; pending spaces} length (); i ++) {JSONArray userUrray = pendingRequests.getJSONArray ("fromUser"); Pending vacancies Arrayed (I, from user. String ()); }} Hold (JasonX Express E) {e.printStackTrace (); } Arrayadapter & lt; String & gt; Adapter = new array adapter & lt; String & gt; (This, R. L. activity_french, pending vacancies array); PendingRequestsListView.setAdapter (adapter);  

When I try my app, I do not get any results on the list view, any help would be appreciated. Sorry for repost, but now I have a lot of information and code. Next time I will ask a question without the code that I have tried.

Try to use - it's a creator who accepts a JSON string, Can access. For example:

  myJsonString = "{\" Andrew \ ", \" Jimmy \ "}"; JSONArray array = new JSONArray (myJsonString); (Int i = 0; i & lt; arrays.lampon (); i ++) {log. V ("json", array.optString (i)); // You can also use this Log.v ("json", array.getString (i)); // or this, but you have to force yourself Log.v ("Jason", array.get (i) .toString ()); }  

javascript - Calculator with math.round with 2 decimal -


I have to put a calculator online for the client and I have to face a problem with math. Here is my code:

  function calc (type) {if (type == "terre") {var lo = parseFloat (document.getElementById ("terre_lo"). Value); Var la = parseFloat (document.getElementById ("terre_la"). Value); Var pr = parseFloat (document.getElementById ("terre_pr") value); Var res = lo * la * (PR / 12) / 27; Document.getElementById ("terre_re"). Internal HTML = MathRed (race * 100) / 100; Tmp = monastery Field (race * 100) / 100; Paillis = Math Plain ((res * 30) / 100) + res; If (TMP <(res * 0.30) / 100) {paillis; } Document.getElementById ("res_paillis"). InnerHTML = policies; }} & Lt; / Script & gt;  

Everything is working fine but I need to do math for 30% result and round with 2 decimals. In this way 1.32 my problem is that it revolves evenly with the small values ​​as the first result. I have to calculate the fourth (foot) x length (feet) x depth (inches), this will keep me 30% of this result. With the small value it is the same round as the result. I'm not a programmer, I'm a web designer, so I'm broad;)

You can see the calculator page here

Working code:

  function calc (type) {if (type == "terre") {var lo = parseFloat (document getElementById ("terre_lo") value). Var la = parseFloat (document.getElementById ("terre_la"). Value); Var pr = parseFloat (document.getElementById ("terre_pr") value); Var res = lo * la * (PR / 12) / 27; Document.getElementById ("terre_re"). Internal HTML = MathRed (race * 100) / 100; Tmp = monastery Field (race * 100) / 100; Paillis = (res * 30) / 100 + res; If (TMP <(res * 0.30) / 100) {paillis; } Document.getElementById ("res_paillis"). InnerHTML = Mutt Field (Pillis * 100) / 100;  

elasticsearch - Getting search result from elastic4s in scala -


I have the following code and I am trying to get all hits from elasticsearch. If I try to write without the query part, then I get only 10 results when I call .getHits

  val resultFuture = client.execute {search / query in "query / report output" {termQuery ("MainReportID", reportId.toString)}} .ait  

Another issue is that the query part does not really work and I do not get anything. Here is a composition of my elastic search: "Hit": {"Total": 266, "Max_core": 1, "Hit": [{"_index": "Report", "_type": "Report Optup", "_id" "Cooper Clubman", "DayInstock": "10", "Stock Number": "AUWJBAuKTetnUx12_a97", "_source": {"displayName": "Classic BMW / Mini", "Model" "Q432A", "Mile": "81093", "interior colorful": "black", "year": "200 9", "trim level": "", "main riverport": "4d9e4fd3- 7fdf-41c8-8c29-45c5acaf78b1 "," Model ":" "," External "," External "," External Color ":" Pepper White "," Win ":" WMWML33509TX35944 "," Make ":" Mini " "T "K2E1"}}, ":" A "," External code code ":" 850 "," interior collar ":" gray / carbon black "," interior caller code " / Div>

You can return a number of results by setting limits on it, for example:

  Search in the "index" range 100  

But the default limit of 10 is not set by elastic4s, but by this you can not change it and return all results by default .


Describe function by hmisc in R -


Anyone here who knows "information" has given the output given below to everyone.

R Code:

& gt; C & lt; -C (1,2,3,4)> Description (c) cn unique unknown ** info ** MI 3.05.10 .25 .50 .75 200 0 100 1 50.5 5.95 10.90 25.75 50.50 75.25.990 9.95 90.10 95.05

From:

For numerical variables, the description is an IIT, which is a relative information measurement Using relative efficiency of proportional odds / Wilcoxon test, there is no relation between the relative variable of the same test on that variable. The information relates to how constant the variable is, and the relationships are less harmful and there are inherent value. The formula for information is less than a fraction of cubes of relative frequencies relative to zero, a reduced square of reciprocal of sample size. The least information is from a highly variable variable due to the extreme binary variables. Information is made at two decimal places.


java - How to generate HTML report streams with JasperReports? -


मैं PDF रिपोर्ट को JasperReports के साथ निम्न प्रकार से बना रहा हूँ: < कोड> JasperExportManager.exportReportToPdf (jasperPrint)

अब मैं एक HTML टेक्स्ट स्ट्रीम जेनरेट करना चाहूंगा मैं उस जनित फ़ाइल को स्थानीय डिस्क में लिखने के बिना कैसे प्राप्त कर सकता हूं?

मैं जेनरेट किए गए HTML को ईमेल बॉडी के रूप में भेजना चाहता हूं।

JasperExportManager का उपयोग करने के बजाय, आप JRHtmlExporter का उपयोग कर सकते हैं इस तरह से कुछ प्रयास करें:

  बाइटअरेऑटपुटस्ट्रीम बाओस = नया बाइटअरेऑनपुटस्ट्रीम (); जेआरएचएमएलएक्सपोरर एक्सप्लोरर = नया जेआरएचएमएलएक्सपोर्टर (); Exporter.setExporterInput (नया SimpleExporterInput (yourJasperPrint)); Exporter.setExporterOutput (नया SimpleOutputStreamExporterOutput (बाओ)); exporter.exportReport ();   

के बाद exportReport कहा जाता है, बाइटअरेऑनपुटस्ट्रीम में आपका HTML होगा।


Getting multiple values in Java via Scanner input -


I am trying to figure out how many entries can be read from the scanner class in Java. I need to get the names of every person I enter and then compare the total amount of each entry.

This is my code:

  string [] salespersons = new string [3]; System.out.println ("To compare sales, please enter at least two sales, but not more than four,"); // user scanner input = use scanner class to read input from new scanner (System.in); String line = input NXtine (); String [] values ​​= line.split (","); (For string: value) {salespersons = value; }  

For some reasons, I can not get the values ​​that are kept in the vendors. (I'm really new in java, sorry if my question does not understand a lot).

You can just type:

  salespersons = line.split (",");  

You do not have to allocate it to intermediate values, and then loop on it to provide to sellers. But if you want to do this, you should index it for loop:

for (int i = 0; i

php - Laravel get route name from given URL -


In Laravel, we can get the root name from the current URL via:

 < Code> root:: CurrentRouteName ()  

But how can we get the root name from a given given URL?

Thank you.

Laravel 5.2

Code> App ('router') - & gt; GetRoutes () - & gt; Match (app ('request') -> Create ('/ qqq / post / 68 / u1')) - & gt; GetName ()

This is my root name like slug.posts.show

You can do this for , Delete or Delete or Delete Code> app ('router') - & gt; GetRoutes () - & gt; Match (app ('request') -> Create ('/ qqq / posts / 68 / u1', 'POST')) - & gt; GetName () // Reference https: //github.com/symfony/http-foundation/blob/master/Request.php#L309

In addition to the app (' ('(Qqq / posts / 68 / u1', 'POST')) - Illuminate this lighting \ root + example where you can access many useful public methods like getAction , getValidators etc. For more information, check the source.


grep - Pulling out lines which contain certain words exactly once -


I am trying to draw a line in a tab delimited text file that contains all user-specified words correctly once (Does the sequence 'does not matter).

For example, I need to find the line that includes' ca_ ',' cs_ ',' xvi '' and 'js_' properly once.

Enter image details here

Do I have to grep Can i use

Is there a possible solution? Are you trying to do this?

  var rawString = 'CA_1234567 CA_R345335 CS_I 8788765 CA_3456783 CS_0986887 CS_scaffolding2 CA_scaffolding3'; Var valArr = rawString.split (''); // Note: In the actual code, CA, CA, etc., put in an array and runs again CAItems = $ .grep (valArr, function (val) {if (val.startsWith ('CA')) {return val ;}}); Var CSItems = $ .grep (valArr, function (val) {if (val.startsWith ('CS')) {return val;}}); $ ('# CAValuesTxt') Text (CAItems.join ('')) $ ('# CSValuesTxt'). Text (CSItems.join ('')) String.prototype.startsWith = function (prefix) {Return IndexOf (prefix) === 0; }  
  & lt; Script src = "https://ajax.googleapis.com/ajax/libs/JQuery/1.11.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Label & gt; Values ​​starting with CA: & lt; / Labels & gt; & Lt; Label id = 'CAValuesTxt' & gt; & Lt; / Labels & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Label & gt; Values ​​start with CS: & lt; / Label & gt; & Lt; Label id = 'CSValuesTxt' & gt; & Lt; / Label & gt;  

I hope it helps!


javascript - window on focus misbehave in mozilla -


Using jquery $ (window) I'm trying to call the function while focusing on windows or tabs. Focus function.

The problem is in Mozilla, which is being called repeated or endless, whereas its behavior in Chrome generally occurs (the function is called once only when the window is centered).

  $ (document) .ready (function () {$ (window). Focus (function () {location.reload ();});});  

Has anyone got an alternative solution for Mozilla? Thanks, and sorry for bad english

I'm using Mozilla version 36.0.1


Using a while loop to print out a power table in Python -


I am trying to create a program that will print a table of powers called to provide the user base , And then the maximum exponent. Then the program will print a table of powers based on this information. For example, if the user is typed in 2 for the base, and 4 for the maximum exponent, then the program will start with the first 2 ^ 1, then 2 ^ 2, then 2 ^ 3, and finally 2 ^ 4. I do not understand that what I have written is not working. I debug, and saw that my base value really grows by 1 and I do not know why.

>
main

ev = (input ("Enter the base number:")) max = eval (input ("Enter maximum exponent")) counter = 1 while counter & Lt; = Max: base = base ^ counter counter = counter + 1 print (base) main ()

base change while while loop you should keep base = base ^ counter , but you should keep it that you want. Your solution is:

  while the counter & lt; = Max: res = base ** counter counter + = 1 print (res)  

Note: Your program is currently printing with the input of 2 , 4 is 2 ^ 1 , 2 ^ 2 , 4 ^ 3 , 64 ^ 4


jsp - Apache Tiles in Spring mvc project -


I am absolutely new to Tiles and novice at Basant MVC. I want to add tiles view to my current configuration. Please help

So far I have done this but it is not working:

  @EnableWebMvc @ Configuration @ ComponentScan ({"com.kharoud"}) Public class MvcConfiguraion Expands WebMvcConfigurerAdapter {Personal Performance Monitor Interceptor Display Interactor; @ Override public empty configured default serving handling (default servicer handler configurator conferencer) {configurer.enable (); } @ Override Public Blank Conference Content Annotation (Content Navigational Configuration Conferencer) {configurer.favorPathExtension (true); Configurer.useJaf (wrong); Configurer.ignoreAcceptHeader (wrong); Configure.mediaType ("html", media type. TEXT_HTML); Configure.mediaType ("json", media type. APIICATION_JSON); Configurer.defaultContentType (MediaType.TEXT_HTML); }; Public Zero addInteceptors (Interceptor Registry Registry) {registory.addInterceptor (performanceInteceptor); // registory.add Interactive (Change Locale Interceptor ()); } @bean (name = "messsource") public reloadable resourcebendmemsource reloadable resources bondsource () {reloadable resourcesBandlemJessource messagesSource = new reloadable rhesusbandsmessage source (); MessageSource.setBasenames ("classpath: message_eng"); MessageSource.setDefaultEncoding ("UTF-8"); Return messages source; } @ Bean Public View Resolver Content Conversation Vydorolver (Content Navigation Manager Manager) {List & lt; ViewResolver & gt; Reserves = New Arrestist & lt; ViewResolver & gt; (); InternalResourceViewResolver r1 = New InternalResourceViewResolver (); R1.setPrefix ("/ web-INF / views /"); R1.setSuffix ("jsp."); R1.setViewClass (JstlView.class); Resolvers.add (r1); JsonViewResolver r2 = new JsonViewResolver (); Resolvers.add (r2); Tiles Visual Roller R3 = View New Tile Rolver (); Resolvers.add (R3); ContentNegotiatingViewResolver Resolver = New ContentNotivingWeaverSolar (); Resolver.setViewResolvers (resolver); Resolver.setContentNegotiationManager (manager); Return resolver; } @bean public tile configurable tile configurator () {string [] definitions = new string [] {"web-INF / tiles / tiles.exml"}; Tiles Configure Tile Configure = New Tile Configurator (); TilesConfigurer.setDefinitions (Definitions); Return tile configurator; }}  

My Tiles.xml Just Basic Settings

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE Tile-Definitions Public "- // Apache Software Foundation // DTI Tile Configuration 3.0 / N" "http://tiles.apache.org/dtds/tiles-config_3_0.dtd"> & Lt; Tiles-Definitions & gt; & Lt; Definition name = "myapp.homepage" template = "/ layout.jsp" & gt; & Lt; Put-attribute name = "title" value = "Tiles Tutorial Homepage" /> & Lt; Put-attribute name = "header" value = "/ header.jsp" /> & Lt; Put-attribute name = "menu" value = "" /> & Lt; Put-attribute name = "body" value = "" / & gt; & Lt; Put-attribute name = "footer" value = "" /> & Lt; / Definition & gt; & Lt; / Tile-definitions & gt;  

layout.jp copy paste tile ORG

  & lt;% @ taglib uri = "http://tiles.apache.org/tags-tiles "Prefix =" tiles "%> & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; & Lt; Tiles: getAsString name = "title" /> & Lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; Td colspan = "2" & gt; & Lt; Tiles: insertAttribute name = "header" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Tiles: insertAttribute name = "menu" /> & Lt; / TD & gt; & Lt; TD & gt; & Lt; Tiles: insertAttribute name = "body" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td colspan = "2" & gt; & Lt; Tiles: insertAttribute name = "footer" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

You need to configure tile / plug in the listener.

View

and


javascript - My base64 concatenated string has = characters. How to get rid of them -


How do I add base 64 strings to get rid of "=" characters?

I sent a byte stream [] of data from the servlet as an HTTP response, and I want to open the PDF viewer in the client side. But, I can not see it due to these extra characters

I tried to merge with + =, along with being included, but I have the = character at the end of each substring. / P>

It is possible that if there is no way to insert the wire without the last character. Standard basis-64 encoding three bytes (3 * 8 bits) 4 characters (4 * 6 bit)

Encoded in If the number of bytes in the original data is not divisible by 3, then the remaining 1 is 1 and 1 is added to = , then 2 = characters are added if left 2 was.

Now, unfortunately you can not add two base-64 encoded strings if the padding character = is the first end - you have to decode both, join the binary string Do *, and then-encode, otherwise the later part will be squeezed out and all the bytes in the second part will be incorrectly decoded.

[*] This is not strictly necessary to re-code the first part, but adapted for it is also not worthwhile.


c# - Exe working if executing from VS2012 but not working when hosted on IIS -


I am executing this code from the MVC website. If I run this code from VS 2012 IIS Express it is working but if I host the website on the IIS server, it does not work. I tried debugging but some error code is coming in if I impersonate my ID and pass my ID but all it is worthless, I need it.

Code:

  System.Diagnostics.Process proc = new System.Diagnostics.Process (); Four [] chr = password TocharArray (); System.Security.SecureString pwd = New System.Security.SecureString (); Foreign Currency (CR in Four C) {pwd.AppendChar (C); } Proc.StartInfo.FileName = Path to WZZip.exe //proc.StartInfo.Arguments = -ys20480 pathtosplit LandingZone; Proc.start.info.UserName = Username; // config file proc.StartInfo.Password = pwd; //config file comes from proc.StartInfo.Domain = Domain; //config file comes from proc.StartInfo.RedirectStandardError = true; Proc.StartInfo.RedirectStandardOutput = True; Proc.StartInfo.UseShellExecute = false; Bool Results = proc.Start ();  

On running an exchanges through IIS, you should start with a few questions:

A) Should I bypass the security built into the security of IIS server and Windows system?

B) If you allow executables to use different paths in the OS or IIS, then who else can use it, namely "Hawker"? C) Changes to Windows and IIS servers have been changed to protect the system from "attack" and to limit the surface area for the exploiters. Security monitoring is being done for the system & amp; IIS server?

If you can correct the risk for A-C, then you can "work" around restrictions.

If you understand the risks, tools to help with some issues.

You have limitations for standard users and permissions and rights for Windows Vista Windows 7 Windows 2008

Who can do this? / P>

You can also search for "Changes in Windows Distortion Security" (Round or Bing) "Session (0) Change and Effect for Systems and Services"

You also get a copy of it "Vista Developer Story" from the Microsoft Download Center

You should check the MSDN Library for design using User Access Control (UAC).

Many security

Finally add mime types to IIS

  • Open IIS Manager.

  • Browse the IIS site or subfolders where Thinpace XE

  • That site or subfolder Right click on and select Properties.

  • Select the HTTP Headers tab.

  • Click the MIME type button.

  • In the extension box, type ".exe".

  • In the MIME type box, type "application / octet-stream".

  • Click OK.


javascript - Coffeescript text highliting with Eclipse -


I have a coffeeplip project that I want to use eclipse.

Many people suggest that

I have installed the module but I still have a plain black and white file.

What a thank you!

PS: I have an eclipse under Win7.

It looks like you have not installed well, reinstall

< P> By default you will receive the editor for the files.

< / P>

Also helps to see indentation too


c# - how to create a flyout panel in WPF -


As the question shows, I would like to know whether it is possible to add a flyout panel to the WPF application regularly, especially From the results given to me from Googling for a UserControl, the most available flyheads have been created without being told about packaging with any type of template.

I have the closest expanded WPF toolkit even on that there is no document on how to use it. As I am currently trying to keep the MVVM pattern, is there any idea to make anyone?

You can open FreeEd, which is free and open source.


java - PrintWriter giving null pointer exception -


I am trying to create multiple client single Java server models. I am using these threads, so I have a customer per thread using the AsyncTask . Thus, I am creating a customer socket and PrintWriter object method is pressed into the CreateClient category and then every time the button2 , I get the question / text pass on the server for that particular thread Have to do. The problem is, I'm getting NullPointerException in the SendMessage class.

This is my client Actvity:

  import java.util.ArrayList; Import java.util.Arrays; Import java.util.Locale; // import statement for client import java.io.IOException; Import java.io.printWriter; Import Java.net.Socket; Import java.net.UnknownHostException; Import android.speech.RecognizerIntent; Import android.speech.tts.TextToSpeech; Import android App Import android.content.Intent; Importroid.os.Bundle; Import android.view.Menu; Import android.view.MenuItem; Import android.view.View; Import android.view.View.OnClickListener; Import android.view.Window; Import android.view Windows Manager; Import android.widget.Button; Import android.widget.EditText; Import android.widget.ImageButton; Import android.widget.Toast; // Import Imported Client for Android. OS.Sync Task; OnClickListener {edit text question; on implementation of public class main activity activity; // client socket private socket client; Private PrintWriter PrintRighters; Private string breaks; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_main); // Create the Client as soon as the activity starts Client Client Connection = New CreateClient (); ClientConnection.execute (); Question = (Edit Text) Search ViewById (R.id.editText1); Button query = (button) FindById (R.id.button2); Query.setOnClickListener (this); Find ImageButton = (Image Button) Find VVBID (R.B.ton1); Listen.setOnClickListener (this); Listen.performClick (); } Private Class CreateClient AsyncTask extension & lt; Zero, zero, zero> {@Override Safe Volume Doine Background (Zero ... Parameters) {try {client = new socket ("server IP address", 4444); Printwriter = new printritter (client.getOutputStream (), true); } Hold (unknownhostexception e) {e.printStackTrace (); } Hold (IOException e) {e.printStackTrace (); } Return tap; }} Private class CloseClient AsyncTask is spreading & lt; Zero, zero, zero> {@Override Safe Volume Doine Background (Zero ... Parameter) {If (printwriter! = Null) {try {printwriter.write ("\ n"); Printwriter.close (); Client.close (); // close the connection} hold (unknownhostexception e) {e.printStackTrace (); } Hold (IOException e) {e.printStackTrace (); }} Return tap; }} Private class SendMessage AsyncTask and lt; Zero, zero, zero> {@Override Safe Volume DownBeckground (Zero ... Parameter) {printwriter.write (toTag); // On this line printwriter.write ("\ n") received a notation marking exception; // delimiter printwriter.flush (); Return tap; }} Public void onClick (switch vv) {switch (v.getId ()) {case R.id.button2: if (validate ()) // Validate is a function that reads {toTag = question.getText () Validates .tar (); // Invoke AsynTask's execution method, which will run the doInBackground method of SendMessage Class SendMessage sendMessageTask = new SendMessage (); SendMessageTask.execute (); } And {// toast error msg} break; }} @ Override Backup on Public Zero (super.onBackpressed (); CloseClient closeConnection = New CloseClient (); CloseConnection.execute (); }}  

chances are that line

  printwriter = New printritter (client.getOutputStream (), true);  

Not being executed on time Try adding a println or starting printWriter elsewhere.


php - Near identical HTML forms, one posts correct value, the other doesn't -


My page has two forms of welcome.php as shown:

  Lt; Form action = "welcomeforms.php" method = "post" name = "food security" & gt; & Lt; H4 & gt; & Lt; / H4 & gt; // spacer & lt; Input type = "text" name = "breakfast_calleries" value = "calorie amount" onFocus = "this.value = ''" & gt; & Lt; Br> & Lt; Input type = "submit" style = "position: full; left: -9999px; width: 1px; height: 1px;" & Gt; & Lt; / Form & gt; & Lt; Form action = "welcomeforms.php" method = "post" name = "foods" & gt; & Lt; H4 & gt; Breakfast & lt; / H4 & gt; & Lt; Input type = "text" name = "breakfast" value = "add new snack item" focus = "this.value = ''" & gt; & Lt; Br> & Lt; Input type = "submit" style = "position: full; left: -9999px; width: 1px; height: 1px;" & Gt; & Lt; / Form & gt;  

This is the code at welcomeforms.php:

  if (isset ($ _ POST ['breakfast'])) {$ breakfastitem = $ _POST [ 'Snack'];} (Prozate ($ _ POST ['breakfast_calleries']) $ $ Snack Goods = $ _POST ['breakfast_calleries'];} $ echoes snack; $ Dancer;  

Forms are displayed correctly on the webpage, and when I enter 'Roti' and '100' in the breakfast form in the form of breakfast, this same webpage Is given on:

  irreversible variable: breakfastitem in C: \ wamp \ www \ welcomeforms.php line on line 100  

these forms with my eyes Basically the same, so I do not understand why a post is worth the right price and nothing else does not post anything Is such a ridiculous thing that I have missed?

You are using two different forms and you submit You can only merge them into one at a time.

Instead of using value = "add new snack item", use the focus = "this.value = ''" bus placeholder = "Add new snack item" - Find what you want to get in the modern browsers - help:


java - Classpath Issue with xmlparserV2.jar in WAS 8.5.5 -


I was 8.5.5 in a serious issue. According to my need, I failed to follow the restart covers xmlparserV2.jar in the JMM Kcshapth I WAS server errors. I removed the jar and tested it. The server is working fine with that entry

Please tell me the reason and how can I solve it

 . [16/03/15 6: 30: 12: 406 PDT] 00000001 MBeanDescript W ADMN0001W: service MBean descriptor file is unable to parse com.ibm.websphere.management.exception.DescriptorParseException: ADMN0001W: service MBean descriptor file com / IBM Unable to parse / ws / management / narrator / xml / AdminService.xml On com.ibm.ws.management.descriptor.MBeanDescriptorLoader.loadDescriptor com.ibm.ws.management.descriptor.MBeanDescriptorManager.loadDescriptorFile (MBeanDescriptorManager.java:415) (MBeanDescriptorLoader.java:182) on com.ibm.ws.management on .descriptor.MBeanDescriptorManager.getDescriptor com.ibm.ws.management.MBeanFactoryImpl.activateMBean (MBeanDescriptorManager.java:190) (MBeanFactoryImpl.java:507) [3/16/15 6: 30: 12: 500 PDT] 00000001 FfdcProvider W Com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: C: \ Program Files \ IBM \ WebSphere \ AppServer \ profiles \ AppSrv01 \ logs \ ffdc \ server1_b9ae2bfa_15.03.16_06.30.12.4211342510407965994963.txt emproved FFDC event. ibm.ws.management.component.AdminImpl.initialize 217 [3/16/15 6: 30: 12: 500 PDT] 00000001 AdminInitiali a ADMN0015I: Administration service is not started. [16/03/15 6: 30: 12: 562 PDT] 00000001 MBeanDescript W ADMN0001W: ADMN0001W: Unable to parse service is MBean descriptor file is unable to parse com.ibm.websphere.management.exception.DescriptorParseException MBN descriptor File Comm / IBM / WS / Management / Descriptor / XML / Conflict Repository.exml com.ibm.ws.management.descriptor.MBeanDescriptorLoader.loadDescriptor com.ibm.ws.management.descriptor.MBeanDescriptorManager.loadDescriptorFile (MBeanDescriptorManager.java:415) at (MBeanDescriptorLoader.java:182) .descriptor.MBeanDescriptorManager.getDescriptor on com.ibm.ws.management (MBeanDescri ptorManager.java:190) on com.ibm.ws.ffdc.impl.FfdcProvider log Inkent FFDC1003I: Ffdisi event emitted at C: \ Program Files \ IBM \ web \ AppServer \ profiles \ AppSrv01 \ logs \ ffdc \ com.ibm. ws.management.repository.FileRepository.initialize 149 server1_b9ae2bfa_15.03.16_06.30.12.5627002919638891875819.txt [3/16/15 6: 30: 12: 578 PDT] 00000001 FileRepositor e ADMR0006E: an error occurred activating MBean: com.ibm .websphere.management.exception.AdminException: ADMN0005E: type ConfigRepository, associate com.ibm.ws.management.repository.FileRepository@df91d010, configuration ID stores descriptor null service MBean is unable to activate. com.ibm.ws.management.MBeanFactoryImpl.activateMBean (MBeanFactoryImpl.java:772) on com.ibm.ws.management.MBeanFactoryImpl.activateMBean (MBeanFactoryImpl.java:476)  
on

Text after "

Has this problem been resolved?

Because I have to face the same kind of issue. Getting the first - java.sql.SQLException: java.lang.NoClassDefFoundError: oracle.xml.parser.v2.XMLParseException To fix this problem if we add xmlparserv2.jar to the JDBC square path if the application is running fine but my JVM was Crush (coil login no disturbances) has been removed from the Classpath this jar server behaves properly.


php - Stop Wordpress "Auto Drafts" from showing? -


I'm using the following code to ask for a custom post type. Despite being set to "Post_status = publish", it is still showing the blank "Auto Draft" page on the front, although I can not find them on the backend. How can I get rid of these posts?

  & lt; Php global $ themeple_config; $ Query = New WP_Query (array ('post_type' = & gt; 'testimonial', 'post_status' = & gt; 'publish', 'orderbie' = & gt; 'post_date', 'order' => DESC '));  

It was just a typo "published" should be clearly "published" Was there.

The correct code is as follows:

  $ query = new WP_Query (array ('post_type' = & gt; 'testimonial', 'post_status' = & gt; ; 'Publish', 'Orderbie' = & gt; 'PostDate', 'Order' => 'DESC')); Credit to @Yuyokk to notify  

.


c# - Different token lifetime for email confirmation and reset password -


Is there an implementation of the IUserTokenProvider, where I can set a different token lifetime for an email confirmation token and reset the password token Can i 1.0 In recognition, I could have two token providers (one for each purpose). Only now is one

It has a datapriya tone proxy but I can not set different lifetime.

Do I have to type my own TokenProvider or have another solution?

This identity is not supported in version 2.0. They plan to present it in 3.0

Now you have to write your own token provider.


visual c++ - Capture still images from photo stream using capture engine manager in media foundation -


Thank you very much for your prompt reply. I have posted the sample code which I used on the image using the TakePhoto () method Use to capture. This method is returning success. OnCaptureEvent () is used to handle an event with the capture engine and its returning MF_CAPTURE_ENGINE_ERROR error.

  HRESULT TakePhoto () {HRESULT hr = m_pEngine-> GetSink (MF_CAPTURE_ENGINE_SINK_TYPE_PHOTO, and pSink); If (FAILED (HR)) {goto; } Hours = pSink-> QueryInterface (IID_PPV_ARGS (& amp; amp; pPhoto)); If (FAILED (HR)) {goto; } Hr = m_pEngine-> GetSource (& amp; pSource); If (FAILED (HR)) {goto; } Hr = pSource-> GetCurrentDeviceMediaType (1, and PMDI type); // 1 is the image stream index. I will find the current image stream media type here. If (FAILED (HR)) {goto; } // Configure picture format hours = CreatePhotoMediaType (pMediaType, & amp; pMediaType2, GUID_ContainerFormatBmp); If (FAILED (HR)) {goto; } Hr = pPhoto-> Remove AllStreams (); If (FAILED (HR)) {goto; } DWORD dwSinkStreamIndex; // Before attempts to connect the image stream to still sync the photo, (bHasPhotoStream) {hours = pPhoto-> AddStream ((DWORD) MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_PHOTO, pMediaType2, Zero, & dwSinkStreamIndex); Instead of MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_PHOTO //, I gave the index, as if the 1.i error is occurring, (FAILED (hour)) {Goto; }} Hr = pPhoto-> SetOutputFileName (pszFileName); If (FAILED (HR)) {goto; } Hr = m_pEngine-> TakePhoto (); If (FAILED (HR)) {goto; } Return hour; } HRESULT OnCaptureEvent (WPARAM wParam, LPARAM lParam) {GUID guidType; HRESULT HR Stratus; IMFMediaEvent * pEvent = reinterpret_cast & lt; IMFMediaEvent * & gt; (WParam); Hr = pEvent-> GetExtendedType (& guidType); If (SUCCEEDED (hour)) {if (guidType == MF_CAPTURE_ENGINE_ERROR) // I get this error if I give dwSourceStreamIndex as '1' in AddStream API {DestroyCaptureEngine; }} PEvent-> Release (); Returns HRStats; }  


http - alamofire how to use taskWillPerformHTTPRedirection -


I use Alamhofer to handle the HL request, but receives zero

And the URL contains a server HTTP redirect,

>

There is nothing that is currently possible, here is a detailed information on the Github project site which passes through the problem.

Here are two open pull requests, and, if you want to work temporarily for a fork then try to solve this problem.


class - Python Calculator, No Answer -


I am very interested in Python and I have decided to know it. I have covered many things but I am stuck trying to make a calculator in which we need to type the number and type of operation

For example - 10 ^ 2

Whatever happens, I do not get any answer. And I use the command prompt for output.

My code looks like this:

  # calculator print "" print "calculator" print "" number = int (raw_input ("> gt; & gt;") ). Partition () num1 = int (num [0]) op = num [1] num2 = int (num [2]) if (op == '+'): printed "> gt; gt; & gt; Num1 + num2 elif (op == '-'): print ""> gt1 - num2 elif (op == '*'): Print "Gt1 / num2 elif (op == ' ^ '): "Print" and gt; & gt; " Gt1 * num2 elif (op == '/'): print ">>>>"; Pow (num1, num2) elif (op == '%'): print "& gt;  

I use Python 2.7

Please help me for that

inserted you int , that is

  num = raw_input ( "& Gt; & gt;") .split () Remove the #int cast  

The output will be:

  & gt; & Gt; 10 ^ 2> and gt; & Gt; 100  

Getting PAYMENT_CREATION_ERROR when accessing Sandbox environment using PayPal iOS SDK 2.8.4 -


This error is taking place when I reach the sandbox environment using the PayPal IOS SDK 2.8.4:

PAYMENT_CREATION_ERROR - There was a problem setting up this payment. Please visit the PayPal website to check your account.

This is working fine for PayPalEnvironmentNoNetwork , but I am unable to login using PayPalEnvironmentSandbox .


c# - Nest renders range boundaries as string instead of double -


I am interrogating ElasticSearch with this code, with the nest:

  Var mustTerms = new list & lt; Funk & lt; Query descriptor & lt; Elasticcake in & gt; Nest. Cotainier & gt; & Gt; (); Var dmaxprice = maxprice.hasValue? (Double?) MaxPrice.Value: 100000d; Var dminPrice = minPrice.HasValue? (Double?) MinPrice.Value: 0D; Should be Tarma.Ad (MT => MT range (RD => rd.OfField ("value"). Lower Oracles (DMXPrice) .GreaterOrEquals (dminPrice)); Function & lt; Query descriptor & lt; Elastickeyk in & gt; Nest.QueryContainer & gt; QueryFunc = qd = & gt; Qd. FunctionsCon (fsq = & gt; fsq .Query (fsqd = & gt; fsqd.bool (bqd = & gt; bqd.) (Must be .torms.a) (should be Terms.ToArray ()). Functions (fsd = & Gt; FSD.Linator ("createDate", fsdfd = & gt; FSDFD Scalail ("1D"). (0.5D) Original (Date Time. UTCNOOoostring ("O")))); Funk & lt; Search descriptor & lt; Elastic Check In & gt; Search descriptor & lt; Elastic Check In & gt; & Gt; SearchFunc = q = & gt; Q. Index (_indexName). Type (_typeName) .Query (queryFunc). size range);  

This code generates the query:

  {"query": {"function_score": {"functions": [{"linear": { "" "": "" "" ":" "" "": [["Category": {"value": {"gte": "29.97", "lte": "67.5 "}}}}}}}}}  

As you can see, the nest range represents a double value in the form of a wire:

  

<" When I correct double values ​​by hand, Elasticsearch returns query results correctly

Update:

This Mapping for Index:

  {"Matrix": {"Matteps": {"Properties": {"Properties": {"createDate": {"Type": "Date", "Format": "Detautical / "Other" fields: / "other"), "id": {"type": "string"}, / * other fields * / "value": {"type": "long"} / * other fields *}}}}}  

We did not map the value area in particular, there are some value field integers on Docs, some couples.

This bug may be a bug in using a syntax that you choose, Problems can arise. To represent your ES data, a more standard syntax would be to create a C # POCO like this:

  [elastic type] public class type1 {public string id {get; Set; } Public date time creation date {receive; Set; } Public double value {receipt; Set; }}  

With it, your query syntax becomes much simpler:

  var result2 = Elastic client Search & lt; Type1 & gt; (S => Objectivity (q = & gt; q.filtrated (f => f.filters (ff => ff .range (r = & gt; rffffffffffffffff = & gt; ; RF value) .GreaterOrEquals (29.97) .lower o'clock (67.5))))));  

ios7 - iOS constraints: 4 Buttons -


I want to put 4 buttons on the screen. They all should have the same height and width. The difference between the buttons should be 35px and the limit for viewing the outer boundary should be 20px.

Now the button should be scaling in different sizes of the screen but with all the obstacles all my efforts have failed.

Does anyone know how to use them properly?

Layout:

  ----- ---------- | | | X x | | | | X x | | | ---------------  

have x buttons

If the result you want is given below, please follow the steps:

Always keep this method in mind, design your view in your storyboard (600x600) and then apply your barriers.

  • Select all buttons, then select" Equal width "and" Equal height "constraint in the following obstruction assistant: < / Li>

Enter image details here

Enter image details here

  • Repeat the previous step with B1 / B3 and B2 / B4, but select "vertical spacing".

  • For B1, it is bound to the left and upper boundaries presented below to 20px:

  • Before limiting constraints

    image here Enter details

    • B2 (top / right), B3 (left / bottom) and B4 (right / bottom)

    You are all set, your view will now properly scale, regardless of the screen size.


    c++ - What mean this error? Invalid indirect reference 0x61382e48 in decodeIndirectRef -


    मुझे रनटाइम में इस त्रुटि मिली (c ++ jni)

      डब्ल्यू / डेलविकम (24772) : अमान्य अप्रत्यक्ष संदर्भ 0x61382e48 में डीकोडआईडीईआरएडीईआरएफ ई / डेलविक्यूम (24772): वीएम अवरोपीकरण एफ / लिबसी (24772): 0xdeadd00d (कोड = 1) पर घातक संकेत 11 (एसआईजीईईएसजीवी), थ्रेड 24 9 75 (एलडी एंड्रॉइड कपार्ट)  

    0x61382348 एक पता है जिसे सी ++ से जावा में पास किया गया था।

    मुझे नहीं पता कि यह संदेश क्या है अमान्य अप्रत्यक्ष संदर्भ 0x ........ डीकोड में प्रत्यक्षआरएफ़ < / Strong>

    मुझे कौन बता सकता है?

    धन्यवाद।


    c - about comparison between signed and unsigned integer expressions -


    <पूर्व> #include & lt; stdio.h & gt; #include & lt; string.h & gt; Int main () {char a [10], बी [10]; Int i, j, n = 0, m = 0; Scanf ("% s% s", ए, बी); के लिए (i = 0; i & lt; strlen (a); i ++) n + = एक [i]; के लिए (i = 0; i & lt; = strlen (b); i ++) मी + = एक [i]; printf ( "% d", n * मी); वापसी 0; }

    इनपुट 123 45 का मतलब आउटपुट 54 (जो (1 + 2 + 3) * (4 + 5) से आया था), लेकिन यह मदद नहीं करता

    पंक्ति 8 और 9 में, यह हस्ताक्षरित और अहस्ताक्षरित पूर्णांक अभिव्यक्ति के बीच तुलना दर्शाता है, और मुझे गलत चांदनी मिलती है

    इनपुट 123 45 का मतलब आउटपुट 54 (जो (1 + 2 + 3) * (4+ 5)), लेकिन यह मदद नहीं करता

    इन दो छोरों के बजाय

      के लिए (i = 0; i & lt; strlen (a); i ++) n + = एक [i]; के लिए (i = 0; i & lt; = strlen (b); i ++) मी + = एक [i]; ^^ ^^^^  

    लिखने के लिए (i = 0; एक [i]! = '\ 0'; i ++) n + = एक [i] - '0'; के लिए (i = 0; b [i]! = '\ 0'; i ++) एम + = बी [i] - '0';

    ध्यान दें कि फ़ंक्शन scanf असुरक्षित है जब वर्ण स्ट्रिंग के साथ प्रयोग किया जाता है। इसके अलावा आपको जांचना चाहिए कि कोई अगला वर्ण मानक सी फ़ंक्शन isdigit का उपयोग करते हुए उदाहरण के लिए एक अंक है या नहीं।

    संकलक संदेश के लिए, फिर strlen फ़ंक्शन करता है प्रकार size_t कुछ अहस्ताक्षरित अभिन्न प्रकार है। आप वेरिएबल i के साथ strlen द्वारा लौटाए गए मूल्य की तुलना कर रहे हैं जो कि आपने हस्ताक्षरित int प्रकार के रूप में घोषित किया है। इसलिए कंपाइलर चेतावनी देता है कि तुलनात्मक न होने वाला परिणाम हो सकता है कि आप क्या उम्मीद कर रहे हैं क्योंकि वेरिएबल i को एक प्रकार की रेंज में कनवर्ट किया जाएगा size_t


    java - How to intercept SLF4J logging via a JUnit test? -


    By preventing logging (SLF 4J + lockback) in any way and receiving InputStream Is possible (or something else that can be read) through a JUnit test case ...?

    You can create a custom appender

      public class testapper AppenderBase & Lt; LoggingEvent & gt; {Fixed list & lt; Logging event & gt; Incidents = New Arrestist & lt; & Gt; (); @ Override Protected Zero Attached (logging event e) {events.add (e); }}  

    and configure log-test-test.xml for its use. Now we can check the logging incidents from our tests:

      @Test Public Zero Test () {... Assert.assertEquals (1, TestAppender.events.size ()); ...}  

    Android: adt was unable to instantiate class com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor -


    I see this problem when I try to open any XML file in Eclipse:

    The plug-in was unable to administer the "com.android.ide.eclipse.adt" class "com.android.edroid.ede.eillipple.edit.in.editers.com comonaxml editor".

    How do I solve this problem?


    Get partiton table information of a device using its image file - C program on linux -


    I want to create a program in C which works on Linux which accepts the device's image file and its The partition table prints the device. I was writing gdisk / fdisk in a terminal.

    later likes to create a program that uses that data and the partition table can change & amp; One guinea

    I am using Eclipse.

    You can use LibParted, which is part of a partial project:


    atlassian sourcetree - Source Tree increasing badges -


    I have a problem that the badges are increasing but I do not know the reason why I tried to refresh the remote position But until I commit, it works. I also have to say that I am working with a remote server. Here's a screenshot: Enter image details here

    But unless I commit

    This badge means that you've committed 166 times, bit Has not pushed them yet.

    To be really precise, you have 83 hours on the head and guru, which total 166.


    python - Function to randomly read a line from a text file -



    python - Function to randomly read a line from a text file -

    i have create function reads random line text file in python.

    i have next code not able work

    import random def randomline(filename): #retrieve random line file, reading through file irrespective of length fh = open(filename.txt, "r") linenum = 0 = '' while 1: aline = fh.readline() linenum = linenum + 1 if aline != "": # how lastly line of file ? if random.uniform(0,linenum)<1: = aline else: break fh.close() homecoming print(randomline(testfile.txt))

    i got far but,need help go further, please help

    once programme running i'm getting error saying

    print(randomline(testfile.txt)) nameerror: name 'testfile' not defined

    here's version that's been tested work, , avoids empty lines.

    variable names verbose clarity.

    import random import sys def random_line(file_handle): lines = file_handle.readlines() num_lines = len(lines) random_line = none while not random_line: random_line_num = random.randint(0, num_lines - 1) random_line = lines[random_line_num] random_line = random_line.strip() homecoming random_line file_handle = none if len(sys.argv) < 2: sys.stderr.write("reading stdin\n") file_handle = sys.stdin else: file_handle = open(sys.argv[1]) print(random_line(file_handle)) file_handle.close()

    python function random text-files

    reporting services - SSRS overlapping a number with a line to display a discountprice -



    reporting services - SSRS overlapping a number with a line to display a discountprice -

    i'm trying display discountprice in ssrs report. means original cost should strikethrough. next example:

    how can allow line in ssrs overlap number? 2 elemens shown among eachother.

    thanks in advance!

    you can utilize strikethrough this:

    reporting-services ssrs-2008-r2

    ios - Swift: SKNode should have optional types, Optional member does not have member -



    ios - Swift: SKNode should have optional types, Optional member does not have member -

    i had working , compiling swift game before updated new xcode , lot of errors has appeared. here 2 haven't been able fix.

    func centeronnode(node: sknode ) { allow camerapositioninscene = node.scene?.convertpoint(node.position, fromnode: node.parent!) var y = cgfloat(node.parent?.position.y - camerapositioninscene?.y!) // error: // operand of postfix ‘!’ should have optional types; type cgfloat allow x = cgfloat(node.parent.position.x - camerapositioninscene.x) // error: // sknode? not have fellow member position // force photographic camera bit y -= 75 node.parent.position = cgpointmake(x, y)

    i guess don't ! , ? business. wrapping, unwrapping, optional types. in java or c# terms?

    this work, assuming node.scene never nil, , node.parent never nil:

    let camerapositioninscene = node.scene!.convertpoint(node.position, fromnode: node.parent!) var y = cgfloat(node.parent!.position.y - camerapositioninscene.y) allow x = cgfloat(node.parent!.position.x - camerapositioninscene.x)

    if possible nil, utilize code instead:

    if allow camerapositioninscene = node.scene?.convertpoint(node.position, fromnode: node.parent!) { if allow parent = node.parent { var y = cgfloat(parent.position.y - camerapositioninscene.y) allow x = cgfloat(parent.position.x - camerapositioninscene.x) // force photographic camera bit y -= 75 parent.position = cgpointmake(x, y) } }

    this test ensure none of values nil, , nil if (instead of crashing, first illustration would).

    for explanation of how optionals work, read apple's article.

    ios iphone xcode swift ios8

    jquery - C# Click by tag -



    jquery - C# Click by tag -

    i'm trying teach myself c# programme i'm working on has browser attached it. have been trying figure out how create click button tag name cant seem to. have searched site , found many helpful topics none yet help solve one.

    <a class="some_class" style="letter-spacing: -1px" href="/someurl" data-executing="0">displaybuttontext</a>

    that button create programme click. cant to. here few ways have tried:

    private void test1_checkedchanged_1(object sender, eventargs e) { web.document.getelementsbytagname("class").getattribute("href").invokemember("click"); }

    that method didn't threw error getattribute, tried:

    moco.document.getelementbyid("a").invokemember("click");

    this doesn't show error doesn't click button (displaybuttontext). kind plenty show illustration , explain it. maintain in mind i'm new this.

    let's have on html page:

    <a id="link-id" href="linktosomewhere.html">click here</a>

    you want call:

    document.getelementbyid("link-id").invokemember("click");

    this because link element has attribute id="link-id".

    you can see in article parameter pass getelementbyid needs id of element want retrieve: http://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.getelementbyid(v=vs.110).aspx

    c# jquery

    excel - Unsaved Transient Instance Hibernate -



    excel - Unsaved Transient Instance Hibernate -

    although there several questions related exception, folks, not possible duplicate . iterating through multiple excel sheets using apache poi , have utilize jpa perform many 1 relation

    for (int = 0; < wb.getnumberofsheets(); i++) { hssfsheet sheet = wb.getsheetat(i); .... if(i=0) { baseclass obj = new baseclass (); obj.setname("name"); session.save(obj) session.gettransaction().commit(); } if(i=3) { foreigclass obj2 = new foreigclass (); obj2.setsection("2a"); baseclass obj = new baseclass (); --> obj2.settransport(obj); // linking foreign keys // error comes here session.save(obj2) }

    at marked line, getting next exception:

    exception in thread "main" org.hibernate.transientobjectexception: object references unsaved transient instance - save transient instance before flushing: model.ceptransport @ org.hibernate.engine.internal.foreignkeys.getentityidentifierifnotunsaved(foreignkeys.java:294) @ org.hibernate.type.entitytype.getidentifier(entitytype.java:537) @ org.hibernate.type.manytoonetype.isdirty(manytoonetype.java:311) @ org.hibernate.type.manytoonetype.isdirty(manytoonetype.java:321) @ org.hibernate.type.typehelper.finddirty(typehelper.java:294) @ org.hibernate.persister.entity.abstractentitypersister.finddirty(abstractentitypersister.java:4243) @ org.hibernate.event.internal.defaultflushentityeventlistener.dirtycheck(defaultflushentityeventlistener.java:546) @ org.hibernate.event.internal.defaultflushentityeventlistener.isupdatenecessary(defaultflushentityeventlistener.java:232)

    can suggest wrong here ? cascading properties fine , works fine if info comes 1 excel sheet.

    in below code creating objects foreigclass & baseclass , trying save one:

    foreigclass obj2 = new foreigclass (); // created foreigclass object obj2.setsection("2a"); baseclass obj = new baseclass (); // created baseclass object obj2.settransport(obj); // linking foreign keys // error comes here session.save(obj2);

    so obj2 , obj in transient state, when phone call session.save(obj2) checks linked entities , there state before making obj2 persistent state. obj still in transient state complains error as:

    org.hibernate.transientobjectexception: object references unsaved transient instance - save transient instance before flushing: model.ceptransport.

    here guess ceptransport same baseclass.

    to prepare issue, save baseclass before saving foreigclass this:

    session.save(obj); session.save(obj2);

    but if want utilize cascade setting check settings @ foreigclass , create sure cascade values correct.

    excel hibernate apache-poi one-to-many

    discrete mathematics - Proving a binary tree -



    discrete mathematics - Proving a binary tree -

    how go proving relationship j , k if t binary tree k internal vertices , j terminal vertices

    in total binary tee know j = k + 1

    in binary tree not total know j = k if there odd number of vertices 1 kid , j = k - 1 if there number of vertices 1 child.

    i not sure how go proving process though.

    the total number of nodes in finish binary tree of depth d equals 2(d+1) – 1. since leaves in such tree @ level d, tree contains 2d leaves and, therefore, 2d - 1 internal nodes. , can utilize prove other one.

    binary-tree discrete-mathematics proof

    c++ - General Pointer issue -



    c++ - General Pointer issue -

    i've tried following:

    std::string* member::getname() { std::string name2 = "sdfsdfsd"; homecoming &name2; } std::string* name; fellow member m; name = m.getname(); std::cout << *name << std::endl;

    and "works", shouldn't name2 unavailable after getname() called? , pointer points nothing?

    taking address of local stack variable , using when it's no longer in scope it's undefined behavior.

    as "it works", doesn't mean work or reliable practice. stack isn't wiped out when returning. take @ definition of "undefined behavior"

    c++ pointers

    Android : ProgressDialog for a particular fragment or view? -



    Android : ProgressDialog for a particular fragment or view? -

    while initialize progress dialog provide respective activity in constructor , setcancelable(false); resist user(mask) work while loading.

    my question whether can restrict user work in particular view/fragment, while user can work other views , fragments.

    example given here

    sample image

    in image can see user cannot click within toprun fragment, while user can work outside (ex. can click highscore, play, boost etc..).

    you can adjust bounderies of progressbar view's limits these properties in layout (xml)

    android:layout_alignbottom="@id/yourviewid" android:layout_alignleft="@id/yourviewid" android:layout_alignright="@id/yourviewid" android:layout_aligntop="@id/yourviewid"

    after adjusting, play margins, padding visibility or whatever need...

    i hope helps!!

    android android-fragments progressdialog mask

    assembly - Why does this program crashes everytime? -



    assembly - Why does this program crashes everytime? -

    title: question 5

    include irvine32.inc .data x dword ? y dword ? z dword ? .code main proc phone call readint mov eax, x add together eax, y add together eax, z mov ebx, 3 div ebx phone call dumpregs phone call crlf exit main endp end main

    with info you've provided it's hard say.

    one cause of crashes you're not clearing edx prior division. if read description div in intel's manual you'll see div r/m32 uses 64-bit register pair edx:eax dividend. if edx happens contain arbitrary value, run chance of getting quotient won't fit in 32 bits, cause exception.

    hence, you'll typically want clear edx prior each div. can done mov edx,0 or xor edx,edx.

    assembly x86 mean masm irvine32

    Revolution Slider not working properly in firefox -



    Revolution Slider not working properly in firefox -

    i developing website of www.fundacionbiodiversa.org revolution slider ver 4.5.6 (the latest available theme). works in every device except firefox, presents lot of issues: font colour don't match, slides blink , shake, weird position issues, , others. technical back upwards theme not give me answer. proposed 2 "solutions" none worked: - http://www.themepunch.com/home/plugins/wordpress-plugins/revolution-slider-wordpress/changes-on-css-documents-has-no-effects-on-frontend/ - http://www.themepunch.com/home/plugins/wordpress-plugins/revolution-slider-wordpress/custom-styles-working/ suggestions on can problem?

    most of issues css related. style added inline scoped parameter. failure prepare in next minor update 4.6.8 first.

    the current available version 4.6.5 , depending on html header use, scoped attribute in firefox active or not.

    to prepare issues, please update version 4.6.5 , contact our back upwards @ http://themepunch.com/support-center , provide solution css issues also.

    firefox revolution-slider

    java - iBatis insert statement throwing NPE -



    java - iBatis insert statement throwing NPE -

    i new ibatis. in project using ibatis persist java objects in oracle db. have class, classa, having 3 columns : id, name , description. info going persisted in tablea. there sequence in db generate value id column in table. wrote insert statement table follows,

    <insert id="inserttablea" parameterclass="com.classa"> <selectkey resultclass="java.lang.long" keyproperty="id"> select seq_tablea.nextval id dual </selectkey> insert tablea(id, name, description) values (#id#, #name#, #description#) </insert>

    this worked fine.

    but becaude of our inhouse ui framework limitation had alter design. need first generate id long sequence, set value in instance of classa along name , description , insert db. in case insert statment doesn not need selectkey attribute. id, name , description values in object. when updated query below, throwing null pointer exception.

    <insert id="inserttablea" parameterclass="com.classa"> insert tablea(id, name, description) values (#id#, #name#, #description#) </insert>

    how can insert info table without using . generating key sequence first , populate object values including id , trying phone call statement java follows,

    getsqltemplate().insert("process.inserttablea", instanceclassa);

    any pointers welcome,

    thanks, sd

    just sure, did include getid() method in classa class homecoming value of id field?

    java ibatis ibator

    javascript - ASP.Net Programming Validation ,Combo box inside repeater -



    javascript - ASP.Net Programming Validation ,Combo box inside repeater -

    i have asp website in have repeater, has combo box , textbox.i need have text box value converted uppercase when select particular value combo box, not values combo box .i have tried onchange event , onkeypress event in javascript,but not able breakthrough.

    function changecase(comboboxclientid,textboxclientid) { var combo=$find(comboboxclientid); if(combo.get_value()=='textvalue') { var textbox=$find(textboxclientid).value; code here........ `}`

    you need this.

    function changecase(comboboxclientid, textboxclientid) { if ($("#" + comboboxclientid).val() == 'textvalue') { var txtval = $("#" + textboxclientid).val(); $("#" + textboxclientid).val(txtval.touppercase()); } }

    assumption : comboboxclientid, textboxclientid actual id of elements existing in page.

    javascript asp.net

    .net - How to implement extension method with generic type(T) that returns new T2(T) -



    .net - How to implement extension method with generic type(T) that returns new T2(T) -

    is there way produce generic extension method can take 1 type , convert type passing source object of type constructor of generic/unknown output type?

    here's code want create more generic:

    <extension()> public function topubliclist(source list(of hashtag)) list(of webserviceapiv1.publicdataclasses.hashtagpublicinfo) homecoming (from ht in source select new webserviceapiv1.publicdataclasses.hashtagpublicinfo(ht)).tolist() end function

    basically want effect:

    <extension()> public function topubliclist(of t)(source ienumerable(of t), destinationtype type) list(of destinationtype) homecoming (from x t in source select new destinationtype(x)).tolist() end function

    have considered using convert.changetype ?

    it this:

    return (from x t in source select convert.changetype(x, destinationtype)).tolist()

    for work, destinationtype must implement interface iconvertible.

    .net vb.net generics extension-methods ienumerable

    netsuite - Change Line Item value On a record on Field Change Event -



    netsuite - Change Line Item value On a record on Field Change Event -

    i have field in sales order record. on alter of field need alter line item field.

    understand client script option. apis looking @ nlapisetlineitemvalue , nlapisetcurrentlineitemvalue

    seems cant possible in case of line item fields

    function updateordertypelocation(type, name, linenum) { if(type=='item' && name =='item') { var ordertype = nlapigetfieldvalue('custbody_ordertype'); nlapisetcurrentlineitemvalue('item', 'custcolcustcol_line_order_type', linenum, ordertype); }

    }

    any workaround ?

    so line item added in when trigger script. should script trigger when order type changed?

    based on code provided, script trigger after select item , not when select order type.

    netsuite

    eclipse - Can't update Juno to Luna - no updates found -



    eclipse - Can't update Juno to Luna - no updates found -

    i've followed these articles: update eclipse , eclipe kepler upgrade.

    i've added this , that repositories , run "check updates":

    however, no updates found. how can update? p. s. on windows.

    eclipse windows updating eclipse-luna

    oracle - How to add custom column in tabular form? -



    oracle - How to add custom column in tabular form? -

    my current tabular form displaying columns table.

    how/where can add together custom column in tabular form, link or button , take page input info row?

    example

    id [name] [address] [link or button here]

    to add together custom column:

    go "region definition" -> "source", add together new column sql query there. example:

    select col1, -- column of table col2, -- column of table 'some text' custom_column -- custom column contain text "some text" -- in every row my_table

    go "report attributes", select column name "custom column" , click "edit" button (pencil picture), go "column link" , fill fields:

    link text - text display, can write own static text, text column of query or picture target - page in application or link outer site page - number of target page item - item on target page receive value link value - value, send item. can either static value or value of column of query (in case utilize substitution string: "#" symbol , column name: #column_name#).

    see documentation understanding apex url syntax: http://docs.oracle.com/cd/e37097_01/doc/doc.42/e35125/concept_url.htm

    oracle oracle-apex

    arrays - Replacing a char value in a string (Java) -



    arrays - Replacing a char value in a string (Java) -

    in assignment need output:

    enter word: house letter want replace?: e letter wish replace it? w new word housw.

    _____________________________________________.

    i got programme work code, need set while loops. here current code.

    string word = ""; scanner keyboard = new scanner(system.in);

    system.out.print("enter word: " + word); word = keyboard.nextline(); string readchar = null; system.out.print("what letter want replace?: "); readchar = keyboard.next(); string changechar; system.out.print("with letter wish replace it? "); changechar = keyboard.next(); keyboard.close(); system.out.println(word.replaceall(readchar, changechar)); system.out.println();

    i need create programme output this:

    enter word: house letter want replace?: a there no in house. letter want replace?: b there no in house. letter want replace?: e letter wish replace it? w new word housw.

    how while loop portray output?

    okay 1 possible way implement edited sec part of question:

    public static void main(string[] args) { string word = ""; scanner keyboard = new scanner(system.in); system.out.print("enter word: " + word); word = keyboard.nextline(); boolean done = false; do{ string readchar = null; system.out.print("what letter want replace?: "); readchar = keyboard.next(); if(word.contains(readchar)){ string changechar; system.out.print("with letter wish replace it? "); changechar = keyboard.next(); done = true; keyboard.close(); system.out.println(word.replace(readchar, changechar)); } } while(!done); }

    java arrays char

    javascript - Displaying data points from server side txt file on google graph -



    javascript - Displaying data points from server side txt file on google graph -

    i display retrieved info points server side text file on google graph. during research can retrieve info temps.txt file using $.get().

    i started learning javascript , may obvious missed.

    i can display sample google graph illustration datapoints.

    how can set 2 together? , below have both source files attempts far.

    getting datapoints:

    <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>load demo</title> <style> body { font-size: 16px; font-family: arial; } </style> <script src="//code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <script> var times = []; $.get('temps.txt', function(data) { times = data.split("\n"); var html = []; (var in times) { html.push(times[i] + '<br/>'); } html.push( times[0] * 3 ); $('body').append(html.join('')); }); </script> </html>

    showing graph:

    <html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["corechart"]}); google.setonloadcallback(drawchart); function drawchart() { var info = google.visualization.arraytodatatable([ ['hours', 'temperature'], ['18:00', 20.7], ['19:00', 21], ['20:00', 22.3], ['20:30', 22.5], ['21:00', 22.0], ['22:00', 21.6] ]); var options = { title: 'temperatuur grafiek', legend: { position: 'bottom' } }; var chart = new google.visualization.linechart(document.getelementbyid('chart_div')); chart.draw(data, options); } </script> </head> <body> <div id="chart_div" style="width: 700px; height: 400px;"></div> </body> </html>

    temps.txt file simple text file 1 measured value every hr first line 00:00 hrs 2nd line 01:00 hrs , on see below:

    15.3 16.4 16.7 18.8 ... etc

    well, this:

    function drawchart() { $.get('temps.txt', function(txt) { vals = txt.split("\n"); var hour= 0; var dataarr=[['hours', 'temperature']] for(var = 0; < vals.length;i++){ // build info array //add hr in 'hh:00' format , temperature value dataarr.push([('0'+hour).substring(-2)+':00', parsefloat(vals[i])]); hour+=1; } var info = google.visualization.arraytodatatable(dataarr) var options = { title: 'temperatuur grafiek', legend: { position: 'bottom' } }; var chart = new google.visualization.linechart(document.getelementbyid('chart_div')); chart.draw(data, options); }); }

    javascript jquery google-visualization