Posts

Showing posts from September, 2011

r - How do I add a chi-square test to a crosstab() function -

The code I'm using is: crosstab (variable1, variable2, weight , In my class example, a chi-squared test is included in crosstab. I ============= I think that there was a mistake in the code given to me, so I used the above crosstab code What can I do to get a Chesterchair exam below the table? Besides, there is a way to include it in this table, Not every time phi is calculated? I googled for cran descr Opened and I pressed CTRL + f and found where crosstab is located. I read the names of the argument and found that the chisq = FALSE and the description for it is called If true, the result of one square will be printed after the table.

ios - Change NavigationBar Tint/Colour to different values for each ViewController in a Navigation Stack -

Okay, this is a strange problem I'm not able to understand, and at least here, as far as I can get ... I have a new controller with 4 push segues, which is in the new view controllers. And I have to show the different colors of the navigation bar for each scene. What I see is override my first entry in the stamp in the VC, and then I am unable to update it since. In my presenting VC, I do this (to create bar bar / invisible bar). Navigation Controller Navigationbar setbackground image: [UIImage new] forBarMetrics: UIBarMetricsDefault]; Self.navigationController.navigationBar.shadowImage = [UIImage new]; [Self. Navigation Controller Navbarbar setback color color: [UIColor clearColor]]; Then in my pushed VC, I change the background color to a different color ... [self.navigationController.navigationBar setBackgroundColor: bgColor ]; When I press back to go to the VC presented, then the color of the vice-versa kept pushed ... Any thoughts ?? Oh dumb mistake...

How can i rotate the particular view landscape or portrait programatically in android? -

On Android, you can dynamically rotate special views in landscape or portrait mode. I am using this method setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); But it's going to be on the total layout landscapmode. But I want to look in special scenario mode. So, please tell me anyone. Thanks to all The following code that I used to display in Activity Landscape mode & lt; Activity Android: Screen Orientation = "Landscape" Android: configChanges = "orientation-keyboardHidden" android: name = "yourActivty" /> Change it to your requirement

How to limit the user can only play the guessing game only for 5 times but it is not the user attempts on guessing in Java? -

This question is already an answer here Is: 2 replies Here's my code : Package playthegame; Import java.util. *; Public class PlayTheGame {public static zero main (string [] args) {random random number = new random (); Int number togues; Int Numberoffries; Int numberoffification = 5; Int userInput; ArrayList & LT; Integer & gt; TheInputs = new ArrayList (); Scanner = new scanner (System.in); Int start = 0; Boolean Win Trekker = Wrong; Int temporary; While (0 == start) {numberToGuess = randomNumber.nextInt (10); UserInput = 0; NumberOfTries = 0; System.out.println ("Estimate number between 1 and 10:"); While (numberToGuess! = User Input & amp; NumberOffices & lt; numberOfLimit) {userInput = in.nextInt (); Temp = userInput; NumberOfTries ++; If (userInput == numberToGuess) {theInputs.add (userInput); System.out.println ("You Win! \ N"); System.out.println ("Estimate number is" + number breaks + "\ n"); System.o...

Avoid Auto Open When clicking in Kendo Multi Select -

केंडो मल्टीसेक्च ऑटो पूर्ण बॉक्स पर क्लिक करते समय स्वत: खुली कैसे अक्षम करें। जब मैं टाइप करना शुरू कर सकता हूं। आपको खुले घटना को अवरुद्ध करना चाहिए, टाइप किए गए पाठ की लंबाई के लिए जांचें और यदि यह है 0 फिर से आह्वान करें preventDefault । "स्निपेट-कोड-जेएस लैंग-जेएस प्रायश्चित प्रिंट-ओवरराइड"> $ ("# आवश्यक")। केंडो मल्टी सिलेक्ट ({खुला: फ़ंक्शन (ई) {var len = this.input.val ()। लंबाई; यदि ( Len == 0) {e.preventDefault ();}}}) & lt; link href = "Http://cdn.kendostatic.com/2014.2.1008/styles/kendo.common.min.css" rel = "स्टाइलशीट" / & gt; & Lt; link href = "http://cdn.kendostatic.com/2014.2.1008/styles/kendo.default.min.css" rel = "स्टाइलशीट" / & gt; & Lt; script src = "http://cdn.kendostatic.com/2014.2.1008/js/jquery.min.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; script src = "http://cdn.kendostatic.com/2014.2.1008/js/kendo.all.min.js" & gt; ...

android - Fragment and Service are working with same resources -

I am creating an Android app in which a user can work with small images in the app Backend (parse.com) is where images are located, so I can add and delete some images. The client side is stored on SD (files) in the image and has a skeleton table where the filespace is located. There is a piece in the app that takes all the available images and shows them in the gridview with the imageview. I am using the SQLiteCursorLoader / CursorAdapter to get FilePaths and then just load the bitmap into ImageViews. Also I have IntentService, sync images with backend by timer. Its loads and SDs save new images and delete files of images, which were deleted. It also modifies SQL Tables with file paths of images. The problem is: IntentService can start its work at the same time when the user works with fragmentation. The user can choose an email, which has already been removed from the intent service. Does the fragment (or other data consumers) have any possibility of intasive service to ...

Should you put HTML code in your JavaScript or call it from the server? -

I am working on a system that uses liter API to create a map that shows data. I can put a control bar on the map, allowing me to interact with the map. The content of this control bar is HTML Now, my question: Should I create HTML of this control bar in Javascript that is sent to the client, or do I have to use my ASP.NET controller Call the control bar with an AJAX call? ? Some professional and cons of each approach: If I create a control bar in Javascript, then my JS file will become a messier. By placing the control bar in many HTML ASP.Net pages, HTML and Javascript will be released, which is a positive thing for me. It saves a request to the server, because the code is already sent with JS files to create control bar. Putting it into an ASP.NET page means that the JS file is small, but the application needs to make an additional call on the server to get the control bar. There is no such situation where there is no control panel on the map, so calling the server ...

assembly - How to make an executable ELF file in Linux using a hex editor? -

Just curious this is not a very good solution for obvious programming, but says I'm Blesse Editor) wanted to make executable. What is my architecture x86 is a very simple program I can do? Hello world? An infinite loop? Similar to the question, but in linux. As stated in my comment, you will essentially write your own eligibility for executable -The header is destroying unnecessary sections. There are still many essential classes to explain this process in the documentation. For fun, here are some examples: equal to / bin / true (45 bytes): 00000000 7F 45 4c 46 01 00 00 00 00 00 00 00 00 00 24 25. Aleph .......... I% 00000010 02 00 03 00 1 A 0049 25 1a 0049 25 04 00 00 00. ...... I% .. I% .... | 00000020 5BFF2AE 40 225FFB CD 8020 00 01 | [_ .. _ "... ... .. 0000002d Your classic 'Hello World!' (160 bytes): 00000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 | Elf ........... | 00000010 02 00 03 00 01 00 00 00 74 80 04 08 34 00 00 00 ........

java - Automatically authenticate AD user (who is already logged in on tomcat application) in IIS application -

I have two applications running on an IIS and the second is on Tomcat, both applications certify users through Active Directory are doing. At present users must provide them in order to use both their domain, username and password separately. What do I want - if the user logs into the Tomcat application using Admin details, then we will show a button in this application that our IIS application is already on the other tab (already done) And in that IIS application, this user will not be required to log in again using the AD details (this should be logged in automatically). As it has already used to login in another application (Tommack Application). Is this possible? If so, please let me know how I can get it. You want Kerberos built in IIS, available for Tomcat: (Yes, I am its author and It works great in a multimedia environment.)

ios - Present UINavigationViewController with UIViewController pushed (only showing one animation) -

मेरे पास एक UINavigationViewController है जिसमें रूट दृश्य के रूप में UITableViewController है । जब उपयोगकर्ता एक सेल का चयन करता है तो UIViewController को अंदर धकेल दिया जाता है। मेरे मुख्य UIViewController एक बटन है जो UINavigationViewController Modally, लेकिन मेरे पास एक और बटन है जिसे मैं सीधे UINavigationViewController के धक्का दिया UIViewController में जाने के लिए उपयोग करना चाहता हूं। निम्न कोड का उपयोग करके दोनों एनिमेशन दिखाए जाते हैं, UINavigationViewController पहले होता है, और जब UIViewController पूरा हो जाता है। UIStoryboard * mainStoryboard = [UIStoryboard storyboardWithName : @ "मेनस्टोरीबोर्ड" बंडल: शून्य]; UINavigationController * navController = [मुख्य स्टायरीबोर्ड तत्काल दृश्यकंट्रोलरविद पहचानकर्ता: @ "सेटिंग्सनैविगेशन नियंत्रक"]; UIViewController * viewController = [मुख्यस्टोरीबोर्ड तत्काल दृश्यकंट्रोलरविद्युतकर्ता: @ "माइइन्फ़ोइव्यूकंट्रोलर"]; [आत्म वर्तमान ViewController: नव नियंत्रक एनिमेटेड: हाँ पूरा: ^ {...

debugging - C++: Scoping issues when using a debug variable for a program -

I am writing a program, where I want to easily turn my debug code on / off. This program is not a production level - it is for a programming contest. I have only one file, main.cpp , so I thought the debug variable could be acceptable. I consider using a global variable, as follows: bool DEBUG = true; Int main () {if the debug} {// print debug statements and other debug code} // The rest of the program ... However, I get a warning that my DEBUG variable is never used and if (DEBUG) is always evaluated for false. Alternatively, I use the main () method Inside your DEBUG variable: int main () {bool DEBUG = true; If the (debug) {// print debug statement and other debug code} // the rest of the program ... But then I get a compiler warning 'the condition is always true . Any suggestions on how to easily turn my DEBUG` code on / off? An explanation for compiler issues would be great. Generally, the pre-processor is using # Ifndef NDEBUG // debug code ...

ajax - get statusCode inside jQuery load event handler -

Markup code: I am using jQuery's AJAX event 'Load' H1> & lt; Iframe id = "my_iframe" src = "http: // somewhere" & gt; & Lt; / Iframe & gt; jQuery code: $ (function () {$ ('# my_frame'). Load (function (data) {// content load Maybe 404/500 here or else. If (statusCode == 400) {// do something.} Else {// do something else}}}}}}); question I have to obtain the status code in my weight event callback. Maybe get the jqxhr object? Is this possible? And, I can manually change the src attribute of the iframe, which will also trigger the load event, it seems that this is not an AJAX call. First of all, it is usually iframes . & lt; Div & gt; By using the element you should be able to meet all your requirements. HTML: & lt; Div id = "dynamic page" & gt; Loading ... & lt; / Div & gt; Javascript: $ ("#dynamic page") Load ("http: // ...

php - How to implement a filter by shipping method in woocommerce backend? -

I need to apply a filter in the woocommerce backend, which I use to filter the order by the selected shipping method. Can i / P> I can create a filter on custom fields and change the query, but the problem is that woocommerce stores the shipping method in the DB custom table. How to get it to filter any signal? I resolved to add a dropdown menu using this hook: add_action ('restrict_manage_posts', 'display_shipping_dropdown'); And then used this hook to extend this section: add_filter ('posts_where', 'admin_shipping_filter', 10, 2) ; Function admin_shipping_filter ($ where, and $ wp_query) {global $ pagenow; $ Method = $ _GET ['shipping_filter']; If (is_admin () and $ pagenow == 'edit.php' & amp; amp; $ wp_query-> query_vars ['post_type'] == 'shop_order' & amp; amp; amp; blank ($ method) {$ $ = $ Global ['wpdb'] - & gt; Ready ('SELECT order_id wp_woocommerce_order_items WH...

php - Laravel Get all realated models with scope -

I've been stuck for some days trying to get something I think should really be simple, but I I am not able to find the right solution, I have the following models (just printing important methods) order id Created_at Communications ID order_id I have an opportunity in order scopeByRange ( $ Query, $ d1, $ D2) {return $ query- & gt; Where between ('created', [$ d1, $ d2])} which works perfectly, what do I have to achieve $ OrderContents = order :: byRange ($ d1, $ d2) - & gt; AllOrderContents; So I do not have to make an attempt to merge and merge the collections Is there any way? Thanks to @Jarek Tuckzezky for pointing me in the right direction, my last job is the following, Just do something extra calculation for the report Public stable work by datrerence ($ d1, $ d2) {$ orderContents = null; Order :: By Date Rate ($ d1, $ d2) - & gt; (Use the ['contents' = & gt; function ($ q) (& amp; $ order content) ...

ios - iCloud Documents not visible -

I am trying to use iCloud documents to store XML files from your iOS app have everything worked fine My app's files are not included in iCloud.com (Icloud.com) and neither in developer.icloud.com nor iCloud Drive folder on my Windows PC except by doing (I can write and read files without errors) Are visible in I was running the app in the simulator and tested with testflights on a real device. I have the latest version of iCloud installed for Windows 4.0. The app is built in Xcode 6. Do anyone know how files look in Iclyde documents? The code that I am using to save the file: NSLog (@ "Sync with iCloud"); NSURL * ubiq = [filemgr URLForUbiquityContainerIdentifier: zero]; If (ubiq) {NSURL * Universal Package = [ubiq URLByAppendingPathComponent: @ "Document" is Directory: Yes]; If ([filemgr Failvistaraattpath: [universal package path]] == not [file MRR Bnaaadiroritiattuarel: Sathintrmeedet ubiquitous package directories: Yes Features: zero error: zero]; ...

c# - How to enable Wcf help page with basicHttpBinding (SOAP, not REST) -

मैं अपने WCF में WCF सेवा सहायता पृष्ठ सक्षम करने का प्रयास कर रहा / रही हूं सेवा, लेकिन कोई भी प्रयास नहीं हुआ, लिंक & lt; ..... {servicename} .svc / help & gt; लिंक के तहत सेवा के तरीकों के विवरण के साथ कोई उपलब्ध सहायता पृष्ठ नहीं मिला मैंने बिना कोई परिणाम प्राप्त करने में कामयाब रहा। basicHttpBinding मेरी WCF सेवा होस्ट की गई है Asp.net अनुप्रयोग में we.config से मेरा wcf कॉन्फ़िगरेशन अनुभाग है: & lt; servicebeavaries & gt ; & Lt; व्यवहार नाम = "" & gt; & Lt; serviceMetadata httpGetEnabled = "true" httpsGetEnabled = "true" / & gt; & Lt; सेवाडाइबग में शामिल हैं अपवाद डेशियल इन्स्टाइन = "झूठे" / & gt; & Lt; / व्यवहार & gt; & Lt; व्यवहार नाम = "EcoscadaApi" & gt; & Lt; serviceMetadata httpGetEnabled = "true" httpsGetEnabled = "true" httpGetUrl = "" / & gt; & Lt; सेवा दिबग में शामिल हैं ExceptionDetailInFault...

angularjs - ng-src throws a 404 because my img is not set yet -

I have an image that has an image (for a preview), only when shown in an image source set Ho. My problem is that I get 404 because there is no image set in the beginning. & lt; Div ng-show = "imgSrc" class = "preview" & gt; & Lt; Div class = "menu" & gt; & Lt; A ng-click = "imgSrc = false" class = "btn btn-primary" & gt; & Lt; I class = "fa-ef-times" & gt; & Lt; / I & gt; Close & lt; / A & gt; & Lt; One class = "btn btn-primary" href = "{{imgSrc}}" & gt; & Lt; I class = "fa fa-download" & gt; & Lt; / I & gt; Download & lt; / A & gt; & Lt; Img ng-src = "{{imgSrc}}" /> / * & Lt; --------------------- here * / & lt; / Div & gt; Is this a good way to do it? Or should I remove the image tag, and when an IMG is set it should be added? In this case, how can I add elements? 404 means that...

odata - ODataModel aggregation's getBindingContext() returns undefined -

मेरे पास एक sap.m.VBox नियंत्रण है, जिसमें से आइटम एकत्रीकरण एक ओडाटा मॉडेल डाटासेट के लिए बाध्य है, और जैसे कि sap.m.HBox टेम्पलेट नियंत्रण में एकाधिक sap.m.Input नियंत्रण (जो कि संबंधित ODataModel के डाटासेट गुणों के लिए बाध्य) कोड में: & lt; VBox आइटम = "{/ My_odatamodel_Dataset}" & gt ; & LT; आइटम & gt; & LT; HBox & gt; & Lt; इनपुट मान = "{property1} change =" doSomething "/ & gt; & lt; इनपुट मान =" {property2} change = "doSomething" / & gt; & Lt; इनपुट मान = "{property3} change =" doSomething "/> gt; & lt; / hbox & gt; & lt; / vbox & gt; (ओडाटा डेटासेट में एक फिल्टर है आवेदन किया है, लेकिन संक्षेप में इसे छोड़ दिया है) इस तरह से परिणामस्वरूप इन प्रविष्टियों के लिए इनपुट फ़ील्ड वाले एचबीक्स के कई पंक्तियों (मेरे ओडाटा सेट में प्रत्येक प्रविष्टि के लिए एक) के साथ एक VBox होगा। मेरे नियंत्रक में, मेरे पास doSomething विधि है: doSomething: ...

c++ - Linux Daemon not working -

I created a daemon for Linux in C ++, however, the child process is not doing anything. Once it reaches the (pid & gt; 0) statement, everything is closing the code for Daemon.Start () as follows: // Process ID and session ID Pid_t pid, sid; // Close the original process pid = fork (); If (PID & lt; 0) exit (EXIT_FAILURE); // If PID is good, then exit the parent process (PID & gt; 0) (EXIT_SUCCESS); // Change the file mode umask mode (0); // Create a new SID for the hair process sid = setsid (); If (SID & lt; 0) {exit (EXIT_FAILURE); } // Change the current working directory if ((chdir ("/")) Any help would be great! :) I'm pretty sure that your child's process is either sid & lt; 0 or chdir ("/") & lt; 0 If the statement tells you what is the problem before writing stderr in these cases: // Create a new SID for the hair process sid = setid (); If (sid To get you wrong and strerror, & lt; Errno.h & gt;...

My Python code takes too long to compute! Can I use numpy to calculate this faster? If so, how? -

I aim to calculate the motion of the planets using the Verlet algorithm. The problem is, the code takes approximately 30 minutes to complete the whole cycle. This is basic calculation so I do not know why it is taking so long I have read a bit around and using numpy Need to be fast? How can I apply it? Also, this full circle is coming and should stop at 0 (or 2 * pi * r_earth , if this distance is counted, it stops) grav = 6.673481 * (10 * * -11) 11 6.673481e- # = # A direct path m_sun = 1.989 * (10 ** 30) # = 1.989e + 30 m_earth = 5.972 * (10 ** 24) # = 5.972e + 24 r_earth = 14 9.59, 787 * (10 ** 9) # = 1.4959787e + 11 def verlet_v (prev_v, prev_f, mass): current_v = (prev_v + (prev_f / month)) print "new velocity:% f"% return current_v current_v def verlet_x (prev_x, Current_v) : Current_x = prev_ X + current_v print "new position:% f"% current_x return current_x verlet_v (20, 50, 3) v = 29.8 * (10 ** 3) # = 2. 9 8 + 04 x = 0 f = (-grav * (Abb...

objective c - IOS8 Push Notifications -

I'm trying any registered iPad for push notifications without luck. I have tried the following code but received an error on the iOS 8 "RegisterForremote Notification Type: IOS 8.0 and later is not supported." Although its work is fine on iOS7. - (BOOL) application: (UIApplication *) FinishLaunchingWithOptions the application: (NSDictionary *) Launch Option {CGRect screen Bounds = [[UScreen main screen] limit]; If ([[[Uaidiwais current device] system immersion] float value]> gt; = 8.0) {Anselog (@ "++++++++++++++"); [[UIApplication shared application] Register user notification settings: [UIUserNotificationSettings SettingsForTypes: (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories: zero]]; [[UIApplication shared applicant] registerForRemoteNotifications]; } And {nslog (@ "============"); [[UIApplication Sajaanupryog] Rjistrformotiteshn follows: (UIUserNotificationTypeBadge | UIUserNotificati...

java - Projects which are accessed via multiple (different) IDEs: Ant or Maven? -

Is it true that Maven's real advantage is that its project structure is clearly defined and therefore it should be opened. Could any IDE support Maven? We develop a team of 5 people and we use three different IDEs (Intellees, Eclipse, Netbeans). I know that I can not open Eclipse an ant project in Netbeans but with Maven it is possible. Is it really reason enough to use Maven? Ante is the creation tool when the functionality of Maven accumulates: Construction equipment (included ant), Not only jar / war / project etc The order environment (such as starting a jetty and deploying its artifact) Unit Testing Li> Integration test Deployment (incrementing, incrementing versions, deploying artifacts etc.) More (see t for plugins on i-ne) Maven uses the lifestyle to achieve this goal. You can trigger some functionality at some points of the lifecycle. For example, the unit test should work fine after compiling, whereas integration testing ...

Create new dataframe column based on other column in R -

I have looked at similar posts but I have not got anything to work with. I have a column with 1,2,3,4,5 characters to answer the questions, I need a new column, when the reaction is 1 or 2, no new column Occurs when the reaction is 3, the new column is partially, when the reaction is 4 or 5, the rest is NA. data.frame ': 405 of 1 variable: $ SQ023A: chr "-3" "-3" "-3" "-3" ... (this -1, - 2, -3, -4, 1, 2, 3, 4, 5, Yes, no, partially) The new column yes, no partially answered but With numbers 4 and 5 with Yes and partially 3. test $ sq23 & lt; - ifelse ("4" | "5", sq23 $ SQ23A), "yes", ifelse (("1" | "2", sq23 $ sq23a) , "no", ifelse Ifelse ("3", sq23 $ SQ23A, "partially", "NA")) test $ sq23 & lt; - c ("no" , "no", "partial", "yes", "yes") in the form of. Numeric (sq23 $ sq2...

javascript - How to ignore requestAnimationFrame in browsers which don't support it -

Assume that we have a feature / module, which increases a website so it is not really necessary and it I use the requestAnimationFrame , which is like IE8 / 9, I could have polyphil requestAnimationFrame , but because it is only an increase, the old browser should ignore it. The code of this module looks more or less like this: ; {Function (window, document, undefined) {'strict use'; // example module // constructor function module, option) {// ...} Module.prototype = {init: function () {// if requestAnimationFrame Not supported, a warning warning ("init") should be popped up;}, method: function () {/ if the request animationfreck is not supported, then alert any warning ("Start");}}; Window.Module = Module;} (window, document) should pop up; Then I can create a new example var example = new module (document.getElementById ('test')); and "interact with" instance.init (); Instance.method (); The problem with this code ...

ruby - Rake / Rspec: How to suppress / quiet / silent the first output line showing the command with --pattern ? -

समस्या: अगर मैं ServerSpec चलाता हूं ( RSpec ) के माध्यम से Rake निम्न में से एक आज्ञा के साथ: rake Rake spec: rake spec: all rake spec: & lt; host & gt; bundle exec rake ... रेक को stdout पर कार्यान्वित करने से पहले उसे प्रिंट करता है सर्वरपेक आउटपुट: /usr/bin/ruby1.9.1 -i / var / lib / रत्न / 1.9.1 / रत्न / rspec-core-3.1.6 / lib: / var / lib /gems/1.9.1/gems/rspec-support-3.1.2/लिब /var/lib/gems/1.9.1/gems/rspec-core-3.1.6/exe/rspec --pattern spec / & lt; host & gt ; / \ * _ Spec.rb अगर मैं लक्षित होस्ट मैन्युअल रूप से rspec को इस तरह से पास करता हूं ... TARGET_HOST = & LT; मेजबान & gt; Rspec ... लाइन नहीं दिखाई देती है। प्रश्न: मैं कैसे राक इस लाइन / कमांड को आउटपुट करने से मैं serverpec-init द्वारा उत्पन्न डिफ़ॉल्ट रैकफाइल का उपयोग कर रहा हूं। 'rake' की आवश्यकता होती है 'rspec / core / rake_task' कार्य: spec = & gt; 'Spec: all' कार्य: डिफ़ॉल्ट = & gt; : स्प...

android - Audiomanager.abandonAudioFocus doesn't resume playing -

I Audio Player'm trying to silence, while there is a phrase spoken by the text-to-speech system. Audio supervisor, as is required, the amount is requested when audio focus decreases, but called Odiyo focus on movement, so the volume is not restored and no callback Odiyo focus to leave the This is my code: Private Class SpeakRunnable Tools Runnabel {String mText; Public speech (lesson of letters) {mText = text; } @ Override Public Wide Run () {stream_volume = am.getStreamVolume (AudioManager.STREAM_MUSIC); am.requestAudioFocus (New OnAudioFocusChangeListener () {@Override public void onAudioFocusChange (integer focusChange) {// if the focus ..... HashMap of & lt Czech, string, string & gt; parameter = new HashMap & LT; string, string & gt; (); parameters. put (TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, "no"); talker.speak (MTEXT, TextToSpeech.QUEUE_ADD, parameters);}}, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); }} ...

parent window iframe element trigger click by simple JavaScript -

In the iframe element of the parent window it is necessary to trigger the occurrence of simple javascript clicking. Original Window & lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-language" content = "n" /> & Lt; Title & gt; Main window & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Iframe scrolling = "auto" src = "html_test.php" & gt; & Lt; / Iframe & gt; & Lt; Button onclick = 'window.open ("child.html") & gt; Open window & lt; / Button & gt; & Lt; / Body & gt; & Lt; / Html & gt; hair window & lt; Script type = "text / javascript" & gt; . Click on window.opener.document.getElementsByTagName ('iframe') [0] .document.getElementById ('main_tab') (); & Lt; / Script & gt; But onload child window gets this JavaScript error: type erro...

Paraview: Can I annotate sources via python scripts? -

I'm looking at a 3D dataset in Pariquique and marked surface with an object (for example cone) I want to annotate the places and comment them with the text I want to do it through the Python script. The cone is not a problem but the source text and a3DText have no property for the location Answer: / P> Do you know any such way how can I do this? Answer: After creating a 3D text source, you can show it , then the position property can be changed: renderView1 = GetActiveViewOrCreate ('RenderView') text = a3DText () textDisplay = show (text, renderView1) textDisplay.Position = [1,1,0] I found a method that exploits the representation properties ( Tools - Start Trace Source - 3D Text Make sure you are viewing it In the 3dtext property panel, Advanced I also modify the scale because it is my object's value. Too large Tools -stop trace: You can see chorus Python dragon instructions

python - Need help on a simple quiz with random answers -

This is my code, why would not it work for me? This question asks, but if I made, I remembered from that time. print ("what is your name?") Name = input ("") import time time.sleep (1) print ("hello", name, (", in my quiz Welcome ")) Import time. Sleep (1) import random questions [['2 times 2 what is?', '10 is what (7) '6 times 2?'] Print (random. Chouse (question)) Please note that if there are statements So if == ('2 times 2 will happen?'): Print ("What is the answer?") Answer = Input ("") If ans == '4': Print ("true") Second: Print ("wrong") elif ques == ('10x7? '): Print ("what is the answer?") Answer = Input ("") if ans ==' 70 ': print ("true") other : Print ("wrong") elif ques == ('what happens 6 times 2?'): Print ("What is the answer Land? ") Ans = input (" ") if ans == ...

c# - IronPython ArgumentTypeException custom class -

I'm just starting with IronPython and I have some difficulties using my .NET dll I found the assemblyA reference assemblyB with two assemblies assembly A and assembly B . In each assembly, I have a class with such prototype: assembly A Nameshree assembly by using assembly {public class} {private assembly B. class B Property; Public Assembly B class B property {get; Set;}}} assembly namespace assembly {public class} {private double variables; In my code, I load the first two assemblies: import clr clr.AddReferenceToFileAndPath (r) 'C: \ user \ i \ document \ ..... \ assemblyA.dll' ) Clr.AddReferenceToFileAndPath (r'C: \ user \ me \ document \ ..... \ assemblyB.dll ') import assembly import assemblyB clA = assemblyA.classA () #ok clb = assemblyB.classB () #ok clA .Prop = clB # Error: Expected class B, class B clap found. Prop = assembly b. Class B () # Corresponding error Any suggestions on how to fix this issue? I think because assembly...

c# - Is there a way how to check if the operation is valid before is called? -

Is there any way to know how this statement is valid before saying the statement? For example, when you are trying to delete the column which is not present or when you are trying to delete the record that is connected to the foreign key and you remove it To refuse. Click on some such parse (Ctrl + F5) button, but it is said by the code (ideally it is possible to call by calling the C # code.) Something like this Exec sp_canIdoIt ("SQL statement"). The shortcut does not help much. I really would like to be able to call the database and make sure that it will not give me an error. I think, perhaps, then thinking about this wrong. A SqlException can be controlled from a try-catch block, why to test the validity of some to execute strange psuedo logic Instead of not just handle the error case? You can do your work which gives success status based on your error. If you get the connection.Open () on SqlException , then your database inaccessi...

Get minimum value in linq query -

I am using entity framework for my DB access. An institution is a product, and a product can have many conditions. Here is the Term Class: Public Partial Class Duration {Public Short ID {get; Set; } Public Small ProductID {get; Set; } Public Byte TermSegmentID {get; Set; } Receive public byte minute {sec; Set; } Public Byte MaxTerm {get; Set; } Public Virtual Product Product {Received; Set; }} After selecting a list of all my products, I am trying to return a minimum price in the minimum price - this is the lowest value for all products, each One not Can anyone help? It is proving difficult for my limited knowledge. Thanks in advance. What is the product has a terms property ? If so, it is very easy: var minMinTerm = products.SelectMany (product => product word) .minin (words = & gt; word. Termarm); SelectMany method A sequence of "Conv." - then you end up with a sequence of words, logically combining combinations of each rule sequenc...

entity framework - An existing connection was forcibly closed by the remote host. in WCF using database first approach -

I want to display data in a table format by combining two table 'user' and 'company' with foreign key I am trying to relate Public Carrier Index () var Model = New UserModel (); Model.Users = db.Users .OrderBy (o => o. crated bye). Include (C = & gt; C. Companie) .Oolist (); See Return (Model); Try ({Production Candidates DB = New Production Entity} {db.configuration.LazyLoadingEnabled = False; Db.configuration.ProxyCreationEnabled = false; IQueryable & LT; Users & gt; _users = db.Users. Orderby (o => O. Crated By). Include (C => C. Companie); Return _Users .Olist (); }} Hold (exception before) {exception data exception data = new exception data (); ExceptionData.ErrorMessage = "Error in GetUsersList"; ExceptionData.ErrorDetails = ex.ToString (); New fault mode & lt; ExceptionData & gt; (ExceptionData, ex.Message); }} down stack trace Inner exception: InnerException: System.Net.WebException HRESULT = -2146233...

javascript - How to display LinkedIn Sign In button? -

Image
I am trying to create a linked login on my () website, for this I am following the steps I get here : I followed the steps from 1 to 4, but I got a little bit stuck there. I currently have the following code: & lt ;! DOCTYPE html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" src = "http://platform.linkedin.com/in.js" & gt; Api_key: "7762qdzr8qe7db"; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1 & gt; Sign in with LinkedIn & lt; / H1> & Lt; Script type = "in / login" & gt; Hello, & lt ;? Js = firstName? & Gt; & Lt ;? Js = lastName? & Gt ;. & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt; It is supposed to show the sign in with LinkedIn button, but I do not see anything at all. I'm running it on the local host (URL http: //127.0.0.1.1000 / Linkedin ), but during development, ...

Azure AD Sign In Page without Domain Name -

Has anyone found a way to use Azur Edi Sign in Page without a domain name? For example, Oscar instead of oscar@tenant.onmicrosoft.com. I am already aware of using the "login_hint" parameter; However, I do not want to see the user at all "@ tenant.onmicrosoft.com". I think this will get confused. Besides, I want to avoid creating a custom page & amp; Accessing user names / passwords by typing user credentials and using the AcquireToken method. See for reasons. Domain name (@ tenant.onmicrosoft.com) is going to be a deal breaker for my employer. They do not want to see it and I can understand why. There is no way to avoid @domain with login on Azure AD use. However, you are not forced to use @ tenant.onmicrsoft.com - you can freely send users to @ mycompany.com Can login from. You have to think of your employer in the 21st century, not in the middle of initial internet access.

c# - Get radio button value -

I have tried to get the radio button value from the windows store application form, but the errors shown here are as follows, And im using Visual Studio 2013 and XML. Private Zero addButton_Click (Object Sender, RoutedEventArgs E) {try {string gender = null; If (malereadbutton ISI has been checked) (MadRDO button has been checked) {gender = Narroday button. Checked? "Male females"; } Entering into string query = @ "` bcasdb` .`tbl_student` (`reg_id`,` std_fname`, `std_lname`,` tbl_batch_batch_id`, `gender`) values ​​(@regId, @fName, @lName, @bID, @gender) "; // This is the command class which will handle the query and the connection object. MySqlConnection conn = New MySqlConnection (BCASApp.DataModel.DB_CON.connection); MySqlCommand CMD = New MySqlCommand (query, conn); Conn.Open (); Cmd.Parameters.AddWithValue ("@ regId", this.regIDInput.Text); Cmd.Parameters.AddWithValue ("@FName", this.fnameInput.Text); Cmd.Parameters.AddWithValue (...

java - Is correct my architecture of test engine? -

I'm learning a test engine.1 question, 4 possible exploration I have 107 questions. To change the question I clearly intend for another activity. Is It Normal Have I Made 107 Activities? What is right? Is there a simple and effective way? Package com.example.examtest; Import android.app.activity; Import android.content.Intent; Import android.graphics.color; Importroid.os.Bundle; Import android.view.Menu; Import android.view.MenuInflater; Import android.view.MenuItem; Import android.view.View; Import android.view.ViewGroup; Import android.widget.Button; Import android.widget.RadioButton; Import android.widget.RadioGroup; Import android.widget.TextView; Import android.widget.Toast; / ** * @ Author Joan Elmo * * / Public Class enhances main activity activity {@ override protected zero on crate (bundled saved instenstate) {super. Nc (saved instenstate); SetContentView (R.layout.activity_main); / ** SI Recife false cara La app * / if (getIntent (). GetBooleanExtra ("XIT...

C++ Using "putchar" to output a word in Binary -

मेरा फ़ंक्शन: शून्य आउटपुट (int word) {file & lt; & lt; पुच्चर ((शब्द & gt; 24) & amp; 0xff); फ़ाइल & lt; & lt; पुच्चर ((शब्द & gt; & gt; 16) & amp; 0xff); फ़ाइल & lt; & lt; पुच्चर ((शब्द & gt; 8) & amp; 0xff); फ़ाइल & lt; & lt; पुच्चर (शब्द और 0xff); } जहां "फाइल" का उपयोग फास्ट्रीम का उपयोग बाइनरी को पुच्चर से "बाइनरी.बीन" नामक फ़ाइल में आउटपुट करने के लिए करता है। जब "शब्द" 1 है, तो द्विआधारी का द्विआधारी प्रतिनिधित्व है। बीबी 00110000 00110000 00110000 00110001 है। यह 00000000 00000000 00000000 00000001 होना चाहिए था। (नोट: एक शब्द 32 बिट है) 00110000 00110000 00110000 00110001 0001 (30 30 30 31) का आस्की प्रतिनिधित्व है। क्या गलत हो गया? समस्या ऑपरेटर & lt; & lt; है। स्ट्रीम प्रविष्टि ऑपरेटर को उसके इनपुट को टेक्स्ट प्रारूप में कनवर्ट करने और स्ट्रीम में स्वरूपित पाठ पास करने के लिए डिज़ाइन किया गया है। फ़ाइल & lt; & lt; पुच्चर ((शब्द & gt; 24) ...

android - "Don't play soundPool because of a recording" on LG phone -

I have an app where it records via audio recordcards and plays sound via the same time: play (int soundID , Left left floume, float right volume, int priority, int loop, float rate) Audio record will be about one minute, and during this time many small sounds from the sound will last approximately 2 seconds. All sounds are already full. And everything works as expected on the device (like the Galaxy S3; Nexus 7 device). But when the exact code has been tested on LG-P875 (maybe modern as Android 2 and Android 4.1+), I get a message: "Do not play soundtrack because of the recording". It comes from a SoundPool filter. The same code for SoundPool, without recording, is running on an LG-P875, plays seems OK. It's just an issue with sound recording and recording on a LG phone. I appreciate any thoughts or guidelines that find the basic source of the problem / problem to find. I hope there are many devices similar to the LG-P875, where this error occurs. Thank you....

javascript - Incorporate offline bible in phonegap app? -

Can you give some ideas about including the offline Bible in a phone inter-based app? Future bookmarks of chapters and verses may be required. How can I go about doing this to be a local json file? But I think that does not seem to get a Jason. The KJV Bible search is also not certain how to make a JSN approach scalable to bookmark any ideas? The entire text is only, which means that there should be no problem loading it when your app If finished, full text in memory. And then, to bookmark JSON for bookmarking - how the Bible has been prepared is because the nested hash / arrow lookup is: var bible = {origin: [ // The first chapter, "In the beginning God created heaven and earth.", "And the earth was without form or void, and the darkness was on the deep face. And the Spirit of God, water", ..., [... ] Second chapter "Thus the heavens and the earth were finished, and they all hosted." "And on the seventh day God finished his work, which he...

ios - Passing information back from UITableViewDataSource to ViewController -

I have ViewController with a UITableView as I wanted to divide data handling, I prepared my class, Who responds to the UITWAdAdvertisers. This class should first get data from CoreData and later from a REST API. How did the datasource talk back to the ViewController to tell it to reload the tableView to call the data? Thought of: Data sources data KVO and when the array changes call reloadData Datasource is assigned every time Datasource is assigned with a block ( [self.table reloadData] ), in the data source Table Make the property public ViewController therefore datasource reloadData (which I can not really like as an idea) A property on datasource A representative (which I feel like a loop), which can hold visual controller to use as a table, Is there any smart way to do this? ? Or how to solve it in a normal way? Update: I am not interested in code. Without more detail, it seems that you need a callback here. There are several ways that wil...

sql server - how to create a code for IP-address locator which takes IP-address from a table in database -

I am working on a project that collects the user's IP address and stores them in the database. I want to know the methods or methods from which I can track these IPs and produce their geographic latitude and longitude details. I do not want to create a website or an app ... I just want to work locally on my system I do not think you can do directly in T-SQL, but you can use CLR with C # You can use (var objClient = new System.Net.WebClient ()) {var strFile = objClient.DownloadString ("http://freegeoip.net/xml/192.168. 0.1 "); } View

Javascript, Can I get to another functions child -

यहाँ एक उदाहरण है। फ़ंक्शन parentOne () {// कुछ समारोह ChildOne (){ // कुछ करो }; }; फ़ंक्शन parentTwo () {// मैं यहाँ से ChildOne () में डेटा कैसे इनपुट कर सकता हूं? }; मैं एक बग ठीक करने की कोशिश कर रहा हूँ माता-पिता केवल एक बार काम करेंगे, एक ही हिट हो गया है। क्योंकि जब मेरे बच्चे में बच्चे को मारा जाता है तो यह दिशा एपीआई शुरू करता है। इसके बाद मैं माता-पिता का उपयोग अपने फॉर्म में या मूल्य से बदलने के लिए कर सकता हूं और यह सबमिट करेगा। इसकी व्याख्या करना कठिन है, लेकिन मुझे माता-पिता की जरूरत है बच्चे को दो-एक करने के लिए यदि एक उपयोगकर्ता पहले माता-पिता के कार्य के माध्यम से ऐसा नहीं करता है तो मुझे जावास्क्रिप्ट पता है लेकिन मैंने कभी ऐसा नहीं करने की कोशिश की है और अगर मुझे लगता है कि मुझे कुछ गड़बड़ है आप माता-पिता को फ़ैक्ट्री को कॉल कर सकते हैं जो कि एक फ़ंक्शन (चाइल्डऑन) बनाता है लेकिन आपको इसे थोड़ा-बहुत लिखना होगा। फ़ंक्शन parentOne () {// कुछ वापसी समारोह childOne () {// कुछ वापसी 'x'; }; }; फ़ंक्शन parentTwo () {// मैं यहाँ से ChildOne () मे...

javascript - I am trying to manage a small number of users control of a webpage -

To begin, I have a raspberry Pi, a lighttp server running on the malt I have a webpage Which will include up to 10 people at a time. Each user will be given a "master" or "supervisor" tag. The webpage will contain controls that can only use "master". Just one major: I'm just learning most of this so that I can make something wrong about how to accomplish this. My basic idea is as when a user connects to the database, their IP address will be caught and inserted in a SQLite database with a user's tag and connection time. From there, I would be able to query the database for user tags when they tried to execute various commands. Whatever I use is very light and do not store cookies on user devices. There is currently JavaScript, it is probably not the most efficient, but I am planning to do this so that it looks good. This code is going to connect the database and user & lt; Script type = "text / javascript" src = ...

Decompiler supporting Java 8? -

I see that most of the Java DeCompilers support up to Java 7. Is there a decampiler that supports Java 8 - especially Lambda Expressions? I want to run such a decompiler in my Ubuntu machine. and support both Java language languages ​​including lambda spend and method references.

mocha - How to test harmony / ES6 / ECMAScript 6 JavaScript? -

According to the title, I have some AMD modules written in ES6 JS, which are running from nodejs . I tried it before: Even after enabling - good faith in nodes, I ended up facing the internal reliance chain, where I had the similarity Was not able to enable istanbul , aspirima and others (I had opened one for it) Then I went ahead, and here I got trapped ... strange . I enable both harmony for nodes and motcha, here is the test code: package.json "test ":" Node - hormone nod_module \\ mocha \\ bin \\ मोचा टेस्ट्स - hormonie-recursive " that I get from npm test my_test_folder command prompt. Even so, some ES6 constructions (like const ) pass properly, but then they explode on the demolition work. Here are the first output lines: const {log, dir} = required ('../ consolelogger.js'); ^ Syntex error: Unexpected token in module._compile (Module JS: 43 9: 25) on object. (Module .js: 474: 10) [... is continuing ...] I have also checked a...

switch theme in javascript -

I try to switch to my subjects ... but it does not work. I want a default style (when I open the page), and I want to switch from , but I try it but it does not work: & lt; Link rel = "stylesheet" type = "text / css" href = "script / easyi / theme / dark / easy types? V = 20130 9 13" /> This is the topic for changing and changing: and my switch: & lt; Form action = "#" action = "post" & gt; & Lt; Select name = "select_box_chosen_color" id = "select_box_chosen_color" & gt; & Lt; Option value = "blue" & gt; Blue & lt; / Options & gt; & Lt; Option value = "orange" & gt; Yellow & lt; / Options & gt; & Lt; / Select & gt; & Lt; Input type = "submit" & gt; & Lt; / Form & gt; option 1: a CSS file value You need to use the jQuery only for the change on your select , change the CSS cla...

javascript - How to catch uncaught type errors -

मेरे पास मेरे jQuery के लिए निम्न प्रारंभ है: (फ़ंक्शन ($) {$ .widget ('ui.hbTags', {options: {availableTags: [], नोड: झूठी, टैग सूची: गलत, विद्यमान टैग: गलत, प्लेसहोल्डर: गलत, अजाक्स यूआरएल: गलत, मौजूदा यूआरएल: गलत, csrftoken: false}, हालांकि, मुझे uncaught typeerror अनिवार्य रूप से एक फ़ंक्शन नहीं लाइन 2 पर मिलता है। मुझे यह पता है क्योंकि ui.hb टैग तत्व नहीं है हर पृष्ठ, लेकिन मैं इस समस्या को कैसे रोकूं? मैं सिर्फ जांच करूँगा कि टैग पर पृष्ठ से पहले मैं विजेट को कॉल करता हूं। (फ़ंक्शन ($) {if ($ ('ui.hbTags')। लंबाई & gt; 0) {$ .widget ('ui.hbTags', {Options: {availableTags: [], नोड: झूठे, टैग सूची: झूठे, विद्यमान टैग: गलत, प्लेसहोल्डर: झूठी, अजाक्स यूआरएल: गलत, विद्यमानउरेल: झूठी, सीएसआरएफटीoken: गलत},

javascript - remove jquery elements that do not have a class -

Image
Hello can someone help me to get all the elements of jquery that do not have any classes. I is a list and I want to receive all those who do not have any class and delete it There is a code here till now var listTableHeaders = $ (. "Benefits list on cost") ("th"); . Remove ListTableHeaders.not ("sorting"); I realized that this picture contains classes other than "sorting" I can only remove elements that are not" sorting "or" sorting_disabled ", but I'm not sure whether there are other classes It would be more convenient to remove that which is not a class. Thanks You can filter it listTableHeaders.filter (function () {return! $ (This) .is ('[class]');}) Remove ();

c - Future Value calculator and Exponents -

I am trying to create a future value calculator and I do not have permission to use the power function. The formula for calculating future value is the value of the future = Prime * (1 + rate) ^ (the number of duration) I can not use ^ for exponents, so I tried to use the base and exponent concept, which gives the closest answer I expected but still is not correct. It gives me a price but it does not have the correct answer and it is too big if you need more information, please ask Test Run: Investment Calculator Principal: 1000 Annual Rate: 0.06 Number of years: 5 Future value is $ 1338225577600000.000000 The expected result is $ 1338.23. contains # lt; Stdio.h & gt; Double Futurewell (double rule, double rate, int year); Int main () {Double principal; Double annual crack; Number number; Double results; Printf ("Investment Calculator \ n"); Printf ("===================== \ n"); Printf ("Principal:"); Scanf ("% Left", & amp...

c++ - Is OpenCv already threaded? -

I want to use to record a video and send it as a stream. I am starting a new one and I need to know whether the OpenCV blocks the main thread or is it threaded itself? I read OpenCV documentation (2.4.9) and I could not find any answer. Thanks for reading. When you call a function, OpenCVI can generate threads. However, All work is returned to the calling thread before control For many reasons, asynchronous processing will add an extra bit of complexity (for example, for example: when calculating your program How would you know?) If the program does not need to be asynchronous, it will also present some unwanted overhead. You can do asynchronous procedures with you though with minimal effort.

c# - Microsoft SQL Server Compact edition insert query return select @@identity -

I am trying to create a function that records a Microsoft SQL Server compact version 3.5 database and returns the ID Returns the newly entered line This is my code: upit = "Join in Crackage (Encarta, Prozed, Lilu, Lide, Dubinarova, D1, D2, Jadidalina, ZPpram, Dubussenja) Price ('Primer 2 Rolaza DWG', 3, 49192.62, 49222.62, 3.11, 74.7693403335958, 15.2495262383346, 14,0,0.00.00.00) "; Public static intecibazoo (string string, string uptipxa) {int id = default (int); SqlCeConnection con = New SqlCeConnection (); Try {string constring = "data source =" + putanja; (Con = new SqlCeConnection (constring)) using {con.Open (); SqlCeTransaction tr = con.BeginTransaction (); SqlCeCommand Com = Null; Com = New SQL Commands (upupsisa, conn); Com.Transaction = tr; Com.ExecuteNonQuery (); Com = New SqlCeCommand (@ "SELECT @@ ID as ID ID", con); Object o = com.ExecuteScalar (); ID = Convert. ToInt32 (O); }} Hold (SqlCeException pre) {message box. Show (...

dictionary - Python Tkinter Menu Command Not Working -

I am trying to execute the following code in Python 2.6.5. What I want to do is show a main window with an 'app' menu. I want to have a series in the menu that corresponds to the key of the dictionary. When I click on the command, I want the default web browser to open and navigate to the URL in the App dictionary for that particular key. Instead, when I execute the code, the browser is opening the first URL in the application dictionary without any click. help please! Imported webbrowser from imported #RailLinks are on pages on intranet Apps = {'Google': 'http: //www.google.com/', 'Yahoo': 'http: / /www.yahoo.com/ '} DRP openApp (appURL): webbrowser.open (appURL, new = 1, autoraise = 1) any root = tc () menubar = menu (root) root.cong (menu = menubar) App menu = App menu for app in app (menubar): appsMenu.add_command (label = app, command = openApp (apps [app]) menubar.add_cascade (label = 'apps', menu = appsMenu) root.mainloop ()...