Thursday, 15 September 2011

highcharts - Dual Axis in Highstock? -


Is there a way to create dual axis in the highstock in the highstock?

It seems that you can do it the same as high charts. Each series specifies yAxis: n where n is the axis that you want to plot for it, and you have to define n yAxis entries. I modified an example of the Ghoststock demo:

  $ .getJSON ('http://www.highcharts.com/samples/data/jsonp.php?filename='+name.toLowerCase ( ) {'Label: {formatter: function} () {{Value: 0, width: 2, color: 'silver'}}}, {{value: 0} '' '' ':' ') + this.value +'% ';}}, plot Lines: {contrast: true}, {contrast: true}, {contrast: true}],    

ruby - Can I include/extend a module but mark all included/extended methods as private? -


कहो, मेरे पास एक वर्ग और एक मॉड्यूल बी है। मैं B को A में शामिल करना चाहता / चाहूंगा / लेकिन चिह्न शामिल / विस्तारित तरीके निजी के रूप में (इसलिए वे A पर क्लिक करें, लेकिन के तरीकों के भीतर उपलब्ध होगा।

मैं B को A में कैसे शामिल कर सकता हूं लेकिन सभी को चिह्नित कर सकता हूँ निजी तरीके के रूप में शामिल विधियां?

शामिल करें और फिर स्पष्ट रूप से सभी शामिल विधियों को निजी बनायें?

  वर्ग ए में शामिल हैं बी निजी * B.instance_methods बी वर्ग का विस्तार & lt; & lt; स्वयं निजी * B.instance_methods एंड एंड   

आप private_include को जोड़ने के लिए बंदर पैच मॉड्यूल और private_extend कर सकते हैं :

  वर्ग मॉड्यूल def private_include * मॉड्यूल class_eval self.send करें (: शामिल करें, * मॉड्यूल) modules.each do | mod | Self.send (: निजी, * mod.instance_methods) अंत अंत अंत def private_extend * मॉड्यूल सिंगलटन = वर्ग & lt; & lt; स्वयं; स्वयं अंत singleton.instance_eval self.send करें (: शामिल करें, * मॉड्यूल) modules.each do | mod | Self.send (: निजी, * mod.instance_methods) अंत अंत एंड एंड    

javascript - What is the right way to open titanium appcelerator windows? -


I am working on a Titanium Appellantator iOS app, which has an initial dashboard screen and two separate screens dashboard can be accessed .

I have set up my app to use a navigation controller and everything is controlled from a main.js file using custom event listeners. I do this so that I can isolate the code in different files for each screen.

The problem is that with each screen loaded, I have to open the window on the Nav Stack and then all the elements are okay for it to be one of the screens because it contains some scenes and labels Are there. However, the other screen has a map view and the user takes 3 seconds or more to load after the screen is opened.

What is the correct way to handle it? Is there no way to open the window before opening, but to maintain my existing architecture?

I asked this question in more confusing and specific ways, but I think this general question applies to more people. I'm using the architecture style is quite common.

I think your attitude is quite specific ... unfortunately I have to first put my window contents Do not know any way to load from. By including a static image of the map canvas, you may be able to improve the user's experience (likewise, Apple's UI guidelines recommend that the default .png should impress the image of its original original impression that it Loading quickly). You can also add a loading spinner as a Ti.UI.ActivityIndicator . Both of these can be added to the window by default, then the map is hidden when the map is shown on the load view of the map. I think they will probably help to ensure that the 3 seconds wait is less painful.

I have seen that in your second post you saw that the map still took a long time to load when you were not actively getting the GPS location of the user true where, you immediately on the app launch Get space and save some time, then you are moving into your map window with the custom event you are using, the map can be started directly at the user's location, a dummy location Not.

javascript - Auto-adjust canvas by itself in all possible sizes -


I have a canvas-FX code ("stars" emulate deep, front-centered, space-navigation ; I was not ) that I want to keep a website as background

I want it so much that when a user changes the size of the window (right or left side or resizing or whatever is pulling), the effect can adjust itself so that the sitar always Also come in the center of the shape or even changing the desktop resolution (I think the FX automatically resets the webcode as it reads).

In addition, I also want the code to adjust itself in the size of the body (i.e. adding up the content from top to bottom, etc.)

Finally, I How can I leave the lower bar, leaving the scroll bar just right?

I'm using the full code here:

     

< Strong>

In the following amendments I have made it to work. First remove the size in your canvas element.

  & lt; Canvas id = "canvas 2d" & gt; & Lt; / Canvas & gt; Change in   

After this I use for my CSS when I am doing full screen with canvas.

  html, body {width: 100%; Height: 100%; Margin: 0; Padding: 0; } # Canvas 2d {status: absolute; Top: 0; Left: 0; }   

And here JS needs to do all this

  // Set width and height to full windows size SCREEN_WIDTH = window . InnerWidth; // Change it to scroll the height to make the document size SCREEN_HEIGHT = document.documentElement.scrollHeight; // Be sure to set the canvas in the screen height and width. Canvas.width = SCREEN_WIDTH; Canvas Het = SCREEN_HEIGHT; // Every time we change the size and height width to window size, and reset the // center point window. Average = function () {SCREEN_HEIGHT = canvas.height = document.documentElement.scrollHeight; SCREEN_WIDTH = canvas.width = document.body.offsetWidth; HALF_WIDTH = SCREEN_WIDTH / 2; HALF_HEIGHT = SCREEN_HEIGHT / 2; };    

javascript - How do I rotate two images [on the same Canvas] in opposite directions? -


I'm unable to rotate two images in opposite directions using canvas state () and restore () functions.

  program.ctxT.globalCompositeOperation = 'destination-over';  

Any solution here is most appreciated, thanks! Program.ctxT.save (); Program.ctxT.clearRect (x - 1, 0 - 1, 72, 62); Program.ctxT.translate (x + 35, 0 + 25); Program.ctxT.rotate (Math.PI / 135); Program.ctxT.translate (- (x + 35), - (0 + 25)); Program.ctxT.drawImage (program.imgBody, x, 0); Program.ctxT.restore (); Program.ctxT.globalCompositeOperation = 'Destination-over'; Program.ctxT.save (); Program.ctxT.translate (x + 35, 0 + 25); Program.ctxT.rotate (Math.PI / -135); Program.ctxT.translate (- (x + 35), - (0 + 25)); Program.ctxT.drawImage (program.imgHead, x, 0); Program.ctxT.restore (); Sorry about the misunderstanding, I'm still new to posting on Stack Exchange. My problem was not fully understood how () save and () restored the work (), but this is my best explanation; Changes / State changes that you want to apply later and save them, then separate yourself from the changes of the previous state and set a different set of state changes that will be applied to your next image / size. You did not reach the last item that you want to be altered by undefined form (as a note, with the last item, you do not have to save, just drag that item. You want). Now when all the changes have been made and saved and you have drawn your first item, then you use the restored () and then want to draw the item in which you want it to continue for all the dragged items . One important thing is to look at the Global Composite Operation Property, because it determines how your images are standing. Hope this clarification is sound and I apologize for not doing this before.

  Function Update () {// Clean the canvas in the field, our image was in the first place. Program.ctxT.clearRect (X-35, 0 - 18, 108, 81); // Rotate canvas and to save this condition, it will be applied to the body or underlying element rot (35, 25, Math.PI / -135); Program.ctxT.save (); // It keeps track of body rotation; ++; // Apply the same rotation before moving the head with the body. Program (35, 25, Math. PI / -135); / * Although the head increases with the body, it should not change its mouth, hence the compensation. The title says that two images revolve in opposite directions, but this only does so, if you want them to continue in the opposite direction, then multiply the rot by more than one number. * / Programm (8, 8, rot * math.ip / 135); // Draw the overlay image (head) Program.ctxT.drawImage (program.imgHead, x, 0); // Moving on the lower layer, restore the changes that we are using and attract for it. Program.ctxT.restore (); Program.ctxT.drawImage (program.imgBody, x-35, -17.3); } Function rot point (centrex, centri, angle) {// This head allows overlays to be programmed.ctxT.globalCompositeOperation = 'destination-over'; // Translate the first reference so that she can move around the center of the image. Program.ctxT.translate (x + center, 0 + centreY); Program.ctxT.rotate (angle); // Remember to put the reference back in its original state! Program.ctxT.translate (- (x + center), - (0 + centre)); }    

c# - 'System.UnauthorizedAccessException' when trying to open file from LocalFolder -


कोड की निम्न पंक्ति एक सिस्टम फेंक रही है। यूनाधिकृतएवीसएक्सेशन:

  StorageFile फ़ाइल = प्रतीक्षा करें Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync ( "एमएस-appx: ///Assets/image.png");    

var यूरी = नया उरी ("ms-appx: /// आस्तियों / image.png "); Var फ़ाइल = भंडारणफाइल.गेटफ़ाइलफ्रिप्टेशनउरीएसिंक (यूरी) इंतजार करना;

android - AutoCompleteTextView dropdown style ignored -


itemprop = "text">

madness ... no matter what I try to do, my AutoCompleteTextView show is the default style below Drop items with I can not do anyhow to see the hanging scene - I've tried styling in XML that it is coding up in my adapter as well as AutoCompleteTextView only coding above

spinner_dropdown_item.xml:

  & lt; TextView xmlns: Android = "http://schemas.android.com/apk/res/android" Android: paddingLeft = "10dp" Android: paddingRight = "10dp" Android: paddingTop = "15dp" Android: paddingBottom = "15dp" Android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: textcolor = "# 000" Android: textSize = "16dp" />   

My clients ( LoginFragment.java ):

  AutoCompleteTextView user_name = (AutoCompleteTextView) layout.findViewById (R.id. User name); Last MyAdapter & lt; Users & gt; Adapter = New MyAdapter & lt; Users & gt; (My_activity, my_list); // does not adapter anything. Setdropdown View Resource (R.layout.spinner_dropdown_item); // Application crash with no errors or nothing! User_name.setDropDownBackgroundResource (R.layout.spinner_dropdown_item); User_name.setAdapter (user_adapter); In the end, my adapter, which is working perfectly for any drop-down item for the spinner, but in the drop-down style for AutoCompleteTextView, fails in:  
  @ override public view getDropDownView (integer status, seeviewview, ViewGroup parent) {TextView TV; If (convertView == faucet) {layoutInfleter inflater = LayoutInflater.from (reference); Tv = (TextView) inflater.inflate (R.Let.spinner_dropdown_item, empty); } Else {tv = (TextView) Convertview; } T object = objects.get (position); String label = NULL_ITEM; If (object! = Null) {label = object.toString (); } Tv.setText (label); Return TV; }   

The dropdown text item is styled in any way, such as how can I change the drop down list in an AutoCompleteTextView? I think the problem was that my adapter class needed to get the desired layout in its constructor. Why can no IDEA refer to the desired layout in the adapter

algorithm - Sum of a subset of numbers -


I have a number 'n' and a table of numbers. I want to select four numbers in the table, and the number of those four will be the closest possible match. Given the length of the table 'L', the number of coincidences is (6 * L + 11 * L ^ 2 + 6 * L ^ 3 + L ^ 4) / 24

East. I have the variable

  n = 100   

and the set of numbers

  t = {86, 23, 19, 8, 42, 12, 49}   

Given this list, the closest combination of four to n is 49 + 23 + 19 + 8 = 99.

> What is the optimal way to do this with the least possible number of calculations?

It looks like a NP is known to meet which 'subset amount ' (see: There is a variation of the problem), so unfortunately, most probably there will be no clever algorithm which will run in the worst case of the number of items at any speed.

If there are not many things to check (about 10 or so) then you may try the first search sorting branches as soon as possible.

If there are too many items to investigate the optimum solution, you can try to make better guesswork better.

sharepoint - javascript edit html on the fly -


I am working with a web application (SharePoint), I need to make some adjustments inline. The application is very powerful, but in some areas there are limitations. For example, in this example I am trying to create an onlick event for a picture. Due to the limitations, I can not complete it (if you know SharePoint, you know the boundaries of the wiki page), then my goal is to actually implement the supported JavaScript on the page that will locate the images and insert the onclick event .

I'm also going to find a simple search and may not take place to work. Most examples refer to a text node, but I'm not familiar with that introduction.

I am looking for some guidance. Thanks!


(This is not the answer, but the comments are too small) I am trying to solve some issues. Here's one of them I have a document library on one site, and it is embedded on any other site when a user clicks on a document, then underlines the document within a very small window of the document library. is. One of the things I want to accomplish is to add a "target = _blank" URL to the URL, so that open it in a whole new browser window. Unfortunately, this document list is dynamic, so it should be done on the fly. The second challenge is an image, as one is mentioned, as one is mentioned. On this occasion, a small selector is an arrow that refreshes data in another web part. While this works, it will be more convenient to click on the image. Then, the content is dynamic, and in this situation I need to read url from the arrow, and change the clickable image to dynamic it is out of my capabilities Because, I am not strong with web development practices; I am very much like a compiler guy;) Any code I have tried to give to me, eg any code There is no proof, only the proof of concept is that I will take a look at this with a few suggestions Thank you.

Ensure that you try to edit HTML with Javascript to add an event handler This is usually the way you want to interact with the DOM to add an event handler.

The easiest thing to do is to use jQuery and use it to find an element with the appropriate selector and add an event. I have used it on SharePoint projects without any issue before.

There will be a place to start something on the lines of line (though the selector causes a click event handler on all IMG tags in the DOM)

$ ('IMG') . Click (function () {/ code clicked here /});

mysql - Complex CakePHP query refactoring -


I just got a project and I need to work some code again so that an infinite scroller is still endorsed work properly.

Now the code is catching all the categories and their products, and the listing. I need to edit it so that only those categories which have active inventory have returned the products.

Here's the code that's finally worked:

  $ catData = $ it- & gt; Find ('All', array ('positions' => gt; array ('index type' = & gt; 'category', 'listing.living_id not'), 'joins' => array (array ( 'Table' = & gt; 'Pekka_product_graze_link', 'Alias' = & gt; Link ',' Type '= & gt;' LEFT ',' Conditions '= & gt; array (' link category_id = Category.category_id '), Array (' Table '= & gt;' Paca_products', 'Alias' = & gt;' product ',' type '= & gt;' LEFT ',' conditions' => .product_id = link.product_id '')), array ('table' = & gt; 'pkaka list', 'n Name '= & gt;' listing ',' type '= & gt;' LEFT ',' conditions '= & gt; array (' listing.product_ID = product, 'order' = '= & gt; $ date,' Listing .listing_start_date & lt; = '= Date, "Listing. & Gt; Category Category_name ASC', 'Border' = & gt; $ set_li MIT, 'Field' => Array ('Category .category_id category, category_name, indexer.url '),' group '= & gt; class' category_id', 'recurring' => gt;);   

Edit: Thanks for Dave, it's working now and I post it for future reference Received want. Maybe it helps someone else

"... only categories with products, who have active listings." < / P>

"... one way to combine these three questions in one, so that the first class-> search () function can get all the valid data."

To regain the data and to restrict it based on the areas of related models, you would want to use it.

It is difficult to answer your question without writing the code for you, then - try one, then come back and ask a more specific question if you have a problem with it.

javascript - jQuery matching a single class against predefined list where element has multiple classes -


I am trying to find out that .hasClass () For whether the active ingredient I am currently working with one of the four distinct classes, I am trying to find out the most favorable method to do this, whereas the element (t) which triggers (or active element) For most style purposes, there are several squares in it

Example of HTML:

  & lt; Div class = "form_row" & gt; & Lt; Div class = "primary_ro" & gt; 1 & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "form_row" & gt; & Lt; Div class = "primary_o sub-expert" & gt; 1 & lt; / Div & gt; & Lt; Div class = "primary_row_sub" & gt; 1 a & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "form_row" & gt; & Lt; Div class = "primary_o sub-expert" & gt; 1 & lt; / Div & gt; & Lt; Div class = "primary_row_sub sub-specialist" & gt; 1a & lt; / Div & gt; & Lt; Div class = "secondary_row" & gt; 2 & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "form_row" & gt; & Lt; Div class = "primary_o sub-expert" & gt; 1 & lt; / Div & gt; & Lt; Div class = "primary_row_sub sub-specialist" & gt; 1a & lt; / Div & gt; & Lt; Div class = "secondary_o sub-expert" & gt; 2 & lt; / Div & gt; & Lt; Div class = "secondary_row_sub" & gt; 2 a & lt; / Div & gt; & Lt; / Div & gt; I am currently in the process of preparing this, so it is still a difficult draft, but according to the requirement it will be safe to assume more classes on various elements. There are four main classes about which I am worried about  primary_ro, primary_OR_sub, secondary_or, secondary_or_sub_sub.b./ . I am creating a click handler such as:  
  $ ('.form_row & gt; div'). Click (function () {// code});   

In this click handler I want to be able to figure out that element has been clicked one of the four described above. Where it is, I want to do something based on that. So instead of constructing four click operators for each type, determine what is the element of the element. I hope I can customize it and I can justify the same handler. Any ideas?

one option:

  var classMap = {"one": Work () {alert ("one");}, "two": work () {alerts ("two");}, "three": function () {alert ("three")}, class = " "; $ ('Div') Click (function (e) {classes = this.className.split (""); for (key in clamsamp) {if ($ .inArray (key, class)! == -1) {Classmap [key] ( );}}});   



html - how to do fixed nav, footer and content of remaining height without javascript or display:table? -


ऐसे कुछ काम करना जो इस प्रकार के लेआउट की आवश्यकता होती है:

 यहां छवि विवरण दर्ज करें

मुझे स्क्रीन पर शेष स्थान का निहित आकार रखने के लिए सामग्री की आवश्यकता है। मैंने कई चीजों की कोशिश की

  & lt; div id = "wrapper" & gt; & Lt; div id = "header" & gt; & Lt; / div & gt; & Lt; div id = "content" & gt; & Lt; / div & gt; & lt;! - / content - & gt; & Lt; div id = "footer" & gt; & Lt; / div & gt; & Lt; / div & gt;   

यह प्रदर्शन तालिका तकनीक के साथ काम करता है:

  #wrapper {display: table; ऊंचाई: 100%; चौड़ाई: 100%; पृष्ठभूमि: पीले;} # हेडर {डिस्प्ले: टेबल-पंक्ति; पृष्ठभूमि: काला; ऊंचाई: 50 पीएक्स;} # कंटेनर {प्रदर्शन: टेबल-पंक्ति; ऊंचाई: 100%} #footer {display: table-row; background: black; ऊंचाई: 50 पीएक्स;}   

लेकिन इसके बिना मैं इसे कैसे कर सकता हूं?

  #wrapper {width: 100%; ऊंचाई: 100%; स्थिति: रिश्तेदार; न्यूनतम ऊंचाई: 800px;} #header {स्थिति: रिश्तेदार; चौड़ाई: 100%; ऊंचाई: 42 पीएक्स;} # फुटर {ऊँचाई: 45 पीएक्स; चौड़ाई: 100%; पृष्ठभूमि: # 000; स्थिति: पूर्ण; नीचे: 0; अतिप्रवाह- y: छिपी;}   

मुझे भी सामग्री को स्थिति नहीं चाहिए: निरपेक्ष

यह काम कर सकता है, यदि आप निश्चित ऊंचाई के साथ रह सकते हैं:

  body, html, #wrapper, #content {height: 100%; मार्जिन: 0; पैडिंग: 0; } #header, #footer {स्थिति: रिश्तेदार; ऊंचाई: 42 पिक्सेल; पृष्ठभूमि: लाल; } # सामग्री {ऊंचाई: ऑटो; न्यूनतम ऊंचाई: 100%; मार्जिन: -42 पीएक्स 0; पैडिंग: 42 पीएक्स 0; -मोज़ बॉक्स-आकार: सीमा-बॉक्स; बॉक्स-आकार: सीमा-बॉक्स; }   

यहां है।

objective c - How to pause a game in cocos2d? -


I have been asked before this question but none of the answers seem to be what I do I am trying. I need to be able to stop the animation, but I still might be able to get my break menu and ask the user for input. Is it possible and if so, how can I go about it?

There are 2 ways to pause cccceter for this purpose and resume

  [[CCCceterar shared director] pause];   

and

  [[CCDCD share director] resume]; From the documentation:  

The driver will snatch the view, but all scheduled timers will be stopped. On hold, the draw rate will be 4 fps CPU consumption

ios - Table view doesn't store data -


I have a problem storing the data in the table view.

This menu is a app that has a button that will pop up on a table view and display all the recipes that they have ordered, I am using NSMutableArray to store data, however when Also when I close the table view, then the data in the table will be reset to the initial position, which is the empty table.

What should I do to solve this problem, thanks for any help!

I'm using the FPPopover library to show pop on table view:

  - Reveal (IBAction) Order: List: (ID) Sender {SAFE_ARC_RELEASE ( Popover); PopOver = nil; OrderListViewController * Controller = [[Order list ViUI controller alloc] initWithStyle: UITableViewStylePlain]; UINavigationController * nc = [[UINavigationController alloc] initWithRootViewController: Controller]; SAFE_ARC_RELEASE (Controller); Controller = nil; Popover = [[FPPopoverController alloc] initWithViewController: nc]; Popover.tint = FPPopoverDefaultTint; Popover.contentSize = CGSizeMake (300, 500); [Popover currentpop frameview: sender]; }   

and pop in table view:

  - (zero) viewDidoadload {[Super ViewDidoadload]; Self.navigationItem.leftBarButtonItem = self.editButtonItem; Order list = [[NSMUTABELARRAL] Initwith Objects: @ "One", @ "Two", @ "Three", Nil]; // Add button UIBarButtonItem * addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItem Add target: auto operation: @selector (insertNewObject)]; Self.navigationItem.rightBarButtonItem = addButton; } - (void) insertNewObject {UIAlertView * alert = [[UIAlertView alloc] initWithTitle: @ "Add New Thing" Message: @ "" Representative: Cancel YourTutton Title: @ "Cancel" Other Button Titles: @ "OK", zero ]; // Set the style of UIAlertView warning. AltertViewStyle = UIAlertViewStylePlainTextInput; // Show UIAlertView [Alert Show]; }   

Your data is not stored by itself You can input your initial data into an array You may need core data to save new data, or you can save new data in any data or data base by NSUserDefaults in another way. There is a great tutorial in Tim Rodele that relates to the main data, this is the link:

It also depends on the amount of data you are trying to save. The SQL data base will be better if it is in large quantity. Try either NSUserDefaults or key data, but you can not save new data just by setting an array. The array will only show the original data that you were charged through the code. Also save data is a very good example of apple try to search for sample code bird Better yet this is the link:

Hope it helps you.

regex - Parsing Character Sets without Converting to UTF-8 -


I am working to parse / tune a set of languages ​​compiling CSS and how do I Handling non-ASCII inputs has obviously been dealt with by many people earlier.

As a general rule of thumb , I am reading "converting into UTF-8, process, and whatever encoding you had in the form of input." Would agree with me ...

But I'm thinking , all punctuation marks and numbers with whom I'm working directly ASCII (with code points) below 127) Ant other character strings are all filling in a hash table (i.e. program not want to be A you how many bytes are needed to express any character).

The questions come here:

  • Is there a formal character set that conflict with ASCII definitions for code is interested in what I am interested in (less than 127)?

  • Can you see a fault error in setting up large object linking and embedding characters so that I can not match all the characters that I'm not directly dealing with directly And to change the full-fledged character UTF-8 sign language decoding failure?

    For example:

      // AZ, AG and all non-ASCII stuff characters = (0x41..0x5A) || (0x61..0x7A) || (0x80..0xFF) // match1 or more identifier = character +   

    Thanks a lot!

    If you are going with encoding (such as PHP) encoding, then you can use UTF-16 IE Can not support input encoding Encoding ASCII must be compatible bitwise character sets should not be confused with ASCII compatibility.

    Data encoding unknown will work well for you because the data is passing by bus. If you need to deal with characters in any other way - decoding is required every time and in the beginning you may have to decode it once.

    Do not encode (and thus decoding, announcements, detections and other complexity) content in UTF-8, pass it through bus if input was UTF-8, output will be UTF-8 if input Windows-1252, the output will be Windows-1252, less surprisingly ...

Matlab not processing second for-loop -


I am trying to verify some accelerator data which I have also compiled by comparing it with Livody Displacements which Were recorded. To do this, I am trying to isolate LVDT data twice to get acceleration. However, when I run my code then there is an error.

  Undefined function or variable 'def deflvdt'   

In this investigation I have found that Matlab The second is not processing for the loop and hence the variable def deflvdt is never done.

Why is it the second skipping for the loop? Enter the code here to clear all the CLC test2 = csvread ('HZ1.csv'); % Raw data from axle time = test2 (:, 1); %% filtering f = 250;% sample frequency f_cutoff = 2; % Cutoff version f_cutoff2 = 5; Fnorm = f_cutoff / (f / 2); Cut from% normalized freak, you can change it to any value based on your requirements fnorm2 = f_cutoff2 / (f / 2); [B1, A1] = Butter (4, Unique, 'Few'); Low pass butterworth filter of order 4 [B2, A2] = butter (4, fernom 2, 'lo'); % Low pass butterfly filter order 4 filtaccZ = filtfilt (b2, a2, test2 (:, 6)); FiltLVDTZ = filtfilt (B1, A1, test2 (:, 7)); Remove %% offset Accz = filtaccZ -main (filtaccZ); LVDTs = FiltLVDTZ - Earth (Filt LVDTZ); %% Unit Conversion LVDTM = LVDTs / 1000; DM = 2: 1: (size (LVDTM) -1) for X = LVDTM (D + 1) AC% displacement for% mm to M%% LVDT displacement; Y = LVDTM (D-1); Z = x-y; % A = differnce in time (d + 1); B = time (D-1); C = A-B; X diffvdt% differnce (d) = (z / c); Deletion at the end velocity = deflate VDT; Speed ​​for acceleration for E = 1: 1: (size) (velocity -1) x2 = velocity (E + 1); Y2 = velocity (E-1); Z2 = x2-y2; In% 2 y = differnce = time (E + 1); B2 = time (E-1); C2 = A2b2; The differnce DiffDiffLVDT (E) = velocity plot (time (1: 5000), ACC (1: 5000), 'B') for ACC (z2 / c2) plot in X (time (1: 5000), excise (1) : 5000), 'R' grid on; box on legend '(DiffDiffLVDTFilter', 'Accz') Enter the code here

because

  1: 1: (size (velocity) -1)   

does not do what you want

velocity one 1xN array, size (velocity) hence [1 N] The colon operator only prefers about the first value of the array. And the array you want to loop is empty at the end

  1: 1: [1 N] -1 == 1: 1: 1-1 == 1 : 1: 0 == Empty Matrix   

Due to such problems, you should always use one of the following instead of size The loop is formed:

  The size (var, n) gives the size of the nth dimension of% var length (var)% gives the largest dimension of var numel (var) in% var Returns the number of elements    

Java Singleton.getInstance() returns null? -


I have this singleton that I am trying to use but can get apparently returning empty Are:

  class singleton {public static final string K_LEVEL = "level"; Stable singleton example = new singleton (); Private int level; Static singleton yield (return example;) int getLevel () {return level;} zero incrementLevel () {System.out.println ("increase in LEVEL" +++ level);} zero addToLevel (int x) {for (Int i = 0; i & lt; x; i ++) incrementLevel ();}} class A {public static zero main (string [] args) {singleton s = singleton.just instance (); integer i = integer GateInteger (singleton.kellev); s.addToLevel (i);}}   

I have heard that singlantans in Java are very difficult to execute and run I am in danger of situations. Is my singleton pattern wrong? I have recently changed my code to look like this, and now why is instant return returns blank? A- There is nothing wrong with your singleton: / div>

There are no concurrency problems because it is not a multithrred code. < P> You were thinking that s was zero, but this is actually i this blank ./P>

Since addToLevel takes int as a parameter, therefore integer I was autounboxed (contained from Integer to int ), but since i the null , NullPointerException was thrown off Was there. Autounboxing throws NullPointerException when the value is being hidden null .

Reason Integer.getInteger (Singleton.K_LEVEL) Back null is because you have the Java A-DelWell = 1 The opposite was java -Delvel = 1 A . The latter is the correct syntax.

javascript - TextArea cell renderer for dojo/dgrid -


I am using dgrid / grid to define table structure I multiline table cells I want to display the text. I thought how the cell editor is textier, however, It is not clear to me how to display the multi-line text to the renderer too. How can I do this? I have it:

  editor ({label: "first name", field: "first", sortable: incorrect, editor: getCellEditor, EditOn: "dblclick" Disclaimer: wrong})   

"getCellEditor" is a helpful method that gives a dijit / form / TextArea double-clicking on a cell to create a multi- The line text field is generated, however, when I terminate editing and close the cell, the cell text returns to a line display. Here's the full grid definition:

  function getCellEditor () {new textiera is back; } // To create a new constructor, different custom grids = declare by mixing in components ([grid, keyboard, selection, columnset, column receiver, editor]); Var Grid = New Custom Grid ({columnSets: [[[Editor] (label: "First name", Field: "First", Sortable: Wrong, Editor: getCellEditor, edit on: "dblclick", Dismiss Center: Incorrect} Editor] getCellEditor, editon: "dblclick", dismiss atenter: wrong}), editors [(label: "age", field: "last name", area: "last", sortable: incorrect, editor: : Age ", sortable: false, editor: getCellEditor, editOn:" dblclick ", reject center: wrong})]]], selection mode:" single ", to select // only once on cell Select a single line. For keyboard, only allow row-level keyboard navigation}, "grid");   

This is my first Javascript question, so please do not miss any missing If you need any other information to answer this question, please let me know

render cell function you define attribute in textarea widget Can.

  function GetCellEditor () {new Tekstaria back ({rows: "5"}); }   

Try this it can help you.

Windows batch file read text file and convert all to uppercase -


I just want to convert all the text to uppercase in the text file. For example, the first name, last name, full name, after Bradford, Pitt, Brad Pitt [after conversion] first name, last name, full name, Brad, PITT, BRAD PITT

Is it possible ??

Below the file you want, but if the file is large to convert then this method is slow ...

  @echo off setlocal EnableDelayedExpansion for / F "delims =" %% (% 1) in% (for "line = %% A" in% b ABCDEFGHIJKLMNOPQRTUVWYZZ) Set (Set "Line =! Line: %% B = %% B!") Echo! Line!)   

To use this program, the file's Name first paragraph Keep it in the butterfly. For example, if this batch file is touper. If it is said then:

  toupper abc.txt   

Note that this program does not contain any exclamation points and to eliminate empty lines. These limitations can be fixed if it is necessary, but the program is slowed down ...

Antonio

sql - Finding previous records after specified one and joining them -


We have this table, where players' actions are being recorded. I want to know where people buy their equipment ( item bo or sword) can be purchased at the shop or auction (in the action column) ) Therefore, when the player purchases an item, we will have to search for the verb {/ code> shop or auction (depending on what the item was bought before one of them was purchased) < / P>

  ** User Time Action Item ** 1 12:00 Auction 2 12:01 Shop 3 12:04 Shop 4 12:09 Shop 4 12:15 Bow 2 Buy Auction 2 12:19 Auction 1 12:25 Chat 4 12:33 33 Auction 3 12:47 Chat 1 12:47 Buy Swords 2 12:47 Bow 3 Buy 12:50 Sword 4 Buy 12:52 Bow 3 Buy 12:56 Bow Bought   

Result

 

python - redis-py AttributeError: 'module' object has no attribute -


I have installed redis-py on CentOS and Ubuntu, I get the same error on both of them when trying to access it

I'll do this:

  & gt; & Gt; & Gt; Import redis & gt; & Gt; & Gt; R = redis.Redis (host = 'localhost', port = 6379, db = 0)   

But if I change the directory then this will return the error.

  & gt; & Gt; & Gt; Import tracebacks (most recent call final): File "& lt; stdin>", line 1, & lt; Module & gt; File "redis.py", line 4, & lt; Module & gt; Print redis .__ version__ Attribute: There is no attribute '__version__' in the 'module' object   

always returns an error in trying with a .py script Any ideas what I am doing wrong, and how can I fix it? Perhaps a novice Python thing ...

You are doing a module name What you are working on is Redis.py and importing Python to do that instead of the actual redis module Do not, or change sys.path to make sure that the current working directory is in the list of directories to search instead of the last .

winforms - Visual c++, resize a control on mousedown -


I have created a UserControl library that contains many regular button controls.

I would like to change it on drag again via the dragging Windows messages and it is faster to do the innocent work.

I also set a correct cursor and .. back to WM_MOUSELEAVE .

  Override Virtual Zero WndProc (Message% M) {// Operating System Message Switch (MMS) {// Listen for more code //. // .. // ... case WM_MOUSEMOVE: if (m.WParam.ToInt32 () == MK_CONTROL) {debug :: WriteLine ("MK_CONTROL"); Return; } And if (m.WParam.ToInt32 () == MK_LBUTTON) {debug :: lineline ("MK_Lubutan"); If (Ismaussdown) {Debug :: Linline ("Drag Detected"); Debug: lineline ("ismausoudown:" + ismasudddown.tostring ()); Int tempX = (small) (M.L.P.M.O.OIT32 () and 0x0000FFFF); This- & gt; Shape. With = (this-> location.x-tempX); // & lt; --- does not work! Return; } Return; } And if (m.WParam.ToInt32 () == MK_MUTUTN) {debug :: linline ("MK_bootton"); Return; } And if (m.WParam.ToInt32 () == MK_RBUTTON) {debug :: WriteLine ("MK_Rubutton"); Return; } And if (m.WParam.ToInt32 () == MK_SHIFT) {Debug :: Linline ("MKCHIFT"); Return; } And if (m.WParam.ToInt32 () == MK_XBUTTON1) {debug :: lin line ("Mk_xbut1"); Return; } And if (m.WParam.ToInt32 () == MK_XBUTTON2) {debug :: lin line ("MK_XBUTTON2"); Return; } Return; // more code // // .. // ... return; } System :: Windows :: Form :: User Control :: WWFProp (M); }   

this still this-> Size.Width = (this-> location.x- e-> location.x); // & lt; --- Not working! this-> Size.Width will already remain on the default value of 400 set by the Properties window.

I know that it is possible to set the size through window messages, but I failed to understand how the C # was taken from:

  // This is C + + [DllImport ("User32.dll", for charts = charset.auto) does not seam the right syntax) Public static extern int SendMessage (HandleRef hWnd, int msg, int wParam, int lParam); [DllImport ( "User32.dll", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)] public static bool Akstrn Setvandopos (Handlrf Acdbludblud, Handlrf Acdblyuendanderrtapr, Int X, Y Int, Int CX, Int cycle, Int flag);   

Usront does not have any properties / errors that SetWindowPos

how to proceed is?

If the size of the property is a strucutre which gives value type you get a copy, you Modify, but the original remains the same. To resize the form, you can set:

this-> Size = new size (100, 100);

Use or better, width and height propetries:

it- & gt; Width + = 100;

ios6 - How to store high scores in a list in Cocos2d -


I have already created my own game in "Laser Defender" and App Store, but I have one thing that I do I can not find out how to submit a high score in a list of game games, I have a label that calculates the number of enemy ships destroyed, but I can list the best of these points in the list. How do I archive? Here my code updates the enemiesShot label:

  • (zero) Update: (ccTime) DT {

    NSMutableArray * projectilesToDelete = [[NSMutableArray alloc] init ]; For (CCSprite * throwing in _projectiles) {CGRect projectileRect = CGRectMake (projectile.position.x - (projectile.contentSize.width / 2), projectile.position.y - (projectile.contentSize.height / 2), projectile.contentSize Width, projectile.contentSize.height);

      NSMutableArray * targetsToDelete = [[NSMutableArray alloc] init]; (Target.contentSize.width / 2), target.position.y - - (CCSprite * Targets in _targets) {CGRect targetRect = CGRectMake (target.contentSize.height / 2) for target.position.x, target.contentSize Width, target.contentSize.height); If (CGRTEXectorSect (Project Protect, Target)) {[TargetOdellAlletAdd Object: Target]; }} (Remove target in CCSprite * target) {{_ targetsObject: target]; [Self-distribil: target cleaning: yes]; _enemiesShot ++; [_enemiesShotLabelSetString: [NSString stringWithFormat: @ "% d", _SharutoShot]]; } If (targets TIDELETQATT> 0) {[ProjectsAdelitalAdobject: ProjectClass]; } [To release the target]   

    }

    (throwing CCSpact * in Projectsdomyale) {[ProPixix deleted object: project]; [Remove self: projectile cleaning: yes]; } [ProjectilesToDelete release];

    try this:

    NSUserDefaults

    Saving

      NSUserDefaults * Rank = [NSUserDefaults standardUserDefaults]; // Saving an NSString [Prefetch Set Object: @ "TextOverWave" for: @ "Pest Lookup String"]; // An NSInteger Savings [Prefix Set Integer: For 42: @ "Integerkey"]; // one for double [prefess setdeud double: 3.1415 ky: @ "double key"]; // A Float Savings [Prefetch Setflat: for 1.2345678: @ "Float"]; // It has been suggested to synchronize the prefus, [synchronize the prefus];   

    Recovering NSUserDefaults * prefs = [NSUserDefaults Standard User Default]; // Getting a NSString NSString * myString = [Prefs stringForKey: @ "keyToLookupString"]; // An NSInteger NSInteger myInt = [Prefs integerForKey: @ "integerKey"] is getting; // A float float is my float = [prefix flatfork: @ "float"];

    The app is currently running some data in some NSA / MTA and when the app is going to the background, the "Saving" section is part of the "Edender Background".

    When the app starts again, then withdraw all data from "User Defaults" (Recover Code above). Place the code inside "ApplicationDidEnterForeground" when the application is started fresh, then use "ViewDidLoad" to retrieve the code.

java - Implementing BubbleSort at the end of QuickSort -


I get my bubbler and quoresort work at the end but how am I eager to change my code so that when I last 10 Elements are sorted in my quick shot, instead, I turn to BabelStore for fast overhead times.

  Fixed inte num_comps; Public static zero main (string [] args) {random random = new random (); // Maximum size of the array and the number of n sets int array_size = 32768; Int num_datasets = 10; // array set to maximum size [] vals = new int [array_size]; // Temporary for maximum size with periodic array [] tvals = new int [array_size]; // to keep the number of array operations int [] op_counts = new int [num_datasets]; Int [] op_counts2 = new int [num_datasets]; // array to capture the size of each array int [array] = new int [num_datasets]; Int i; Integer shape; (I = 0, size = 64; i & lt; num_datasets; i ++, size * = 2) array size [i] = size; For (int iter = 0; iter & lt; num_datasets; iter ++) {int curr_size = array size [iter]; // // with the random values ​​// fill array for 0-49 99 (i = 0; i & lt; curr_size; i ++) vals [i] = rnd.nextInt (4999); // Set the temporary array in the actual array for (i = 0; i & lt; curr_size; i ++) tvals [i] = vals [i]; // Bubble Sort Algorithm num_comps = 0; Bubble sort (TVL, curi_size); Op_counts [iter] = num_comps; // SYSTEM.out.println ("Number + compass" in "+ + +" is "+ num_comps"); Num_comps = 0; Quick Aart (TVL, curi_size); Op_counts2 [iter] = num_comps; } System.out.println ("n bubble sort order calculation quick sorted o"); For (int k = 0; k & lt; num_datasets; k ++) {System.out.println (array size [k] + "\ t \ t" + op_counts [k] + \ \ \ \ t \ t \ t "+ Op_counts2 [k]]); }} Fixed zero bubble sort (int call [], int curl_ shape) {int temp; For (int i = 0; i & lt; curr_size - 1; i ++) {for (int j = 0; j & lt; curr_size - i - 1; j ++) {// swap num_comps = num_comps + 1; If (Val [J + 1] and lieutenant vals [j]) {temp = vals [j]; Walls [J] = Wall [J + 1]; Walls [J + 1] = Temporary; }}}} Fixed zero instant sort (int call [], intra_isize) {quickSort_R (wal, 0, curu_size-1); } Fixed Zero Accelerated SRT_R (int vel [], int l, int r) {if (l & lt; r) {if ((r -1) == 1) // two elements - trivial sort {num_comps = num_comps + 1; If (Wal [L]> Wal [R] swap (WAL, L, R); Return; } // partition on pivot int s = partition (wal, l, r); // Recurse QuickSort_R (vals, l, s-1) at two split values; QuickSort_R (Wall, S + 1, R); }} Fixed Ent Partition (int call [], int l, int r) {int mid = (l + r) / 2; Int p = averageoffithry (wals, l, r); // Swap with first element swap (vals, l, p); Int pivot_val = vals [L]; Int i = l; Int j = r + 1; Do {num_comps = num_comps + 1; Taxes {i = i + 1; Num_comps = num_comps + 1; } While (vals [i] & lt; pivot_val); Do {j = j - 1; Num_comps = num_comps + 1; } While (wal [ja] gt; pwat_val); Swap (vals, i, j); } While (i & lt; j); Swap (vals, i, j); // Cancel the last swap swap (Wals, I, J); Put pivot on // j, return its correct position j; } StaticIndianAphththry (int val [], int first, it end) {int mid = (first + last) / 2; If (wal [first]   

}

The ejp is correct, but if you want For this, just modify your code like this:

  public static zero quickSort_R (integer vals [], int l, int r) {if (l    

django queryset with count filter -


I have done the whole Django tutorial, but I could not understand how to display the website, with the polls only bigger than Poll 0 is. I know that poll.objects.get (pk = 1) .choice_set.count () will return the number of options I have, so I tried filter poll.objects.filter (choice_set.count ()> gt; 0 and it did not work. Can someone please help me? Thank you

This is my actual quercet.

  queryset = poll.objects.filter (pub_date__lte = timezone.now) .order_by ('- pub_date') [: 5]    

  queryset = poll.objects.annotate (count = count ('options')). Filter (pub_date__lte = timezone.now, count__gt = 0) .order_by ('- pub_date') [: 5]    

objective c - How to redirect certain NSLog output to a file -


I am using code to write all NSLogs in a text file. How do I choose NOLOGS, which I just need to file? NSArray * paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString * document directory = [path item overindexx: 0]; NSString * logPath = [Document Directory Stringbacking Path Component: @ "MOVbandlog.txt"]; // Freepen ([logpath cStringUsingEncoding: NSASCIIStringEncoding], "a +", stderr); FreePen ([logpath filesystem refraction], "A +", Stadrer); You can create two versions of NSLog as MYLog using only NSLog, but will show on

Console.

So basically you need to create two macros or methods.

Rails 3 Routes - prepend all url paths with set string -


I have been asked to change the route on a rail project that the route will only respond to requests where the name of the app (or Other arbitrary string) is the first string after the domain name, e.g.

instead of www.thething.com/appname/users/sign_in www.thething com / users / sign_in

< Code> www.thething.com/appname instead of www.thething.com

www.thething.com/appname/search Instead of www.thething.com/search

I have suggested using a subdomain instead, but the client about the url's willingness in the above format Very specific.

www.thething.com will be a splash page with a link to www.thething.com/appname , in the future, new folders in the future Intended to add additional apps / pages with names.

Is there an easy way to modify the routes so that all the routes

< / Div> "text">

An option wraps all existing routes into: namespace: appname ... Termination , such as:

  # config / routes.rb Appname :: Application.routes.draw namespaces: APNM # Existing routes have expired here   

I'm not sure that this is the most beautiful solution, but it's all the routes For / appname will be done first.

manually enter a subtotal value in a vb6 flexgrid -


I have a flexgrid with grouping, and one by that grouping. All columns except one are numeric, which is not one in the 'x / y' format, '1/5', i.e. 1 out of 5 items supplied.

If I do a Yoga with a flexX, then it shows the first number in the pair, that is, in the example given above, it shows 1 in the form of decimal and 1.00 in subtotal

First of all, I tried to find a way to collect the amount on one more column, that is, I can put different values ​​in different columns, Add these to the equivalent column of the first column, but I can not find any way to do this.

And even if I find a way to do this, then I want to be able to be in a custom format, subtle, then it appears as' 3/17 ', that means' Sub-totals of '3/17' in sub-total '1/5' and '2/12'

If I can not do it, I wonder if I can use the custom post line and manually enter sub-sum value of '3/17', but that too unavailable is.

My question is, what is the way to get it?

I think you are using VideoSoft FlexGrid which I never sed, so I Can not help you with specific methods of control

Although you can do it easily with a standard MSFlexGrid control, and maybe you can do this with the VideoSoftFlexGrid.

Take a look at the sample project:

  'with 1 form:' 1 Msflegrid control: Name = Msfaksgrid 1 choice clearly Private Sub Form_lod () Dim Elanjiaro Long MSFlexGrid1 as long as LNGOL .ows = 10 .Cols = 4 .FixedRows = 0 .FixedCols = 0 for lngRow = 0 .Rows to - 2 for lngCol = 0 .Col to - 2 .TextMatrix (lngRow, lngCol) CSTR (100 = * LngRow + lngCol) Next lngCol. TextMatrix (lngRow, .Cols - 1) = CSRR (LNGRO) & amp; "/" & Amp; CSTR (lngRow * lngRow) with Next lngRow and 'MSFlexGrid1 End Sub Private Sub Form_Resize () MSFlexGrid1.Move 0, 0, scalewidth, ScaleHeight End Sub Private Sub MSFlexGrid1_Click () Dim' subtotals MSFlexGrid1 long as lngCol with lngCol = 0 to calculate .Cols - 2 .TextMatrix (.Rows - 1, lngCol) = CSTR (GetTotal (lngCol)) Next LngCol KTextMatrix (KRows - L, KCols - L) = GetTotalSpecial (.Cols - 1) to finish with MSFlexGrid1 end sub Private function GetTotal (lngCol) long long MSFlexGrid1 lngTotal = 0 lngRow = 0 .Rows with as dim lngTotal long as dim lngRow For - 2 lngTotal = lngTotal + val (.exe TMatrix (lngRow, lngCol)) Next lngRow end 'MSFlexGrid1 GetTotal = lngTotal End Function Private Function GetTotalSpecial (to lngCol) as as string dim lngRow Long lngTotal2 as dim lngTotal1 Long, dim strPart long () As with string MSFlexGrid1 with lngTotal1 = 0 lngTotal2 = 0 to lngRow = 0. Lines - 2 Striprt = Split (. Text matrix (Elanjiaro, .COLS-1), "/") If Ubound (Striprt) = 1 then lngTotal1 = LngTotal1 + VAL (strPart (0)) lngTotal2 = lngTotal2 + VAL (StrPart ( 1)) End if the next lngRow end with 'MSFlexGrid1 GetTotalSpecial = CSTR (lngTotal1) & amp; "/" & Amp; CSRT (lngTotal2) and function   

This will load a grid with some values, and when you click on the grid, subtotals will be calculated and filled in the last line.

lotusscript - Lotus Notes Domino Getting Date Difference -


text after "itemprop =" text ">

I think the time difference between the two fields will be calculated using a code lotusScript, now I am between Want to calculate the difference of dates? I have started a lot and I have got minimal knowledge about it. Hope you can help me. Here is the code that I have made to calculate the time difference: Sub UpdateDuration () dims ws new notesUIWorkspace dim uidoc NotesUIDocument slow startTime NotesDateTime slow endtime NotesDateTime set the dimension integer set uidoc form As in as far as = ws.CurrentDocument then exit uidoc.FieldGetText ("StartTime") = "" (StartTime ") followed by subthifference uidoc.FieldGetText" = "" then sub Set the starttime then set StartTime = New NotesDateTime (uidoc.FieldGetText ("StartTime") set endtime = New NotesDateTime (uidoc.FieldGetText ("ENDTIME")) duration = endtime.TimeDifference (StartTime) Idoc.FieldSetText (call "duration", call cust (duration)) uidoc.Refresh () End Sub

The timer gives the number of seconds between two notesetimes. One day is 60 * 60 * 24 seconds, and it works up to 86400. So just type your code up properly and divide the result to 86400. (The only other thing you want to change is your field and variable name, to reflect the fact that you are working with date input instead of time.)

c++ - How to check boost thread is running and Kill it -


In my program, it starts a boost thread and holds the handler as a member of the main thread. When the user clicks the cancel button I also need to check the start thread to run still, and if it is running then it is necessary to kill that specific thread. Here is the pseudo code.

Fraud Thread

  int i = 1; Promotion: Thread: m_uploadThread = Promotion: Thread (Uploadfile, I);   

This method is used to ascertain that the thread is still running, but it is not working

  boost :: posix_time :: time_error timeout = boost :: posix_time :: milliseconds (2); If (this-> uploadfast.timed_join (timeout)) {// here should kill this thread}    

Return value means that the thread is completed before the call timed out. And it looks like what you want

  if (! It-> uploadfast.timed_join (timeout))    

javascript - .click() is called at times when there is no click -


मैंने एक जावास्क्रिप्ट फ़ंक्शन के अंदर एक इनपुट बटन प्रकार को .click फ़ंक्शन जोड़ा है।
। क्लिक करें फ़ंक्शन कॉल एक और जावास्क्रिप्ट समारोह। लेकिन किसी कारण से .click फ़ंक्शन को हर समय कहा जाता है। यहां तक ​​कि जब तत्व पर कोई क्लिक नहीं होती है।
नीचे मेरा कोड है मेरी मदद करने के लिए धन्यवाद।

  फ़ंक्शन लोडबुक (यूआरएल) {चेतावनी (यूआरएल); }; फ़ंक्शन लोडअीलबुक्स (यूआरएल, अटैप प्वॉइंट) {var शीर्षक = "यह कुछ कोड खराब कोड है"; Var classname = title.replace (/ \ s / g, ""); Var html स्ट्रिंग = '& lt; div class = "' + classname + '" & gt; & lt; इनपुट प्रकार = "बटन" मान = "' + शीर्षक + '" & gt; & lt; / div & gt;'; $ (HtmlString) .appendTo (attachPoint) .click (loadBook (यूआरएल)); };   

attachPoint एचटीएमएल में एक संदर्भ है जो निम्नलिखित लाइन से मिल रहा है।

  var attachpoint = document.query सिलेक्टर ( '.buttonAttachPoint');    

आसान गलती वहाँ (यूआरएल) पैरामीटर को शामिल करके, आप वास्तव में लोडबुक फ़ंक्शन को तुरंत कॉल करें, बजाय लोडबुक को क्लिक हैंडलर के रूप में प्रदान करने के बजाय। / P>

आपको क्या करने की आवश्यकता है:

  $ (html स्ट्रिंग) .appendTo (attachPoint)। क्लिक करें (फ़ंक्शन () {loadBook (URL)});   

एक बेजोड़ फ़ंक्शन बनाएँ जो लोडबुक सीधे चलाने के बजाय लोडबुक चलाते हैं।

jquery - Disable hover state of a html tag -


I want to disable the hover state of my HTML element but I am not using CSS on over over sever of CSS.

Here are my code lines:

  & lt; Div id = "test" & gt; Hello World & lt; / Div & gt; & Lt; Style & gt; #teest {color: red; Limit: 1px blue solid;} #Test: Hover {Color: green; Border: 1px blue solid;} & lt; / Style & gt;   

In this situation, 'Hello World' will be green when on the mouse, but I want nothing to happen when the mouse ends and no new CSS is disabled . What is a way to disable hover state by javascript / jquery?

Please help me please

You can hover position with this jQuery code Can disable:

  $ (document) .ready (function () {$ ('# test'). Hover (function () {$ ('# test'). CSS ( 'Color', 'red');});});    

Update with select in mysql -


I am updating table_a with the stored variables in Table_A. But when I am trying to update with the selected query, I get errors, please help me Thank you very much

This is struct of 2 tables:.

  do not create tables, table_a` present (`fk1` integer (11) default zero,` avg_100` int (11) default faucet, `avg_score` int (11) default null, Cvg_date` datetime default faucet) engine = InDebby default charge = latin1; (`Fk1` does not form an integer table) exist table_b` (11) No NULL default '0',` avg_100` integer (11) default zero, `avg_score` integer (11) default zero,` cvg_date` integer (11) Default faucet) engine = InDebbi default charset = latin1;   

and when I try to execute the query

  update table_a is a left join (FK1 as avg_score, avg_score) (avg_100, FK1, SUM (Avg_100), Max FK1 by table_b group as cvg_date (cvg_date)) as B1) b as a.fk1 = b.fk1 set a.avg_score = b.avg_score, a. Avg_100 = b.avg_100, a.cvg_date = b.cvg_date   

I got an error:

  [er] 1064 - an error in your SQL syntax is; On the line 4, check that the manual is used for the correct syntax near the corresponding for its server version 'a.fk1 = b.fk1 set a.avg_score = b.avg_score, a.avg_100 = b. "B" and "b1" in the table returned by selection, avg_100b, 'code'   

  UPDATE table_a Add a left (select fk1, SUM (avg_100) avg_100, average (avg_score) avg_score, MAX (Cvg_date) as cvg_date from table_b group Ra fk1) a.fk1 = b.fk1 set at AS B on a.avg_score = b.avg_score, a.avg_100 = b.avg_100, a.cvg_date = b.cvg_date    < / Html>

ios - How to set Action for UIButton in UITableViewCell -


मेरे पास XIB फ़ाइल है TimerCell.xib के साथ UITableViewCell cellForRowAtIndexPath में दूसरे वर्ग में मैं यह UITableViewCell आरंभ करें:

  स्थिर NSString * CellIdentifier = @ "cellTimer"; टाइमर सेल * सेल = [टेबलव्यू डेक्यूवर पुन: प्रयोज्य सेल विथआईडेंटिफायर: सेलआईडेंटिफायर]; अगर (सेल == नीला) {// सेल = [[टाइमरसेल आलोक] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier]; NSArray * nib = [[NSBundle mainBundle] loadNib नामांकित: @ "टाइमरसेल" स्वामी: स्वयं विकल्प: शून्य]; सेल = [निब ऑब्जेक्टऐटइंडएक्स: 0];   

मेरे टाइमरसेल में मेरे पास दो UILabel और एक UIButton है। इस बटन के लिए मैं किसी विधि को कार्रवाई सेट करना चाहूंगा

मैं यह कैसे कर सकता हूँ? और वास्तविक समय में मेरी पृष्ठभूमि उलटी गिनती टाइमर के पहले UILabel डेटा में कैसे दिखाना है?

कोड का यह भाग आपकी मदद करेगा <प्री> स्थिर NSString * CellIdentifier = @" सेलटाइमर "; टाइमर सेल * सेल = [टेबलव्यू डेक्यूवर पुन: प्रयोज्य सेल विथआईडेंटिफायर: सेलआईडेंटिफायर]; अगर (सेल == नीला) {// सेल = [[टाइमरसेल आलोक] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier]; NSArray * nib = [[NSBundle mainBundle] loadNib नामांकित: @ "टाइमरसेल" स्वामी: स्वयं विकल्प: शून्य]; सेल = [निब ऑब्जेक्टऐटइंडएक्स: 0]; UIButton * बटन = [UIButton बटन के साथप्रकार: UIButtonTypeRoundedRect]; button.tag = indexPath.row; [बटन addTarget: स्वयं कार्रवाई: @ सिलेक्टर (एएमथुट :) कंट्रोल ईवेंट्स: यूआईकंटोलइवेंटटीचडाउन]; [बटन सेटटाइटल: @ "सेलबुटन" के लिए स्टेट: यूआईसीओन्ट्रॉलस्टेटअनॉर्मल]; Button.frame = CGRectMake (80.0, 0.0, 160.0, 40.0); [Cell.contentView addSubview: बटन]; } रिटर्न सेल; } - (शून्य) एक विधि: (UIButton *) प्रेषक {एनएसएलॉग (@ "मैंने एक बटन% डी क्लिक किया है", प्रेषक। Tag); }

आशा है कि यह मदद करता है !!!

actionscript 3 - AS#3 organize variables loaded from PhP -


I have a problem in how to organize my variable in PHP through PHP scripts. Array type format so I can loop through them. Below are some code. function full handler (event: event) {// php var after loading symbols // Array: Array = new Array () SymbolsArray.push (evt.target.data.symbol_1) ; // php named variable: symbol_1, symbol_2 trace (evt.target.data); }

The above is allworking, the PHP variable is listed as the symbol 1, symbol_2 etc.

Instead of pushing each variable into different arrays, A loop, with rows of:

  function full handler (event: event) {var symbol: erre = new array () var counter = 1 symbolsArray.push (evt.target.data. Symbol_ + counter); This issue is trace (symbol [0]);     <$ code> $ returnVars ['symbol_1'] = $ virtualReel1 [0]; $ Returnwars ['symbol_2'] = virtual real 1 [1]; $ Returnwars ['symbol_3'] = virtual real 1 [2]; $ Returnwheres ['symbol_4'] = virtual real2 [0]; $ ReturnVars ['symbol_5'] = Virtual Real 2 [1]; // etc $ return string = http_build_query ($ returnVars); Counterpart $ returnString;    

Returned data can be treated as an object (object) You can loop through this:

  Function Full handler (Event: Event) {var symbol Array: array = new array (); For each (var obj: object evt.target.data) {symbolsArray.push (obj); }}   

If you know that all the items are the same type, then you can cast the object. Example: If all numbers:

  symbols (number (obj));   

or strings:

  symbols (strings (OBJ));    

C++ link issue after switching to /MT -


I am working on an application that should run on any Windows NT machine. Today I was trying to deploy my application on a new machine and I suddenly get an error that msvcp100.dll is missing. I started digging into that problem and found the solution only what I did The project was to replace runtime library to / m> multi-threaded (/ MT) .

But after going to the current mode I'm not getting the link error, I'm not sure why and CAS It's exactly what you please help me? Thanks!

Enter image details here

< Div class = "post-text" itemprop = "text">

You do not want to deploy the debug build, compile it with release settings (including the release version of run-time library) and you will not have that problem Debug info can be enabled on the release build ... it uses debug libraries that cause problems)

animation - Is this possible to change flash document resources (images etc.) dynamically? -


I created an animated banner in Flash. Now I want to use the admin to dynamically change the image of the admin panel. I am Since the output of my animation developed in Flash is just a single SVF file ... then how to do it? Is it possible or not with the help of javascript or jquin ....

As far as I Know (someone can improve me on this), I do not believe that you can do once the image is complied with as part of the SDF, then it is effectively 'baked' is a solution SWF To write the external images from a URL to be dynamically loaded so that they can be Not, which may be indicated after the image is determined by the administrator.

excel vba - VBA favourite code management -


छवि दर्ज करें यहाँ विवरण

जैसे ही विजुअल स्टूडियो हमें अपना पसंदीदा कोड टूलबॉक्स में खींचने की अनुमति देता है और बाद में इसे किसी भी प्रोजेक्ट में उपयोग कर सकता है क्या वीबीए इस प्रकार की कार्यक्षमता को किसी भी मौके से अनुमति देता है। फवाऊर्टी / रीप्टीटीवी vba कोड का प्रबंधन करने का सबसे अच्छा तरीका क्या है जो मैं इसे कई कार्यपुस्तिकाओं में उपयोग कर सकता हूं?

Excel में आप संभवत: Personal.XLSB फ़ाइल का उपयोग कर सकते हैं जो कि सभी उप-रूटिनों के लिए कंटेनर का हो सकता है जो आप अक्सर प्रायः संदर्भित करते हैं। आप उन्हें मॉड्यूल, क्लास मॉड्यूल में बना और व्यवस्थित कर सकते हैं। कुछ UserForms वहाँ के रूप में अच्छी तरह से रखा जा सकता है हर बार जब आप एक्सेल पर्सनल। एक्सएलएसबी खोलते हैं तो पहली खोला वर्कबुक होगी।

'Personal.XLSB' बनाने के लिए, यदि आपके पास यह नहीं है? एक्सेल पर जाएं, रिकॉर्डिंग मैक्रो शुरू करें, लेकिन दूसरी प्रेस में 'ओके मैक वर्कबुक' जैसे कुछ चुनिए, इससे पहले कि आप प्रेस को दबाएं। हर बार जब आप एक्सेल को अपने कोड में सभी बदलावों को रखने के लिए छोड़ते हैं, तो उसे बचाने के लिए मत भूलना।

codeigniter - gocart session expiration, i want to show alert message -


During the session timeout, I want to show the warning message in gocart that the session has expired. I know that session time will be config file, but how to show a warning message when session expires

< P> To check the expiration of the best session, check the value in the session or not. If the session is not ended ... and instead of warning, to show you the error codeigniter Flashmsg can redirect it to another page.

Example.

  if (! $ -User-> user data ('youritem') {FlashMsg ('error', not in session (session expired) ; Redirected (/ borrow / you / wish);})    

Print all Unique Values in a Python Dictionary -


I am struggling with a small problem in Python (my program is currently version 3.2.3).

I have a dictionary that looks like this (this is just an example, actually taken from any other post):

  [["abc" {"Pqr": "music"}, {"pqr": "music"}, {"pqr"}, {"pcc": "movies"}, {"apc": "game"}, {"ABC": "music"}, {"xyz" : "Movies"}, {"(" Pqr ":" sports "}, {" pqr ":" news "}, {" pqr ":" sports "}]   

I Simply want to print a list of unique () values, eliminating duplicates at the end of this list, I would like to print the number of unique values ​​in the dictionary :

  Movies Sports Music News 4   

Any help was appreciated. Here are some other posts I had found that were related to some extent, But I do not have enough python to implement this specific problem.

here Use as it contains only unique items. >

  • {= "abc": "movies"}, { {"Pcc": "music" "," {"pqr": "music"), {"abc": "sports"}, {"abc": "music"}, {"xyz" : "Movies"}, {"pqr": "sports"}, {"pqr": "news"}, {"pqr": "sports"}]> gt; & Gt; & Gt; S = set (for val in DIC in val in dic.values ​​()) gt; & Gt; & Gt; S set (['movies', 'news', 'music', 'sports'])

    To get the expected output to the loop on this set:

      for x in s: print x print lane (lens) # length of set after loop for print ... movies news music play 4   

    this line S = set (dic.values ​​()) is equal to : .values ​​(): s.add (val)

  • Change language for YouTube embed -


    Is it possible to change the language of the YouTube embedded player? For example, in German to change things like "full screen", "change quality" etc?

    Thank you.

    How are you embedding it? If it is only with the embed URL, then you can do something like adding the parameter "hl = de" and "persist_hl = 1" to the URL. Like:

    I have just searched "persist_hl" by checking the URL to display YouTube in "German" by adding "hl = de" to a "basic" YouTube page. I have not received any information about this and what is this.

    Edit:

    I suspect that my answer is legitimate. The "Persist_hl" parameter will change the user's cookie for the site of YouTube and will force the new language.

    Edit 2:

    It seems that you should not force the language anyway because it depends on the user's preference:

    Answer Jeff Pausnik, who works for Google, I think this applies to your question.

    SQL Server 2008 only delete if field is unique -


    मेरे पास वर्तमान में यह है:

      टी से हटाएं (SELECT *, rn = ROW_NUMBER () (सड़क, सीएएसटी (पीएससी के रूप में सीएसआर (4)) कास्ट द्वारा आदेश (पीसी के रूप में सीएसआर (4))) स्थानीय लोगों से जहां DATALENGTH (पीसी) & lt; 13) टी WHERE rn & gt; 1   

    लेकिन मैं केवल अगर पीसी कॉलम एक ही है तो हटाना चाहता हूं।

      से हटाएं (SELECT rn = ROW_NUMBER ()) & gt; 1   

    पर उदाहरण देखें

    css - footer getting mixed up in content area. -


    My footer is adding posts on the music page and I do not understand why it is mixed. FYI, I'm using a WordPress plugin, to create posts on custom fields, music pages, as opposed to other pages.

    music.php:

      & lt ;? Php / * Template name: Music page * / get_header (); ? & Gt; & Lt; Div class = "wrapper" & gt; & Lt; Div id = "music-content" & gt; & Lt; P & gt; this is music. Php & lt; / P & gt; & Lt ;? Php $ args = array ('post_type' = & gt; 'music'); $ The_query = New WP_Query ($ Args); ? & Gt; & Lt ;? Php if (have_posts ()): while ($ the_query-> is_pause ()): $ the_query-> The_post (); ? & Gt; & Lt; H3 & gt; & Lt; A href = "& lt ;? php the_ paramchink () ;? & gt;" & Lt ;? Php the_title (); ? & Gt; & Lt; / H3 & gt; & Lt ;? Php the_field ('Description'); ? & Gt; & Lt; ----- This plugin has to do with & lt ;? Php timeline; other:? & Gt; & Lt ;? Php endif; ? & Gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt ;? Php get_footer (); ? & Gt;   

    Style.css:

      / * Music page * / # music-content {display: block; Swim left; } / * Footer * / footer {background color: #EEAAA; Display area; Clean both; Border-top: 1px black solid; }    

    You just have to & lt; A & gt; The link tag is in your content, and your links are inaccurate.

    & gt; to A href = ".." code> and no tag off & lt; / A & gt; after anchor text

      & lt; H3 & gt; & Lt; A href = "http://listentotheway.com/music/ here-is-second-one /" here another & lt; / H3 & gt; Yay & lt; H3 & gt; & Lt; A href = "http://listentotheway.com/music/this-is-a-music-project/" This is a music project & lt; / H3 & gt; This is where you get the music   

    It should look even more:

      & lt; H3 & gt; & Lt; A href = "http://listentotheway.com/ music / here-is-second-one /" & gt; Here's another & lt; / A & gt; & Lt; / H3 & gt; Yay & lt; H3 & gt; & Lt; A href = "http://listentotheway.com/music/this-is-a-music-project/" & gt; This concert is & lt; / A & gt; & Lt; / H3 & gt; This is where you get   

    in your PHP:

    & lt; H3 & gt; & Lt; A href = "& lt ;? php the_permalink () ;; & gt;" & gt; & Lt ;? Php the_title (); ? & Gt; & Lt; / A & gt; & Lt; / H3 & gt;

    php - How to retrieve data from drop down list selection to a table? -


    I am trying to learn how to program and this is my first project. I know that I should read the tutorial but I Stuck with it. In fact, want to complete it by itself, but it is getting frustrating. Can someone guide me in the right direction? So, how do I dump data to table cells based on drop down list selection? Any help greatly appreciated the code so far:

      & lt; Select & gt; & Lt; Options & gt; - Choose a lot - & lt; / Options & gt; & Lt ;? Php mysql_connect ('localhost', 'root', ''); Mysql_select_db ('pl_base'); $ Query = "Select LIT_number FROM pl_table"; $ Result = mysql_query ($ query); While (list ($ lot_number) = mysql_fetch_row ($ result)) {resonance "& lt; option value = $" $ Lot_number. " \ "& Gt;" $ Lot_number "& Lt; / option & gt;"; }? & Gt; & Lt; / Select & gt; & Lt; / Br & gt; & Lt; Table range = "1" id = "table" & gt; & Lt; TR & gt; & Lt; Thth width = 80 height = 30> lott & lt; Br / & gt; Number & lt; / Th & gt; & Lt; Width = 110 height = 30> description & lt; / Th & gt; & Lt; Thth width = 90 height = 30> Palette & lt; Br / & gt; Number & lt; / Th & gt; & Lt; Width = 60 height = 30> Net & lt; / Th & gt; & Lt; Width = 60 height = 30> gross & lt; / Th & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; # & Lt; / TD & gt; & Lt; Td rowspan = "5" & gt; Echo results here & lt; / Td> & Lt; TD & gt; & Lt; P & gt; Total & lt; / P & gt; & Lt; / TD & gt; & Lt; TD & gt; # & Lt; / TD & gt; & Lt; TD & gt; # & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TD & gt; # & Lt; / Td> & Lt; Td colspan = "3" & gt; # & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Th & gt; & Amp; & Lt; / Th & gt; & Lt; Th & gt; & Amp; & Lt; / Th & gt; & Lt; Th & gt; & Amp; & Lt; / Th & gt; & Lt; Th & gt; & Amp; & Lt; / Th & gt; & Lt; / TR & gt; & Lt; / Table & gt;   

    Table in the data base:

      + ---------------------- - --- + ------------------------- + --------- + ------- + | ID | Lot_number | Descr | Pallet_number | Pure | Gross | + -------------------------- + ---------------------- --- + --------- + ------- + | 1 | 111 | Black | 1 | 800 | 900 | 2 | 111 | Black | 2 | 801 | 9 01 | | 3 | 111 | Black | 3 | 802 | 902 | | 4 | 222 | White | 1 | 800 | 900 | 5 | 222 | White | 2 | 801 | 9 01 | | 6 | 222 | White | 3 | 802 | 902 | + -------------------------- + ---------------------- --- + --------- + ------- +    

    Choosing a number in a selected element will not directly use PHP because PHP is a server side language, you have to submit the data as a form and then display it.

      & lt ;? Php mysql_connect ('localhost', 'root', ''); Mysql_select_db ('pl_base'); $ Query = "Select LIT_number FROM pl_table"; $ Result = mysql_query ($ query); ? & Gt; & Lt; Form action = "" method = "post" & gt; & Lt; Select name = "option_chosen" & gt; & Lt; Options & gt; - Choose a lot - & lt; / Options & gt; & Lt ;? Php while (list ($ lot_number) = mysql_fetch_row ($ result)) {echo "option" = "" $ lot_number " "\" & Gt; "$ Lot_number." & Lt; / Options & gt; ";}? & Gt; & gt; Selection & gt; & lt; input type =" submit "value =" submit "/> gt; & gt; & gt; & lt; / br & gt; ; & Lt; Table border = "1" id = "table"> gt; & lt; tr & gt; width = 80 height = 30> lot 
    number description & lt; / th> & lt; th width = 90 height = 30> palette & lt; br / & gt; numbers & lt; / Th & gt; Width = 60 height = 30> Net & lt; / th> & lt; width = 60 height = 30> gross & lt; / th> & lt; / tr & Gt; & lt ;? Php if ($ _ SERVER ['REQUEST_METHOD'] == 'POST') {$ option_chosen = $ _ POST ['option_chosen']; $ Query = "SELECT * to pl_tabl E WHERE lot_number = '$ option_chosen' "; $ run = mysqli_query ($ query); $ line = mysqli_fetch_array ($ run, MYSQLI_ASSOC); echo" & lt; Tr & gt; & Lt; Td> ". $ Line ['lot_number']." & Lt; / Td> ";" line ['descr']. "And " row $ ['pallet_number'] resonates. "& Lt; / td & gt;"; & Quot; & Quot; TD & gt; & Quot; $ Line ['net'] "& Lt; / td> & lt; td & gt; $ ['Gross'] "& Lt; / td> & lt; / tr & gt;"; }? & Gt; & Lt; / Table & gt;

    vb.net - DirectoryServices.AccountManagement User Profile Profile Path -


    मैं VB.NET DirectoryServices.AccountManagement के माध्यम से सक्रिय निर्देशिका में उपयोगकर्ता प्रोफ़ाइल प्रोफाइल पथ जानकारी जोड़ने की कोशिश कर रहा हूँ < / कोड> लेकिन ऐसा करने में सक्षम नहीं लगता है मैं लॉगऑन स्क्रिप्ट सहित सभी अन्य फ़ील्ड जोड़ सकता हूं जो एक ही टैब में प्रोफ़ाइल पथ के रूप में है।

    मैं देख रहा हूं, लेकिन मैं प्रोफ़ाइल पथ से संबंधित कुछ भी नहीं देख सकता।

    प्रासंगिक कोड:

      डिम सीटीएक्स न्यू प्रिंसिपल कॉन्टैक्स (कंटैक्सटाइप टाइप.डेमेन, "कुछ ही समय पहले", "ओयू = डोमेन ऑब्जेक्ट्स, डीसी = कुछ ही समय पहले, डीसी = स्थानीय") मंद उपयोगकर्ता के रूप में नया यूज़रप्रिनिपल (ctx, "न्यूयूसर", "पास @ 1 डब्ल्यू 0 वें 101", ट्रू) यूज़र.जीवननाम = "जीननाम" यूज़र। नाम = "सरनेम" यूज़र। होम डायरेक्टरी = "\\ मायहोम डायरेक्टरी \" यूजर.होमड्राइव = "जेड: यूजर" ExpirePasswordNow () user.Save ()    

    यह दिन में थोड़ा देर हो चुकी है लेकिन बस किसी और की तलाश में है।

    UserPrincipal वर्ग के पास किसी कारण के लिए इस संपत्ति नहीं है आप UserPrincipal को सहेजने के लिए अंतर्निहित निर्देशिका प्रविष्टि बाद प्राप्त कर सकते हैं।

      DirectoryEntry entry = (DirectoryEntry) user.GetUnderlyingObject (); प्रविष्टि। प्रॉपर्टीज़ ["प्रोफ़ाइलपैथ"]। मान = "कुछ स्थान"; entry.CommitChanges ();    

    winforms - DevExpress LookupEdit, Select by item -


    How to set the selected element of DevExpress LookupEdit by item? Ie, set the selection of LookupAdit based on the LookupAdit datasource given to an object.

    You should set the property with the value from your data source according to the property < P> Here's a sample showing this approach:

      var dataSource = new list & lt; Person & gt; {New person () {id = 0, name = "John", age = 27}, // ... new person () {id = 101, name = "mary", age = 23},}; LookupEdit1.Properties.DataSource = Data Source; LookupEdit1.Properties.DisplayMember = "name"; LookupEdit1.Properties.ValueMember = "ID"; LookupEdit1.EditValue = 101; // Select the person with ID == 101 // ... lookupEdit1.EditValue = lookupEdit1.Properties.GetDataSourceValue ("ID", 1); // Select the person from your ID     from the second line

    How to retrieve column name from the table and parse the results for each fieldname in sql 2012 -


    How do I get the name of the table of the table on which I am selecting? I am trying to add results to the previous results for each field name.

    Example (does not work):

      Announce @navarchar as concurrent (maximum) concat (separate parse (@ parcel, colonname (field 1 ), N ':' For some time, choose from field 1))   

    some time:
      id, unit `------ --- `1, quart 2, gallon 3, liter   

    result

    id: 1, 2, 3 unit: quarters, gallon, liters

    I am trying to do this in every field in my table that contains text, texture, four where the size is less than 4000, Use of the selection statement:

    I am trying to parse the actual list of fields for my table (this works):

      Top 1000 SCHEMA_NAME ( [O] .checkma_id] [S] [name] [name], [c] .name [field name], [t] .name [type], [c] [name] as [schema name]. [S] [S] [s] as [l] [length], [c] .precision, [c] .scale, [c] sys.sysobjects [s] [s] internal association sys.all_columns as [s] .id = [C] .object_id internal [syn: System_type_id = [t]. Interactive sys.objects [s] at [o] .id = [o] .object_id where [s] .xtype such as 'U' and [t] .Name 'sysname%' and [ S] .name = N'TableName '  

    In this way, I can clearly see the names of each field in which a different result is set.

    If you know the list of files, then you can use something like this: Select the list1 union all as ORDER for some time by ID for SELECT (SELECT cast (id as varchar (50)), 'xml path (' ') (SEDE unit + ',' ORDER for some time 'by id for XML path (' ')) list2 ...

    Stanford NER: How do I create a new training set that I can use and test out? -


    In my understanding, to create a training file, you put your words in a text file. Then after each word, add a place or tab to the tag (such as PAR, LOC, etc ...)

    I have also copied one sample from a sample file to a word pad. How do I get them into a gz file, which I can input and use in a classifier?

    Please guide me though. I am a newbie and quite inefficient with technology.

    Your training file ( training - data.tsv ) should look like this :

      IO has been transferred to Vancouver Venue BC LOCATION Tomorrow o   

    Where o means "outside ", As is not a named unit

    where the space between columns is a tab .

    You do not put them in the ser.gz file. The CRGs file classifier model is created by the training process.

    To train a classifier driver:

      anticipated java -cp Ner.jar edu.stanford.nlp.ie.crf.CRFClassifier- my-classifier.properties   

    Where my-classifier.properties will look like this:

      trainFile = training-data.tsv serializeTo = my- Classification-model.ser.gz map = word = 0, answer = 1 ...    

    compiler construction - How to build PIC controller program on Linux? -


    We are doing a project and using p30f3013 microchip (PIC 30 family of chips). Right now we are writing a software for our chip. The operating system we are using is Linux Ubuntu 12.04. Below is a small file containing some functions.

      #include "p30f3013.h" #include "hardware.h" // init_lcd (with SP1) with U2A1 zero {// after any reset 500 milliseconds SPI1BUF = 0; // Buffer SPI1STATbits. SPIEN = 1 was displayed; // Enable SPI SPI1CONbits. MSTEN = 1; SPI1CONbits.SSEN = 1; SPI1CONbits.PPRE = 0; } Zero write_char (char character) {// wait in between two consecutive four writing in the first row 5 milliseconds / second row SPI1BUF = between two continuous axis in character wait 250 microsounds; } To write zero (integer number) {// Wait for 5 milliseconds to write in two consecutive letters on the first line / Wait 250 metric seconds between two consecutive moves in the second line if (num> = 0 '& amp; amp; amp; amp; amp; =' 9 ') {SPI1BUF =' 0 '+ number; } And {SPI1BUF = '!'; }} Void move_cursor (int hexadecimal) {// The first row: 0x80 to 0x8F // The first row: Waiting for 250 microseconds before writing 0xC0 to 0xCF / byte byte // before writing the cursor can not move and one in the same cycle The characters can write SPI1BUF = hexadecimal; } Zero init_led () {_TRISB0 = 0; _TRISB1 = 0; }   

    We add the p30f3013.h header which contains some macros, buffers, registers, etc. This is a small part of the header:

      #ifndef __dsPIC30F3013__ # panic file "does not match processor setting" #endif #ifndef __30F3013_H #define __30F3013_H / * --- ---- ------------------ * / / * Core Registration Definitions / / * ------------------ --- ---- * / / * W registers W0-W15 * / Extern Volatile unsigned int WREG0 __attribute __ ((__ sfr __, __ deprecated __, __ unsafe__)); Extern Volatile unsigned int WREG1 __attribute __ ((__ sfr __, __ deprecated __, __ unsafe__)); Extern Volatile unsigned int WREG2 __attribute __ ((__ sfr __, __ deprecated __, __ unsafe__)); Extern Volatile unsigned int WREG3 __attribute __ ((__ sfr __, __ deprecated __, __ unsafe__)); External volatile unsigned int WREG4 __ distributed (__ sfr __, __ dislikes __, __ insecure__)); External volatile unsigned interval WREG5 __tat __ ((__ sfr __, __ dislikes __, __ insecure__)); External volatile unsigned int WREG6 __ content (__ sfr __, __ dislikes __, __ insecure__)); External volatile unsigned int WREG7 __attribute __ ((__ sfr __, __ dislikes __, __ insecure__)); External volatile unsigned int WREG8 __attribute __ ((__ sfr __, __ dislikes __, __ insecure__)); External volatile unsigned int WREG9 __attribute __ ((__ sfr __, __ dislikes __, __ insecure__)); External volatile unsigned int WREG10 __attribute __ ((__ sfr __, __ dislikes __, __ insecure__)); Extern Volatile unsigned int WREG11 __attribute __ ((__ sfr __, __ deprecated __, __ unsafe__)); External volatile unsigned int WREG12 __attribute __ ((__ sfr __, __ dislikes __, __ insecure__)); Extern Volatile unsigned int WREG13 __attribute __ ((__ sfr __, __ deprecated __, __ insecure__)); Extern Volatile unsigned int WREG14 __attribute __ ((__ sfr __, __ deprecated __, __ unsafe__)); Extern Volatile unsigned int WREG15 __attribute __ ((__ sfr __, __ deprecated __, __ unsafe__)); ......   

    When we try to compile the code, we get an error:

      #error "include the file Processor setting does not match ".   

    Which APRs are due to this preprocessor defect:

      #ifndef __dsPIC30F3013__ # panic file" is included in the processor settings No account "#endif"   

    We are using simple GCC compiler without any options, I think we like pic30-gcc -mcpu key Is required to use but we are using qtcreator and we do not know how to specify this option or how to change the compiler. We have installed the pic30-coff-gcc-4.0.3 compiller in the system.

    Any suggestions?

    You are receiving that message because your compiler will be sent to you __ dsPIC30F3013 __ Preprocessor does not define icons. You need to know what flag you need to read from the compiler document. To set this up, you have to read the documentation for your IDE. You can use it:

      GCC-DM-E - & lt; / Dev / null   

    To print predefined macros that is your compiler is created.

    graph search api locale filter not working in any combination? -


    I have tried many times to solve it, but it's went to confirm that went to a report from FB bug As the latest ... or not? This does not work when using the Graph Search API and specifying a local filter for the result.

    For example, in English:

    Posted in numerous languages ​​of languages ​​return I tested with other languages, no dice I have also tried local and content filters and headers, then the result is no change and tried various combinations of the case, still is not working, try access_tokens simultaneously and without There is still no result in the result Rtn is not. There is no resolution on the FB site and I am being redirected to the post here.

    FB Docks is here to stay here ....

    Any help was greatly appreciated, Thoke, Digby

    For me should be a bug is not working

    This Some people may be of help:



    How to increase the memory heap size on IntelliJ IDEA? -


    I want to allocate 1 GB pile size, but I can not find it.

    How to do this?

    help . Edit Custom VM Options |? |

    An editor will automatically open for the .vmoptions file, adjust the value IntelliJ IDEA to save and restart For more information, check these documents from IntelliJ IDEA Knowledge Base for more information:

    • Li>.

      The following is suggested to edit the .vmoptions file in the answers given below in the application installation directory. Please note that this is not recommended as it will cause conflict during patch updates. The above method creates a copy of the directory's file and your IDE installation is intact.

      Also find out about 32-bit which is 750m . You should use a large pile, make sure that the IDE may crash in the beginning or start crashing randomly during work.

    r - Plots with good resolution for printing and screen display -


    मैं

      dev.new (width = 5.8, height = 3) बराबर (एमएफआरओ = सी (1,3), मार् = सी (1,1,2,1), ओमा = सी (4,1,2,0), एमजीपी = सी (3, 0.5, 0)) प्लॉट (...)   

    और उन्हें माइक्रोसॉफ्ट वर्ड में चिपकाने और चिपकाने के लिए वे वाकई में वाकई बहुत अच्छे लगते हैं (मैंने अलग-अलग चौड़ाई की कोशिश की, जब तक कि मैंने अच्छी तरह से काम नहीं किया), लेकिन जब मैंने उन्हें मुद्रित किया तो वे भयानक लग रहे थे। कुछ वेब खोज के बाद मैंने पाया कि मुद्रण के लिए कम से कम 300 पीपीआई होना चाहिए। तो अनंत काल के लिए चौड़ाई और ऊंचाइयों के साथ नगण्य होने के बाद, मैं उस कोड के साथ आया जो भूखंडों को समान आकार दिखता है लेकिन बेहतर रिज़ॉल्यूशन के साथ:

      png (file = "mag_feb.png", width = 1800, ऊंचाई = 950, रेस = 300)   

    मुद्रित होने पर वे अब अच्छे लगते हैं, लेकिन वे वर्ड (स्क्रीन पर) में बिल्कुल भी तेज नहीं दिखते हैं। क्या यह आकार के साथ एक समस्या हो सकती है? क्या ऐसा ग्राफ बनाने के लिए कोई रास्ता नहीं है जो अच्छे मुद्रित और स्क्रीन पर दिखते हैं? मैं पहले से ही इसके साथ घंटों में बिता चुका हूं और कोशिश करने के लिए कुछ भी नहीं सोच सकता, इसलिए किसी भी मदद की बहुत सराहना की जाएगी!

    धन्यवाद!

    आपकी मूल png कमांड में एक छोटी सी त्रुटि है। यह कोशिश करें:

      png (file = "mag_feb.png", इकाइयों = "में", चौड़ाई = 11, ऊंचाई = 8.5, res = 300)   < P> अब, चौड़ाई और ऊंचाई इंच में है, और Res पिक्सल / इंच में है इससे पहले, Res पैरामीटर को नजरअंदाज किया जा रहा था।   

    forms - Microsoft Access 2010 - Foreign Key as Dropdown -


    I have two tables that I display in a form:

    tblUsers -> User_id, first name, last name, group_id

    tblGroups - & gt; Group_id, groupName, groupDesc ​​

    I can get the data that I want:

    SELECT tblUsers.firstname, tblUsers.lastname, tblGroups.groupName from tblGroups INNER tblUsers Join TBLGroups [[Group_id] = tblUsers [Group_id];

    But what I want is a form that shows a dropdown list for the user information and group but is not showing the name of the group and hence the group can change it for a specific user. Eg manager, editor etc ...

    Thanks, Gareth

    Wright -Click combo box (This is considered a combo box ...) and open the Properties window.

    Set the source for the row:

      select group_id, set the number of columns to the tblGroups   

    column to 2, Because you want the combo to store both the ID and the group name

    the column width is "0; 2" (without quotation marks). This will essentially hide the ID because the column width of the ID field is 0.

    Set the bound column to 1, because you want to bind the id column and the name of the group is not the column, because the group id is easy to ask.

    Then you refer to the combo with me! To get MyComboboxName.Value Group ID