Posts

Showing posts from January, 2014

sql - How useful is database statistics -

How useful is database statistics in terms of query performance? I did the database engine tuning at SQL Server 2004 and said that I could improve the query processing by 79% and the recommendations were made 5 figures and 1 index. In terms of performance, in this case, how would the performance of the query be improved in terms of percentage compared to 1 index, compared to 1 index? Figures for performance queries are important without them adapting that the ordering of the path in the data is the most important. Will be efficient. Every entry table on every table is not better than a scan. It is very important that SQL Server makes them on the fly for ad hoc queries. If you have Meritable from SELECT * where this column = 'some value' , then it will make data on ThisColumn . As the data is modified in your table, the statistics eventually become "stale", at this point the adapter starts ignoring them and actually creating bad plans. The exhibit closes a

angularjs - How can one UI Bootstrap DatePicker update several controllers? -

I am new to angular JS and I suspect that the answer is to use a factory, but it is beyond my current capacity. "post-text" itemprop = "text"> Do I have the $ scope in the controller of my codepicker $ watch () And, when the value changes, one can set a $ yolk code and another controller $ rootscope $ watch () that? Yes, your hump is perfect and this is a clean way that comes to mind: date = date = function (date) {setDate = null; return {getSelectedDate: function () {return selectedDate;}, selected date from the set: function {dateDate = date ;},};}) and in its controllers: app.controller ("ctrl1", function ($ scope, date service) { $ Radius $ watch ("dt", function (date) {if (date) {dateService.setselectedDate (date);}}, true);}); app.controller ("ctrl2", function ($ amount, date service) {$ radius. $ clock (dateService.getSelectedDate, function (date) {$ scope.dateFromTheOtherController = date;}, true);});

android - Stream mp3 from link -

I am trying to create an app that can stream MP3 content from the web. When I run this code, I do not mind, but no audio is played, any help? Thanks Private Media Player Media Player; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.activity_main); InitView (); Try {MediaPlayer.setDataSource ("my link.mp3"); // mediaPlayer.prepareAsync (); //mediaPlayer.prepare (); // if (Mediaplayer.isplaying ()) {mediaPlayer.start (); }} Hold (exception e) {e.printStackTrace (); }} Private Zero initView () {mediaPlayer = New MediaPlayer (); } } Private Media Player Media Player; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.activity_main); InitView (); Try {MediaPlayer.setDataSource ("my link.mp3"); // // mediaPlayer.prepareAsync (); MediaPlayer.prepare (); // If you want async operation, then this Mehthod block U.L. MediaPl

how to return from bash function with a message? -

I have a function that calls a command, when the command fails, I have to resize a message and then signal failure . EDIT: Sorry, I do not remember that if I had an attempt to do this, as other answers have said, then I may have made a mistake, so I am removing it . This one works fine: function F () {command || Return 1} But I will have to resign the message to indicate due to failure, so I tried to do it, even this function does not come back function f () {command || (Echo "message" & amp; amp; amp; amp; amp;; refund1)} Recommend the right way to do this. In this case: function F () {command | | (Resonant "message" and return 1)} The brackets make a subsection, and therefore returning to the function instead of returning to that subsection to avoid it, instead Use {} (but note that you need the space around them and requires a semicolon before } ). Additionally, the use of the function keyword is non-standard Finally, it is

c# - How do I store Point datatype in SQL Server? -

How well can I store a dot data type in my SQL server database? ? I was thinking of making it simply nvarchar , and then when I split the string after inserting a point-string like: 100,246 I read values ​​from db, but a dot ? One way to insert SQL Server is supported by point DataType: Create table: create table [dbo]. [Pointist] Insert (Rohid) [int] (1,1) No, zero [Mypoint] [Geometry] No Taps,) Insert (SRID = 4326): Include the Point Test (MyPoint) values ​​(Geometry :: Point (3, -4, 4326)) Select: Select MyPoint.STX X, PointTest from MyPoint.STY Y; Html>

regex - Why is grep showing lines that don't match? -

I am trying to print all the lines with at least one letter which is not numerical. My Grep code looks like this: grep '[^ [: Points:]] GteST Where GteSt is: < pre> test 55 55 pink 123 ssas sas sas a1b2 abba doup dap 12 13 77 a 59360 and in gteast it is exactly the same except the matching parts of the lines (All alpha characters of aka) Instead of displaying matching letters in red, I would print lines / only / matching characters Want. I grep tag (-o, -w, etc.), but none of these do this for me. Am I missing something? Edit: Expected Production will be: Exam 55 55 Pink SAS AAA SAAAA SSA1B2 ABA Dup DAP 77A <div class = "post-from your data, I get this output: </ p> <pre> <code> grep '[^ [: Points:] ] 'File Test 55 55 Pink SSAA SAS AAAAA SAS A1B2 ABA Dup DAP 12 13 77A </ code> </ Pre> <p> You get <code> 12 13 </ code> because the <code> 12 is the place between </ code> and

calling matlab function from Java -

Is it possible to call the matlab function in Java, if so, how can I use it? For example, matlab contains a function called scatter3 and plotter3. How can I use them in Java? thanks There are inappropriate methods for calling MATLAB from Java. You can learn a lot about them from @YairAltman's blog, some of these methods have been captured in the package. Since the functionality is inappropriate and subject to change (and since matlabcontrol is not updated often), you should not rely on this capability for something important.

google app engine - Python hosting, what is the link between a local program and a hosted one? -

I think my previous question is very broad, here I am trying to narrow it. If I have already written a python program which runs locally on my computer, and I'm trying to set it up for openshift hosting (I think Google App Engine is similar, PS. It also looks like Google App Engine is a better document). Why do I need to make my dragon file suitable for that purpose? At this time the URL is not really necessary. The project can be classified as a Web crawler type and output on my mind so that the email summary can be sent to me. (Background) I am a Windows user and I am trying to learn GIT. Thanks a lot! The following is the previous version, it helps to understand my thought process, but you do not have to answer the questions in it. ========================== I am a Python user and all my programs are mine Run on the computer, I have never hosted my program on any other website. Now I am thinking, what will be the main difference between hosted python program an

html - to show different rows per page after select option n php pagination? -

$ start_date = $ _REQUEST ['date1']; $ end_date = $ _REQUEST ['date2']; $ दशा = "1 = 1"; यदि ($ start_date! = "") $ शर्त। = "और event_date & gt; = '"। तारीख ("वाई-एम-डी", स्ट्रॉटोमेम ($ start_date))। "'"; यदि ($ end_date! = "") $ शर्त। = "और event_date & lt; = '"। तारीख ("वाई-एम-डी", स्ट्रॉटोम ($ end_date))। "'"; $ Start_date = तिथि ("वाई-एम-डी", स्ट्रॉटोम ($ start_date)); $ End_date = तिथि ("वाई-एम-डी", स्ट्रॉटोम ($ end_date)); $ Link = mysql_connect ('स्थानीयहोस्ट', 'उपयोगकर्ता नाम', 'पासवर्ड'); अगर (! $ Link) {die ('कनेक्ट नहीं किया जा सका:'। Mysql_error ()); } अगर ($ _ अनुरोध ["डायर"] == "" || $ _REQUEST ["dir"] == "desc") $ dir = "asc"; Else $ dir = "desc"; अगर ($ _ अनुरोध ["आदेश" "]! =" ") $ Ord =" ORDER BY

vba - How to check registered name of Excel ComAddIns? -

I am reading this and I say in the opening paragraph line: " From VBA code, you can see that my add-in has been registered as "ExcelAddinService". " How do you check the registered name of comaid? The writer knows that because he has registered it under that name, You can find the registered names of the add-ins: sub printAddinNames () as COM Aidin COMAddIn for each addin Application.COMAddIns debug.Print addin.progID Next End Sub

report - How to combine multiple table results into one using FetchXml -

I am using CRM 2013 online, I want to generate a report on the Opportunity Unit as below: CampaignCode Open Opportunity Count Von Opportunity Count Calculation of lost occasions CC 1 3 5 1 CC 2 0 2 3 Here are the groups on the "CampaignCode" column which is a Lookup is there. Using FetchXml I am able to get 3 tables like the following: CampaignCode Open Opportunity Number CC 1 3CC2 CampaignCode von opportunity number CC 1 5 CC 2 2 campaignCode lost opportunities Number of CC 1 1 CC2 3 But I can not combine these 3 tables in 1. How can I do this? I know that it is not possible to merge multiple datasets in one table. I will give your question plus one because I am also interested in it.

Android error in using curl as NDK? -

I have downloaded the source code from the link: Now when I am running this code, I get the following error E / Android Random (9 9): java.lang.RuntimeException: Unable to instantiate the activity ComponentInfo {me.cutemay.demo / me.cutemay.demo.Demo}: java .lang.ClassNotFoundException: me.cutemay .demo.Demo Please help me to resolve the error? The error tells you what is happening: ComponentInfo {Me.cutemay.demo / me.cutemay.demo.Demo}: java.lang Klasnotfound exceptions : Me.cutemay.demo.Demo It seems that the class demo is not present in the me.cutemay.demo package. Check your AndroidManifest and specify the name of activity : & amp; Activity Activity: Name = "package.name.here.Demo" And make sure that the demo class is in that package. I think this should fix your problem.

asp.net - Passing querystring from one page to another through javascript -

I have two different pages I want to send query string to each other below I have sample code that I tried Is window.location.search = 'id =' + hidposid.value; window.location.href = "editviewposition.aspx"; I can get value in any other page cookie1 = httpContext.Current.Request.QueryString ("id") 'return' '' & lt; Script type = "text / javascript" & gt; $ (Function () {$ ("# btnQueryString") .bind ("click", function () {var url = "Page2.htm? Name =" + encodeurIComponent ($ ("# txtName"). Val () ) + "And Technology =" + Encodermonentant ($ ("#ddlTechnolgy"). Val ()); window.location.href = url;})}} Hope this will help you.

javascript - Dynamics crm 2011 get subgrid selected cell value -

I need to get specific cell value from the selected sub-grid lines, I code to attach an event Is wrong, but it takes the name or ID back to the line, how is the value of cells obtained?, I am suing the code: read the function from theSublandbrigreedreferences ( ) {If (document.getElementById ('Contact')) {Var Grid = document.getEleme NtById ('Contacts'). Control; Var id = grid.get_choose (); (Var rowNo = 0; rowNo & lt; grid.get_selectedRecords () Length; Line No ++) Alerts (grid.get_selectedRecords () [rowNo] .name); }} Function Form_OnLoad () {if (document.getElementById ('contact')) {var grid = document.getElementById ('contact'); If (grid.attachEvent) {grid.attachEvent ('onclick', Shugrid Records selected from Reed); }} And {setTimeout ("Form_OnLoad ();", 2000); }} You can use CRM to retrieve record fields using the retrieved ID Have to call. You can use the OData REST endpoint to view the sample in the \ SDK \ Sampl

xaml - UI scaling for WXGA resolution -

Currently I'm facing some problems with the UI of the Windows Phone app. I have always thought that the UI automatically runs the OS So that the device's solution can be fitted correctly. In the visual studio designer or blend your app's UN, I can select in preview for all different device types / offers. When I debug an app on WVGA, 720p emulator and my device (Lumia 920), it looks the same. But when I start the app in the WxGA emulator, the UI looks as it has not been scaled by the OS . It only fills the first half of the screen and everything is very small. Now I am very confused: UI scaling works for many offers, but why WXGA, and the designer's preview are completely different than the result in the emulator? Research I found the image to explain various proposals for Windows Phone if I understand it correctly, the UI should look like all the different resolutions as it should be scaled. Now I have to know why it has not been extended under WXGA resolution

haskell - how to parse yahoo historical csv with Attoparsec -

I'm starting hankel, how to parse an array of openings from the etchors, high array etc Module CsvParser (excerpt (..), csvFile, quote) Where to import System.IO import data. Etopazar.txt import data AOPPACERS.Combinator Import Datacet (Text, Unpack) Import DataTime Import System. Import local data. Maybe data quote = quote {qTime :: LocalTime, qAsk :: double, qBid :: double, qAskVolume :: double, qBidVolume :: double} deriving (Show, Eq) csvFile :: parser [citation] csvFile = do q & lt ; - many1 quote endOfInput return q quote :: parser quote quote = time of time & lt; - ask qtime qcomma for & lt; - Double quekmama bid & lt; - Double Queue FAQ & lt; - Double quekmah bid volume & lt; - Return the double endofline bid quote bid for asking $ quote time qcomma :: Parser () qcomma = do char ',' return () qtime :: parser localtime qtime = do tstring & lt; - Le -til (\ x -> x == ',') Time = Parsighted Default Timelake "% D.% m% Y

CMake: Managing a list of source files -

The problem at this time is that I just want to manage my list of source files by grabbing and removing everything. Ends that I do not need. I was hoping that CMK provided good manufacturing equipment for this. Then I can start with: file (Globe A "Application / *. CPP") I feel like I want to make another list of files to be deleted and I want to tell the CMK: Remove item from item B in the list. If this was a Python I could do something like this: C = [ff in f if not b] I may have spoiled this syntax but I am thinking that there is built-in support to manage these lists of files more elegantly? Even if I can do something like my Python example, then A is a list of the right paths Construction B is clunky. And why exactly the path? It seems that as soon as you move the source, as soon as your creation breaks. If you like python, you can generate a list of source files with you. There is also the possibility of working with. But I call you your

c++ - Dynamic array resize function problems -

Note: I know that using only STL vector for a programming class would be easy, in M, Need to write the dynamic array template class because our professor has enjoyed us redrawing the wheel again. However, I have created a resize function for my dynamic array template class, note that the private member variables are T * arr, unsigned use and unsigned cap. template & lt; Class T & gt; Zero Dar ray & lt; T & gt; :: size (unsigned shape) {if (size> caps) {T * temp_arr = new T [size]; For (integer number = 0; count & used; ++ calculation) temp_arr [count] = arr [count]; For (int calculation = use; calculation & lt; size; ++ calculation) temp_arr [count] = t (); Remove [arr] Arr = temp_arr; Cap = size; Used = size; } If (size & lt; cape) {use = size; }} Whenever I use this function to increase the size of the array, it works for the first time when I have to use it, but after that, the Visual Studio Line Will trigger the breakpoint on 14 (remove a

grep >word anywhere in the file -

How do I grep & gt; How can I say the word where words can be a word without grepping the word? For the past, if the word is apple, I would like to retrieve all the lines & gt; How do Apell and Apell do about the beginning of the lines & gt; Words (and not words again)? thanks Carol 's < Code> ^ Anchor is enough to use, which is the starting line. For example, if your Input file contains the following: / P> & gt; Appeal appell then $ grep '^ & gt; Apple's input will come back & gt; apple

ios - Save live streaming video to document directory -

I want to save the device document listing the video stream to see me running .m3u8 url and offline. I'm not sure the weather is possible. You can download something like the segment m3u8 file: NSString * Result = Zero; NSError * Error = Zero; NSDRAUL * urlToRequest = [NSWR URLWithString: _streamURL]; If (urlToRequest) {result = [NSString stringWithContentsOfURL: urlToRequest Encoding: NSUTF8StringEncoding error: & amp; Error]; } The result variable will store the m3u8 file contents. Use the following code segment for parsing are: NSMutableArray * rows = [[Results component Sepretedbistred: @ "\ n"] Mutivcopi] ; In the (line Ansstiing * line) {if ([line rangeOfString: @ "segment"]. Location! = NSNotFound) {NSLog (@ "segment:% @", line); }}

haskell - How to use the memoize function in Data.Function.Memoize -

After failing to create my memorandum, I changed the class to say and tried to use it, Fibonacci sequence : Fiber :: int -> Int fib 0 = 0 fib 1 = 1 fib n = fib (n-1) + fib (n-2) I use the memoize function Tried in many ways in the classroom, but even the construction below seems to be slow (eating 10 seconds on fib 33): < Code> fib :: int -> int fiber 0 = 0 fiber 1 = 1 fib en = memoise fib (n - 1) + memoise fib (n -2) fib ':: int - & gt; I have tried to distribute memoize in other ways, but it does not appear to improve performance. I know that there are other ways to count this problem more efficiently, but for my basic problem I would like to use the Memoise package, so my question is, in this package, memoize How does performance improve with the function? Remembering clearly is only useful if you do just once , and then many times after that, in your view, you keep remembering the function over and over again. This idea is not! fib &#

Run scheduled PHP script in Wordpress to save data in MySQL -

I have a PHP script that I want to run every day to keep some data in the database. What is the easiest way to achieve this? Does any kind of scheduler event Wordpress which can run code in some time? Or MySQL is creating a scheduled event correctly in the database? Thank you. If you are running on a Unix system, then I would suggest using it. If you are running on Windows, please take a look at this: P>

php - Why the JavaScript result always return first value? -

Here's my problem: I'm currently trying to customize Joomla content with some modules. As I am trying to hide some devices before the user clicks on the input. Let's say that the user says that test 1 click which is a radio button, then another field that I hide from the developer, will be displayed in test1's contents all the details are loaded from mysql database. This is my javascript code that I am trying to show values. But it always shows value to me first, though I have to click on other value as Test 2 or Test 3. Example: & lt; script type = "text / javascript" & gt; Function showbox 1 () {document.getElementById ('hidebox1'). Style.display = ""; var test = document.getElementById ('123'). value; Confirmation (testing); & Lt; / Script & gt; Here is my PHP code: QuoteName ('campusid')); $ Query-> From ($ db-> quoteName ('campus')); $ Query-> Where ($ db-> quoteName (

sql server - sum of aggregate function or a subquery -

घोषित करें @s int; घोषित करें @ तारीख की तारीख; @ एपी int घोषित; घोषित @ आर इंट; घोषित @t int; घोषित @rr int; घोषित @ डे इंट; सेट @ एस = 7; सेट @ पी = 14; सेट @ आर = 21; सेट @ टी = 28; सेट @ डीटी = (SELECT DATEADD (महीने, -1, '2014-02-11')) सेट @ डे = (दिन का चयन करें ('2014-02-11')) चुनें SUM (SUM ((((डीसीसी। टोटल * 35) / 100)) / ROUND ((((योगफल (dcc.EMI) / 100) + (योगफल (डीसीसी। [RepoArrear]) / 100)) / ((dcc.TOTAL * 35) / 100)) * 100 , 0)) से [DCRA]। [dbo]। [डीसीसी] अंदरूनी [DCRA] में शामिल हों। [dbo]। पर [FEB14_DCR] dcc.REGION = FEB14_DCR.REGION कहां dcc.CIRCLE = 'सी 1' और (dcc.CURR_DATE '2014-02-01' और '2014-02-11') और feb14_DCR.CURR_DATE = @dt और FEB14_DCR। [CIRCLE] = DCC.TOTAL, DCC.CIRCLE, FEB14_DCR द्वारा 'सी 1' ग्रुप। [RESO] आदेश के बीच डीसीसी द्वारा। सर्कल यह मेरी क्वेरी है मुझे इस तर्क की राशि चाहिए लेकिन मुझे इसके बजाय एक त्रुटि मिलती है: संदेश 130, स्तर 15, राज्य 1, रेखा 3 समस्त या एक सबक्विरी वाली अभिव्यक्ति पर को

java - Can't change text of TextView Android -

Welcome text view can not change I need help. I'm editing to show all the codes again ... package.application.listaslist; Import android.support.v7.app.ActionBarActivity; Import android.support.v7.app.ActionBar; Import android.support.v4.app.Fragment; Importroid.os.Bundle; Import android.view.LayoutInflater; Import android.view.Menu; Import android.view.MenuItem; Import android.view.View; Import android.view.ViewGroup; Import android App Import android.content.Intent; Import android.widget.TextView; Import com.facebook. *; Import com.facebook.model. *; Public Class Main Activity ActionBarActivity Extensively Created on {@ Override Protected Zero (Bundle Saved Instantstate) {Super.New (Saved Instantstate); SetContentView (R.layout.activity_main); If (saved instenstat == empty) {getSupportFragmentManager () StartTransaction () Add (RID Container, New Placeholder Fragment ()). Commit (); } // Start Facebook Login session. Open Active Sessions (This is true, new session stat

amazon s3 upload using javascript sdk is not working -

I am using javascript Amazon SDK to upload content to Amazon. I try the example. This is my code. & lt; Script src = "https://sdk.amazonaws.com/js/aws-sdk-2.0.0-rc13.min js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; // Configure the settings to configure the credentials in the SDK // AWS.config.credentials = ...; AWS.config.update ({accesskeyId: 'keyid', secretAccessKey: 'secretkey'}); // Configure your area AWS.config.region = 'us-west-2'; & Lt; / Script & gt; & Lt; Input type = "file" id = "file-selector" /> & Lt; Button ID = "Upload-Button" & gt; Upload to S3 & lt; / Button & gt; & Lt; Div id = "result" & gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" & gt; var bucket = new AWS 3 ({Params: {Bucket: 'Bucket_Name'}}); Var filechusar = document.getElementB

python - Unable to execute user defined function using pyper -

I am trying to read data through a python in my web app and then analyzing it in R . For this I am using the piper analysis function when creating the function, I only get the output if I write a statement in the function definition but if I write more than one statement, I do not get any error nor my Also in running the code I.e. & gt; & Gt; & Gt; From pyper import * r ('& lt; function (stmt) {stmt & lt; ".? @ (*) +' -gsub (," || || || ~}, STMT}} ') < / Pre> works well but >> <> ('replace & lt; -function (stmt)) {STMT & LT; -Jesub ("@ (. *?) +", "|| || || || || || || || || || || || || || || || || || || || || || || || || || || || || ] * "," || u || ", stmt}} ') does not execute. This is the case with all the other functions, Can not enable the club, please suggest a solution You might call: R ("" "

tkinter - how to refresh the window in python -

Image
I have a function that will display the attributes of an image. After it is displayed, I want to refresh it for the next image, for example if I have a window like Once I have the Refresh button window should be like this Initially, every feature value is set to zero. How to get it? I have tried with grid_forget () , it will not give me what I wanted. I do not want to clean the window, I just want to clear the entries in each entry box, and I also want to clear the label so that I can select another image Thanks in advance! If you have too many login widgets, such as in your example, you can use the method Obtain the list of all children widgets of an object. After this, you can repeat through this list to reset and configure those widgets: root = Tk () def clear_all ( ): For the widget in root.winfo_children (): # Get All Children Root if widget.winfo_class () == 'Entry': # If Class Entry The widget is. Edit (0, END) # Reset its value alif widget. Config

javascript - Ajax, checkboxes & PHP -

Image
थोड़ी मदद की आवश्यकता कृपया मेरे पास यह है: जो उपयोगकर्ताओं को एक से अधिक आइटम का चयन करने की अनुमति देता है , मुझे इकट्ठा करने की आवश्यकता है अगर इसकी चयनित और मूल्य क्या है जो इस मामले में आइटम का शीर्षक है। मेरे पास वर्तमान में यह अजाक्स है: $ ('। बॉक्स')। पर ('परिवर्तन', फ़ंक्शन (इवेंट) {var valueName = $ ('# बॉक्स ())। Val (); var चेक = $ ('इनपुट [नाम = चेक]: चेक किया गया'); अगर (चेक किया गया। लम्बडा & gt; 0) {var चेक वैल्यू = चेक किया गया.मैप (फ़ंक्शन () {वापसी $ (यह ) .val ();})। (); $ .ajax ({url: 'accessories_post.php', प्रकार: 'पोस्ट', डेटा: {checked: checkValues}, सफलता: फ़ंक्शन (डेटा) {console.log (डेटा);}})}} सहायक_पोज.एफ़पीपी के लिए कौन सी पद हैं print_r ($ _ POST ['checked']); < / कोड> लेकिन तब जब मैं इस डेटा को पकड़ना चाहता हूं और मुझे एक वेरिएबल में डाल दिया है, तो मुझे मेल से कोई भी विचार भेजना है, क्यों मैं इसके लिए कुछ भी नहीं प्राप्त कर रहा हूं। < P> .map फ़ंक्शन के बजाय,

c++ - Segmentation fault: 11 when iterating over arguments of argv -

I write this C ++ program, the echo command is set to regenerate: #include & lt; Iostream & gt; #include & lt; Queue & gt; #include & lt; String & gt; # Include & lt; Iterator & gt; # Include & lt; Unistd.h & gt; using namespace std; Int main (int argc, char * argv []) {// Step 1: To change into a silly four * [] line & lt; String & gt; From queue & lt; String & gt; Arg; For (int i = 1; i & lt; = argc; i ++) {args.push (string (argv [i])); } // Step 2: Use this queue & lt; String & gt; (Because a non-used variable, which is useless) string erg, var, toos; Bool showEndl = true; For the implementation of the AGR (int i = 0; i & lt; = argc; i ++) // Arg is so crazy {arg = argsfront ()); // I can arg = args [i] but for nothing, I'm making queues for the cashier, he takes it in front of the customer, he does not count the number of customers. Args.pop (); // pop if arg (arg [0] == '$') // if it is a v

c# - Nested property for user control -

Image
I have created user controls and have define all the properties. I was able to access / modify the property in design time. Here I need to know how to give nested properties in the same control. For example, consider the default property "font", which has sub-properties such as "bold", "italic", "name" and so on. , I need nested properties in my custom control. In fact, This nested property is required for user control in the application. Thanks in advance. Try changing all properties to dependency properties, for example: Public reliance dependent textproperty = dependency. Registration ("text", type (string), typef (choice)); Public string text {get {return (string) GetValue (TextProperty); } Set {set value (textproperty, value); }} Public Fixed Dependency Option Choice4Property = DependencyProperty.Register ("Choice 4", Type (Choice), Typef (Micro Control)); Public Choice Choice 4 {Return (G) Gate Valle

java - Apache POI: Word get picture dimensions -

I am trying to determine the actual size of embedded images hppf document docB = New HPPF document (file incutestream); Pictured Pikb = docB.getPicturesTable (); List Picture B = picB.getAllPictures (); For (object o: photo b) {picture picture = (picture) o; Int height = pic.getHeight (); Int width = pic.getWidht (); } This works fine for some images, but getHeight () and getWidth () will be mentioned as 1 for others. So is there any other way of getting the actual shape of these pictures in the document? Instead getHeight () and getWidth () can help you, resp. These scales represent the original shape of the picture before the crop. Then you can multiply it with getVerticalScalingFactor () / 1000.0 resp. To get the last (provided) size, the category is required by getHorizontalScalingFactor () / 1000.0 1000.0 because every scaling factor is given per mille.

android - Lint error in getting Bluetooth adapter -

I'm following the documentation for bluetooth low energy devices to scan BLE devices. As the doctor, I defined --- Bluetooth adapter mblluetoothAdapter = null; Last BluetoothManager bluetoothManager = (Bluetooth Manager) getSystemService (Event.BULUETOOTH_SERVICE); MBluetoothAdapter = bluetoothManager.getAdapter (); // lint error .. but I am getting a lint error --- The API level 18 for the call (current is the minimum 8 ): Android .bluetooth.bluetoothManager #getAdapter So I changed my code - mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter (); What is the code replacement for the above lint error? You can call BluetoothAdapter.getDefaultAdapter () . Say that use to create, then call to get it. Alternatively, you can call only the steady assistant. Or you can see the build version and start mBluetoothAdapter , such as If (android.os.build.VERSION.SDK_INT & gt; = android.os.build.VERSION_CODES.JELLY_BEAN_MR2) {mBluetoothAdapt

Mark multiple locations on google map with google map api -

I want to add several locations to Google Maps. I have saved the long-term and latitude in the database, then I recover it from PHP and add the data to the JavaScript function. When I hardcode the places in JavaScript, it works fine but when I load the data with PHP it does not work. But when I check it with firebug, it shows that PHP values ​​have come to relevant places. The issue is that nothing is loading, with the following code I. & lt; script type = "text / javascript" & gt; Function initialize () {& lt ;? Php $ con = mysqli_connect ("HOST", "DBUSERNAME", "DBPASSWORD", "TABLE"); // Check connection if (mysqli_connect_errno ()) {echo "failed to connect to MySQL:". Mysqli_connect_error (); } $ Result = mysqli_query ($ con, "SELECT * FROM places"); ? & Gt; Var calculation = 0; Var my = new google.maps.LatLng (7.860661,80.674896); Var map option = {zoom: 8, center: my} Initialize my code

javascript - Adding mutliple answers to quiz -

I have to add several questionnaires to use the same code. How can I do this? Answer the questions [0] = ["Apple", "Test"] // questions; Answer [1] = "Dynamic HTML"; Answer [2] = "Netscape"; Answer [3] = "Common Gateway Interface"; As you can see, Ive just tried to add a second quote to your second answer on the code but it does not recognize what is the best way to do this? (There is a "or" command or something like that? Here is my complete code: // var numques = 4; // Insert each question var numChoi Enter the number of questions displayed in the North field var answers = new array (4); // questions [0] = ["apple", "test"]; Answer [1] = "Dynamic HTML", "Test"; Answer [2] = "Netscape", "Test"; Answer [3] = "Common Gateway Interface", "Test"; // Anything belowChange here ... function getScore (form) {var score = 0; var currElt; var

javascript - IE click event troubles -

I have such a page and everything is fine in all browsers When I click on the link "поÐ'Ñ ?? оР± нÐμÐμ" - I have added Ajax data to the page view ... but why IE (10,11,12 in my case) - nothing Did? The main thing - there are no error logs or warnings, and I am confused (what do I do wrong? that means throwing a debugger on the pocket part: return type jQuery! == strundefined & (! E || jQuery.event.triggered! == e.type)? JQuery.event.dispatch.apply (eventHandle.elem, logic): Undefined; Also I use Rail 4 and this is Turbolinks. How to solve this problem? Or just bad How to catch things? html part: & lt; a href = "/ no Cool / 9 "Data-Remote =" True "& gt; поÐ'Ñ ?? оР± нÐμÐμ ... =" Post- text "itemprop =" text "> Are you sure that your error is not coming from the inconsistency of the development gem with IE? Recently I have been using various plugins and additional functio

angularjs - Preload ng-view for smoother navigation -

I'm using $ location.path () to load new views inside my angular web site. My page looks like this: & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; div data-ng-view = "" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; And I change the NG-view based on demand (index, home, login, etc.). Navigation slow down some time (there is something wrong on the page, while 0.1 seconds) is there a way to create navigation immediately? In addition, I tried to nig-animate which improves this feeling but not completely. I think it would be a solution to pre-load my thoughts'. Edit: Adding correction: myApp.run (function ($ template cache, $ http) {$ http.get ( 'Template1.html', {cache: $ templateCache}}}; To manage the states and views, you can use a better library. In order to pre-load each resource, it is necessary in your nested state to avoid

javascript - Trying to populate using JSON, it is not working -

I want to populate a UL with a set of options using JSON. JSON: {"product": {"options": {"42432": {"id": 42432, "title {"Id": 152744, "title" ":" Za 17 mei 2014 "," active ": false}," 166656 ": {" id ": 166656," title ":" wo 4 juni 2014 "," active ": wrong}}}}}}} My HTML code: ul class My script: Pre> & lt; script & gt; $ (document) .ready (function () {$ .get ('http: //exampleproduct.html? For Mat = json ', function (data) {if (data.product.options) {$ .each (data.product (' & lt; li & gt; '+ vartitle +' However, it is not working, the mistake is probably in the script what is wrong with it and How can I fix this? What do I need: & lt; Ul & gt; & Lt; Li & gt; May 8, 2014 & lt; / li & gt; & Lt; Li & gt; May 17, 2014 & lt; / li & gt

C++ Qt static QList of class pointers to keep track of siblings? -

मैं thisClass (QObject inherits) उदाहरण ("भाई बहन") का ट्रैक रखना चाहूंगा "साझा" स्थैतिक कक्षा के सदस्य के लिए यह (स्वयं को सूचक) जोड़ना: निजी: स्थिर QList & lt; thisClass * & gt; _plist; हालांकि, स्थिर सदस्य घोषणा एक एलएनके 2001 अनसुलझे बाहरी प्रतीक का कारण बनता है। स्थिर के बिना, प्रोग्राम बनाता है (लेकिन प्रत्येक ऑब्जेक्ट का केवल अपना डेटा होता है)। क्या त्रुटि का कारण हो सकता है, कोई फ़िक्स है, और कैसे " उदाहरण "ठीक से किया जाना है? आपने स्थैतिक सदस्य को घोषित किया है। अब आपको सीपीपी फ़ाइल में इसे परिभाषित करने की आवश्यकता है: QList & lt; thisClass * & gt; thisClass :: _ plist;

.net - Missing manifest file in ApplicationFiles folder with msbuild in NANT task -

I have an application that has been deployed by clickon deployment. I used to automate the published process of NANT . This build part is: & lt; Target name = "build client" dependent = "clean" description = "build" & gt; & Lt; Echo message = "building ..." /> & Lt; Exec program = "$ {msbuildExe}" functional = "." Verbose = "true" & gt; & Lt; Arg value = "$ {projectFile}" /> & Lt; Arg value = "/ target: clear; publish" /> & Lt; Arg value = "/ p: publisherdear = $ {testPublishFolder}" /> & Lt; Arg value = "/ p: applicationware = $ {version}" /> & Lt; Arg value = "/ p: publisher = & amp; quot; $ {publisher name} & quot;" / & Gt; & Lt; Arg value = "/ p: product = & amp; quot; $ {productName} & quot;" / & Gt; & Lt; / Executive & gt; & Lt; Echo message = &qu

google app engine - Do daily quota replenishment and cron task use the same timezone? -

I have set daily daily work to be told about quota replenishment, which seems to be that it is UTC- 7 (or GMT-7) is equal to My local time is GMT + 4 while checking the log (GMT + 4 is selected there), I think my work runs at midnight: 2014-04-22 04: 00: 00.278 / admin / reset quota 200 121ms 0kb AppEngine -Google; (+ Http: //code.google.com/appengine) module = default version = 1 but now when I quote the Local Details of GAE Console (local time 5:26 p.m.) I see the details page, it says that the quota will be reset within the next 18 hours, i.e. at local time at 11 p.m. Does this mean that cron jobs use UTC time, when quota replaces in UTC-7? Cron.yaml looks like how can I tell UTC-7 here? Is this US / Pacific ? Yes Cron work uses UTC time by default, but you can specify time zone And US / Pacific are valid: - Description: Daily work URL: / cron / daily schedule: every day 00:00 time zones: US / Pacific If you try and use the timezone that is not recognized,

javascript - Why in Canvas(JS) toDataUrl() doesn't work after drawImage()? -

& lt; स्क्रिप्ट & gt; var कैनवास = document.getElementById ('myCanvas'); Var संदर्भ = canvas.getContext ('2d'); Var img = नया चित्र (); Img.onload = function () {canvas.width = img.width; canvas.height = img.height; context.drawImage (img, 0,0); } Img.src = "2.jpg"; समारोह सेक () {var dataURL = canvas.toDataURL ("छवि / jpg", 0.5); document.getElementById ( "img") src = dataURL। } SetTimeout (सेक, 1000); & Lt; / स्क्रिप्ट & gt; मैंने उदाहरण के लिए fillRect () के बजाय drawImage () के रूप में उपयोग करने का प्रयास किया है। तो यह सामान्य रूप से काम करता है ... मुझे यकीन है कि कारण drawImage () यदि आपकी छवि यूआरएल (मूल यूआरएल, डेटा यूआरएल नहीं है) उस पेज की तुलना में एक अलग डोमेन से है जहां कोड चलता है, तो कैनवास दागदार हो जाएगा जब आप चित्र खींचते हैं इसे करने के लिए, और आप पिक्सेल वापस बाहर पाने के लिए सक्षम नहीं होगा। यह एक सुरक्षा उपाय है इस प्रकार यदि आप jsfiddle पर परीक्षण कर रहे हैं और आप http://placeki

Is there any way to send the packet per minute with tcpreplay ? -

I am using TCPRPAP to send traffic. I know the option -p for packets per second, but I want to send packets per minute. Not sure I can think of a viable solution because -pps option frames support does not. The only way you can be able to do this - use the MPPS option and select a slow enough traffic rate that sends only per packet per minute, but it will only be accurate if your packet has the same size Be there Your best bet is to open a feature request:

Keyboard not open in Landscape mode in android Emulator -

Emulator Landscape mode keyboard not opened. In my app I have EditText to get the value. When in picture mode, click on the keypad, while switching to Landscape mode (Ctrl + F12) to open the keyboard while clicking on the right edit editor. Can anyone tell me how to open the keyboard in the Android emulator in landscape mode? This is my manifest file & lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_WIFI_STATE" / & gt; & Lt; Usage-permission Android: name = "android.permission.CALL_PHONE" /> & Lt; Usage-permission Android: name = "android.permission.READ_CONTACTS" /> & Lt; Usage-permission Android: name = "android.permission.WRITE_CONTACTS" /> & Lt; Usage-permission Android: name = "android.permi

android - Calculating data downloaded by webview for a given url by using webview client? -

I am trying to calculate the data I downloaded in my WebView . The following is my Public Code (Webview View, String URL) {super.onPageFinished (see, url) on my WebViewClient WebViewClient mWebViewClient = new WebViewClient () {@OverridePageFinished) ; Logs. E (tag, "init onPageFinished ()"); } Override public zeros at @powered (WebView View, string URL, bitmap favicon) {super.page starred (see, url, favicon); Logs. A (tag, "Peace Started (init)"); }}; In addition to the calculation of the data I am using: mWebView.setWebChromeClient (New WebChromeClient () {@ Override publicity at ProgressChanged (WebViewView, int newprogress) {Super.onprogressChangeed (long, new progress), long time current bytes = trafficstats.getUIDRxbytes (processor.muid); long totalbeat = currentbits - lastbeats; log A. (tag, "current bytes == & gt; "+ Total Bytes +" New Progress ==> "+ New Progress);}}); The following logs are: 05-06 13: 11: 11

JavaScript: Popup windows closes immediately -

I am trying to close all open pop-ups using javascript. I tried the following code but it does not work. This is my code to open a pop-up window. var childWindow = new array (); Function Popup Center (page URL, Title, W, H) {var left = (screen.width / 2) - (w / 2); Var top = (screen. High / 2) - (H / 2); Var targetWin = window.open (pageURL, title, 'toolbar = no, location = no, directories = no, status = no, menubar = no, scrollbars = yes, resizable = no, copyhistory = no, width =' + w + ', Height =' + H + ', top =' + up + ', left =' + left); ChildWindow [childWindow.length] = targetWin; If (window.focus) {targetWin.focus ()} return false; } And to close all this open pop-up window is my code. closeChildWindow () {if (childWindow.length ! = 0) {for (var i = 0; i & lt; childWindow.length; i ++) {childwind [i] .close (); }}} I call the 'closechildWindow ()' function at the body's on-call event of the page. But when I try t

objective c - Why is BOOL turned to int when negated with explicit block return type -

why BOOL , which four signed a typedef Is it changed when converted to int ? does not // compile NSInteger events = [[contactCountries indexesOfObjectsPassingTest: ^ (id obj, NSUInteger IDX, BOOL * off) {return [isEqualIgnoringCase obj: @ "astring"]; }] Calculation]; Error: to return type 'int' Back returns type 'BOOL' (aka 'signed four) should the block literally unspecified clear return type that 'C' objective Due to ! C99 say to about operator (my emphasis): The 6.5.3.3 Single arithmetic operators, Article 5: The result logical rejection operator! 0 if the value of its operand compares to 0 with the unequal, 1 if the value of its operand compares to 0 equals. The result type is int. Expression! E is equal to (0 == E.) You put it: return (bool) [isEqualIgnoringCase obj: @ "astring"];

java - [Ljava.lang.String; when update the value of checkbox -

I created a web project from jsp and hibernate, I have a checkbox ... I have no problem while inserting When updating the data but data, I found this in my code in my code [Ljava.lang.String and the parameters of my first checkbox are not stored in the database, but other checkboxes work well Another thing is how the checks from the database Oks value can be Czech ?? My JSP & lt; Td> & Lt; Spring: This part of the message code = "official right" text = "default text" /> gt; & Lt; / Td> & Lt; TD & gt; & Lt; / TD & gt; & Lt; Td> & Lt; Fieldet id = "menu_e" & gt; & Lt; Input type = "checkbox" name = "menu" value = "user" class = "ccmenu" & gt; Users & lt; Br / & gt; & Lt; Fieldet id = "sub_menu_user_e" & gt; & Lt; Input type = "checkbox" name = "sub_menu_user" value = "user1" class = "

ios - GoogleMap not showing user's current location properly when drawing path overlay -

I am using GMSPolyline on Google Maps to show the least path between two digits. This map does not properly show the user's current location. Here's my code, let me know about the improvement, which I can do in my code. Thanks in advance. - (zero) Location Manager: (CLLocationManager *) Manager updated location: (NSArray *) locations {/////// If this is a relatively recent event, Close CLLocation to save power * location = [last object of the places]; NSDate * eventDate = location.timestamp; How to NSTimeInterval = [eventDate timeIntervalSinceNow]; If (ABS (cassiterant) & lt; 0.5) {/////// update your marker using location.coordinate.latitude // and location.coordinate.longitude on your map); NSLog (@ "Event Time =% @", Event Date); #pragma mark start Point of polyline draw /////////////// Folklore 23.03 Upvat Derek point was started in the beginning of the plateau Dowro ///// (location.coordinate.longitude == 23.03 ) {[LocationManager stopUpdatingLocatio

ios - Delegate to know when phone call ends which was initiated by app -

I have a code that makes a phone call using the code: / Make / Call on the given phone number - (zero) Callphone number: (NSString *) Phone number {if (! Self.webview) self.webview = [[UIWebView alloc] init]; Self.webview.delegate = self; // Remove non-digit from phone number Phone number = [[BCC] Inset deleted from [phone number components]: [[NSCRactorSat decimalDGCTECTSAT] InvertedSat]] componentJudgedbystrings string: @ ""]; // Make a call NSURL * url = [NSURL URLWithString: [NSString stringWithFormat: @ "tel:% @", phone number]]; [Self. WebWorld Load Request: [NSRR request request with url: url]]; [Self.view addSubview: self.webview]; } This calls. What do I want, I want to know where the user ends When the user ends the call, I have to do an operation. Is there any way for this? Whatever I have tried, I have made the current controller a representative of the webview . But none of the representative methods is said to be. - (zero) webViewDidS

algorithm - How to draw graph with disjoint edges? -

I have the proximity matrix for the graph without having to intersect the edges I need to see this article. I peak in the graph irregular Can be arranged in the form I know a solution - calculation of all edges for intersections, if the edges have to change each other one another, then rearrange the head, but too many numbers (more than 20) costly is. How does another view look to intersect the edges? It is really easy to visualize any graph in any 3D graphics with decomposed edges. 1) Place all the vertices on any point in the 3D plane so that no three corners can be colored and no four corners are in the same plane. 2) Travers draw a line / curve to connect through adjacent matrix and corner. In a 2D plane it is not guaranteed for the existence of a solution, for example, take the worst case scenario that it has some 10 corners and each top is connected to each other.

c# - Stride and Width in image processing -

I have a 1 bpp image that needs to be read. I came to the following argument. But I'm not sure what he's trying to do. int value = (imagebmd.Width + 15)> & Gt; 3; Byte * line = (byte *) imagebmd.Scan0; I do not know which values ​​are stored in column and row variables. integer column = (imagebmd.Width + 7) & gt; & Gt; 3; This is the byte length of the image line, it is equal to rounding up columns = ceil (bitwidth / 8) / Code> The line image data is pointer to the starting address.

android - Not able to make Progress Bar invisible in a List View -

Here I have a progress bar in a imageView and FrameLayout is my code for the custom adapter. After downloading images, I want to make the progress bar invisible .. I am downloading images from the web service. After downloading the images, the finishImg () method is called. The public class extends CustomAdapter BaseAdapter {reference mContext; ArrayList & LT; ManagePartResponse & gt; part of the list; LayoutInflator aminflator; Static viewholder VH; Public CustomAdapter (Reference Reference, ArrayList & quot; Management Pricing & gt; Item List) {mContext = context; PartList = itemList; MInflater = layoutInflator. From (context); } Public CustomAdapter (ManagePartListActivity managePartListActivity, ArrayList & LT; ManagePartResponse & gt; list) {// TODO Auto-generated constructor stub} public CustomAdapter () {} static class ViewHolder {TextView make_tv, model_tv, partName_tv, partId_tv, year_tv; ImageView imageView; Progress Bar PB; } Public int getCoun

modelica - Maximum allowed number of run-time errors in Dymola -

This can be in-depth as an unorthodox question, but there is a maximum allowed increase of run-time errors One way to do Dumula simulation? It is the cause of the following error during run-time (due to a bug in Dymola), from which I know that does not affect my results, but n -Rors: Error: Failed to solve non-linear system using Newton Solver To get more information: Simulation / Setup / Debug / Nonlinear Solver Diagnosis / Turn on Details (...) solver try to handle this problem Received.

extjs - limit field.Spinner data -

स्पिनर और स्टोर (स्टोर में फ़ील्ड है: 'price') Ext.define ( 'TPL.store.price', {fields: [{name: 'price', type: 'string'}, प्रॉक्सी: {type: 'ajax', url: '/ author / price' ', reader: { टाइप करें: 'जेसन', रूट: 'डेटा', सफलता प्रॉपर्टी: 'सफलता'}}}); और मैं अपने क्षेत्र में चाहता हूं। स्पिनर केवल 'मूल्य' । मेरे पास दो कार्य हैं स्पीनअप और ऑनस्पिनडाउन कि फ़ंक्शंस को +1 या -1 मूल्य चाहिए, लेकिन अधिक से अधिक नहीं और स्टोर 'मूल्य' spinner = Ext.create ('Ext। Form.field.Spinner ', {step: 1, width: 100, height: 10 onSpinUp: function () {} onSpinDown: function () {}; धन्यवाद

windows - Bitvise SSH + Git + initial directory -

I am using bits SSH server on Windows machine and I create various virtual user accounts to contribute to git repositories Want to (Git will be done using push ssh). For example, I can use git clone ssh: //mydomain.eu/d/gitrepos/username/repository_name In the customer's CMD shell which works perfectly but is not perfect to some extent because everyone can reach all the treasures + Browsing is a nursery all the time. Thatswhy I want to set the initial shell directory, I have overwritten the "Initial Terminal Shell Directory" option: "square in D: \ Gitrepos \ username" Account settings in Bitvise ssh. It works on the first glimpse, when I enter ssh username@mydomain.eu and at the terminal location Do: D: \ Getrepo \ Username & gt; As soon as I wanted. Now the problem: When I try to use git from the initial directory: git clone ssh: // kratos @tibiafun .eu / repository_name Because I should already be in the right s