Posts

Showing posts from January, 2012

jquery - How can I test if a JQM form element is Enhanced? -

I am trying to check the program if a form element is 'extended' to the default markup. I realize that I can cross the dom and search for a field contents or other JQM specific attributes or tags, but is this a better way? Since each form element is different in markup, I was expecting a way $ ('# myformelementid'). Advanced> Are you asking for a way to use the property through a custom function? I think you should be able to use it: // before your widget logic $ .fn.extend (advanced: function () {this.jqmData ('advanced ')}}});

javascript - .val assign to variable on submit of form -

How can I perform this variable counting function when a user hits the submit button? Var size = $ ("# size"). Val (); & Lt; Input id = "size" /> & Lt; Button type = "submit" & gt; Calculation! & Lt; / Button & gt; They should be assumed to be input and store it in variable = size Is it possible that the user reloaded without reloading this page Output it back without JQuery? P> Attach an event handler to submit form event Original example HTML prevent event handler from sending form to preventDefault () Should call for. / P> & lt; Forms & gt; & Lt; Input id = "size" /> & Lt; Button type = "submit" & gt; Calculation! & Lt; / Button & gt; & Lt; / Form & gt; & Lt; Div id = "output" & gt; & Lt; / Div & gt; JavaScript var size; $ ("Form") Submit (function (e) {e.preventDefault (); // size = $ (...

ruby - Single-table inheritance using a datetime column -

I have a user class that handles both registered and unregistered users in our database. I have maintained the user and registered users of subclasses I'm leaning towards using STI, but I think it's adding some repetition to my code where it's not really necessary. I am currently planning for the ad "Type" and "Registered" column. In fact everyone needs to be present whether or not they are presently included on the "registered_at" users. User t.string "type" t.datetime "register_at" This rail does not fit the STI conference, but it seems like something Reduce the repetition which is otherwise unnecessary. Does this make sense and how do I create it in my user model? Why not only use scope? Scope: unregistered, lambda {where (: registered_it => zero)} scope: registered, lambda {where ("registered_t is not empty")} and like them: User.registered.first Edit Get your Subclasses from U...

regex - Find string match in R -

I have data with two columns and thousands of rows. Frame is like: column 1 column 2 "This is done in 1 hour" "in 1 hour" I get a new data is. The frame column is as follows: Column 3 "This is done" so basically corresponds to the string according to column 2 and the remaining Get Column 1 How is this approach? Edit: This problem will not be solved because the length of the wire is different, so I can not do this: Substright (x , 3) then I need something like grepl mailing You can do it with regular expressions: & Lt; - Data. Frame (Column 1 = "This is done in 1 hour", column2 = "in 1 hour") Data $ column 3 & lt; - gsub (Data $ column2, '', data $ column1) # Change the fist parameter to the second position in the third. EDIT: For more than 1 line, you can type : data & lt; - Use data.frame (column 1). = C ("This is done in 1 hour", "This is an exam"), col...

Cakephp how should you manage controllers and views -

I'm totally new to KHHP, so I'm completely confused that the various controls / views / elements How Management Works / P> PROBLEM: I am trying to create my home page, which has a page controller and see home.ctp. Now, I have another controller, Idea controller, which includes functions to load all the ideas from DB. Public function index () {$ this-> Set ('title_for_layout', 'ideas'); $ This- & gt; Set ('idea', $ this-> idea-> search ('all')); } Now, I need to access this Idea Controller with multiple (up to 3) different views. What is the best way to do this? Thanks - You are going to the other side ... The view controller does not have "access", the controller receives a request, tells the model what information they need, and passes all necessary data views. Thoughts are like small dolls that can put clothes on you, but nothing more than that, they do not play or play or ask random questions to yo...

jquery - vex confirm dialog, cancel-action as default -

I'm trying to use a modal script for a confirmation dialog, for now, if the confirmation dialog box appears , Then "OK" - the button is selected as the default. Does anyone know how can I change it? I want the cancel button to be the default so that anyone gets hit, just nothing happens. Thank you for your reply. Best regards to Thomas Set the text of the buttons in your array vex.dialog.open ({message: 'Do you want to completely destroy the alien planet?', OverlayCloseOption: wrong, click incorrectly to // click outside the callback Do: function (value) {console.log (value);}, button: [$ .extend ({}, Vex.dialog.buttons.YES, {text: 'your button for yesy}}), $ .extend ({}, Vex.dialog.buttons.NO, {text: 'for not your button'})]});

c# - Using "row.Selected = true" changes appearence but not CurrentRow index -

I have a snippet of code that searches for grids and records for the desired record: foreach (grddActiveJobs.Rows in DataGridViewRow) {if (line.kel ["part number"]. Value.ToString () == lvPartNum & row.Cells ["serial number"]. Value .toString () == lvSerialNum) row.Selected = true; } works as the above code - The row is highlighted, however, if I run an investigation on currentrow.index If (grdActiveJobs.ContentRow.Index == 0) {// dots} This will show the current index as 0, even if the highlight of the highlighted by the previous snippet is indicative of row 5 . My question is, when "row.selected = true" is set, how can I ensure that the existing line index for the grid is set correctly and not known as 0 is? Thank you in advance. After some excavation I found this explanation: GridName. CurrentRow.Index - Returns the indicator of the current cell defined by the system, which is not always the same as the selected cell. An...

angularjs - Chrome: Prevent image reload when rebuilding image elements -

Using fingerprints: I am displaying a list of ng-repeating images. When I reboot and rebuild the model (get new data from the backend), then I'm displaying the previous images. I understand that these are the new elements created by NG-repeat, but the image is SRCS. Unlike IE or Firefox, Chrome tries to get a 403 for those similar pictures and then presents them. This causes a flicker Images on IE and Firefox come from the cache. No hits on the server to check image changes. No flicker How can I stop it? Should pictures be served with some cache headers? I tried to get them to load the images to a dataurl, but then I hit the CORS problem, and the proxies will have to do those images on the backend . Thanks Some fixes will relate to preloading images in Javascript and its Will display them later function load images (arrayfomos) {var imageNumber = 0; $ (ArrayOfImgs) .Each (function ()) ((new image)) src = this ;. (if arrayOfImgs.length == image NUMBER) $ scope...

Difference between creating an array in constructor and declaration in c++ -

When I was trying to create an array in C ++ class, a problem occurred while using the constructor . Here's the code: int stacksize = 100; Int * buffer; Int StackPointer [3] = {-1, -1, -1}; Public: ThraStack (Int StackSize_U) {int buffer_u [stacksize_u * 3]; This- & gt; Buffer = buffer_u; This- & gt; Stacksx = stacksize_u; } ThraStack () {At Buffer_U [(this-> Staxes) * 3]; This- & gt; Buffer = buffer_u; } This did not really work. When I make an array in declaration, however, it works: int stacksize = 100; Int buffer [300]; Int StackPointer [3] = {-1, -1, -1}; Can anyone tell me what is wrong when I was using Constructor? PSS: Here is the whole class and exam program: class threestack {int stacksize = 100; Int * buffer; Int StackPointer [3] = {-1, -1, -1}; Public: ThraStack (Int StackSize_U) {int buffer_u [stacksize_u * 3]; This- & gt; Buffer = buffer_u; This- & gt; Stacksx = stacksize_u; } ThraStack () {At Buffer_U [(this-> Staxes) * 3];...

css - Direction aware hover effect with jquery mouseOver has a direction error -

I got a conscious effect about this great direction that I want to apply to my website. I have found this issue that when the right part of the box rotating from the top of the element will be recorded as the hover from the right / instead of the top of the 1/4 element. Here is the working code to look for. I do not know where this error is coming from. I have padding, margins, perspective, width, and amp; Height. I can not seem to find out where the error is coming from. I believe the problem is in the script code, which is below: var nodes = document QuerySelectorAll ('li'), _nodes = [] .slice .call (nodes, 0); Var getDirection = function (ev, obj) {var w = obj.offsetwidth, h = obj.offsetHeight, x = (ev.pageX - obj.offsetLeft - (w / 2) * (w> H? (H / W)): 1)), y = (ev.pageY - obj.offsetteop - (h / 2) * (h & w; w? (W / h): 1)), d = monastery (Math., X) / 1.57079633 + 5)% 4; Return D; }; Var addClass = function (ev, obj, state) {var direction = getDirection (...

python - In mysql, is it possible to add a column based on values in one column? -

मेरे पास एक mysql तालिका डेटा है जिसके पास कॉलम हैं + ----- - + ----------- + ---------- + | एक | बी | सी | + ------- + ----------- + ---------- + | जॉन | 225630096 | 447 | | जॉन | 225630118 | 491 | | जॉन | 225630206 | 667 | | जॉन | 225630480 | 1215 | | जॉन | 225630677 | 160 9 | | जॉन | 225631010 | 2275 | | रयान | 154247076 | 6235 | | रयान | 154247079 | 6241 | | रयान | 154247083 | 624 9 | | रयान | 154247084 | 6251 | + ------- + ----------- + ---------- + मैं एक कॉलम जोड़ना चाहता हूं डी a और c में मानों के आधार पर (नीचे अपेक्षित तालिका देखें)। a में मान, विषय का नाम है, b इसकी विशेषता में से एक है, और c दूसरे इसलिए, अगर प्रत्येक विषय के लिए c के मूल्य एक-दूसरे के 15 इकाइयों के भीतर हैं, तो उन्हें एक ही क्लस्टर संख्या प्रदान करें (उदाहरण के लिए, c के लिए ryan के लिए प्रत्येक मान 15 यूनिट के भीतर है, इसलिए वे सभी को 1) सौंपा गया है, लेकिन यदि उन्हें John के लिए अलग मान नहीं लगाया जाता है, जहां प्रत्येक पंक्ति को d । + ------- + ----------- + ---------- + ...

String matching in java -

I am currently struggling to find partial matches with my "Dirty Words" filter. Example: If I replace the personal string string with the word (string word, string input) {/ p> for this method Pattern Legacy Pattern = Pattern.compile (word, Pattern.CASE_INSENSITIVE); Matcher matcher = Legacy Pattern.matcher (input); Stringbilder return string = new stringbilder (); Int index = 0; While (matcher.find ()) {returnString.append (input.substring (index, matcher.start ())); For (int i = 0; i & lt; word.length () - 1; i ++) {returnString.append ('*'); } ReturnString.append (word.substring (word.length () - 1)); Index = matcher.end (); } If (index me p * sing p * sp ** sed ** s when I really want "passing pass passed" Anyone can know how to avoid partial matching with this method? Any help will be great thanks! Will tell you in the right direction. You want to use the word limit in your pattern: pattern p = pattern.compile (...

django - python social auth duplicate entry -

I am using Python-social-auth with the demo. I want to be authorized through Facebook, but first, I have already registered in an email (email, password) by default, which is to use Facebook. Can I add a Facebook account to the registered account? I tried to search but nothing Check it, it should explain how to do it. Associate user by email Sometimes it is desirable that if the social accounts are connected automatically, then the email already matches a user account. For example, with its Facebook account, it is logged out and Google attempts to use OAuth2 for the next time, it can be good (if both of the social sites The same email address is configured) then the user is in the initial account created by his Facebook backend. P> This scenario is possible by enabling the Associate_by_mail pipeline function, such as: SOCIAL_AUTH_PIPELINE = ('social_core.pipeline.social_auth.social_details',' social_core.pipeline.social_auth.social_uid ',' Soc...

Can I deploy worker roles to windows azure pack? -

I am planning to install Windows Azure Pack on Windows Server 2012 R2. I mainly want to play a role in it. Is this possible? The documentation clearly does not make it clear whether it is supported or not simple answer is "no" . Passes cloud services are no longer part of the ezire pack. He said, a proper architecture solution can be deployed in both on-premises and in the cloud. Its just the way they are positioned and management needs to be different. In your specific case, to play the role of a worker, separate the business functionality in your own classroom library, and a worker role (cloud passes) as well as a Windows service (both-premis)

How can I place a python gglot figure in a gui? -

The FI has analyzed my data in IPython using pandos and giziplot, but now I take it to a GUI Wish and thought to use Pyqt To create a shape in pyqt, I will usually use some matplotlib with these lines. import matplotlib.pyplot as plt figure = plt. Figure () Figure.add_subplot (111) ax.plot (data, '* -') But I would like to use the integration between Pando and Gjiplot but this does not work p = ggplot (mtcars, aes ('mpg', 'qsec')) + geom_point (color = 'steelblue') ax.plot (p) How can I create a python ggplot shape in a pyqt program? A matplotlib shape will return to p.draw () above. You can use this shape to add a subplot and then you can pass this axis into the pandas plot function or use the plotting platelets directly. The combination of two ggplot plots (or any existing conspiracy with a new ggplot plot) is currently not possible (see github.com/yhat/ggplot/issues/160 and github.com/yhat/ggplot/issues/181).

android - CheckBox is checked send item to defferent activity -

In my application, when the checkbox is checked, then in the list list, Want to go Please help me or give me some hints on how to do this. I appreciate any help. Enhances the investigation of the public class {checkbox check; Textview TVITIM; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); Check = (Checkbox) FindById (R.id.checkBox1); TvItem = (TextView) findViewById (R.id.tvItem); Check.setOnCheckedChangeListener (New Compound Button On Checked Change Listener) {@Override Changed checked at Public Zero (compound button button view, boolean is checked) {If (checked) {} ​​else {}}}); }} What more code do I put in? Actually, you need to set an onClickedListener for the checkbox, and a list view list Start the activity that passes enough information to start new activity. You may need to toggle the status of the checkbox, just for this, I have included the code for it, if something looks wrong then delete it. checkbox.setOnClickLis...

php - How to fully test a link? -

I was implementing a very simple table of links in php with a MySQL database and this idea came to my mind : Button "test" that runs a test in all the links. For example: http://www.somebodysite.com/somesubdir/somefile.php?id=1 This is a very basic link, however, many errors can occur: www.somebodysite is no longer available, they the ID was deleted Id deleted Some files. Many things can not be examined remotely, I think, but other people can do it. How far can i go For the first three items, you can use the function and check that if the response is there, which link elements can you verify remotely? HTTP / 1.1 200 OK : $ Response = get_headers ('http://www.somebodysite.com/somesubdir/somefile.php?id=1'); $ ValidCodes = array ('http / 1.1 200 OK', 'HTTP / 1.1301 moved permanently', 'HTTP / 1.1 307 temporary redirect' // Add as many codes as you want); If (id ($ response [$], legitimate code $)) {// it is ok} secon...

javascript - ffmpeg not returning duration, cant play video until complete. Stream images 2 video via PHP -

I am struggling with actual ffmpeg I am trying to convert images to video, I have an IP The camera is what I'm recording. In the recording per picture mjpegs are 1 frame I am trying to create a script in PHP so that I can change a video by date, in which the images will have to input through input and then make video Will happen. The trouble is that, the FFPAG returns the period and starts the data, so I have no way of doing video work or what percentage is done. The video will not run until the end, and it will not be a good UI. How can I solve it, any ideas, video formats can be anything which I am open to suggestions. PHP: // shell command exec ('cat /image/dir/*.jpg | ffmpeg -y -c: v mjpeg -f image2pipe -r 10 -i - - C: v-libx264-pix_fmt yuv420p -movflags + faststart myvids / vidname.mp4 1> vidname.txt 2 & gt; & amp; 1)) This video is loaded via JavaScript when the video loads Video_play = "& lt; width of the video = \" 320 \ "hei...

android - SQLite and SQLiteCursorLoader Library -

I've used Android's before SQLite , but I always managed to manually manipulate data Therefore, I have never used class like SimpleCursorAdapter . I want to use them now, but I need a bit of help in implementing code because it says that I have to use a cursor loader . I have decided that I am using the SQLiteCursorLoader library. Here are the details: I have a table called students . SQLite database Additionally, student model class and student manager / controller class. Calling StudentManager # getAll () returns a cursor in which all students are included. We go to piece Anyway, I have not using ListFragment for versatility, so far I have the following in onCreate : studentCursor = studentManager.getAll (); String [] = new string [] {EventManager.COLUMN_TITLE}; String [] = new string [] {R.id.title}; Cursor adapter = new simple cursor adapter (this, r layout.ro_events, event cuoser, from, to, 0); After that, I have a asyncTask subclass tha...

javascript - reach content of new window.open -

मैंने एक नई विंडो बनाया var win = window.open ("", " "," चौड़ाई = 400, ऊंचाई = 200 "); और मैं अपने शरीर के साथ var $ windowBody = $ (win.document.body) तक पहुंचना चाहता हूं; और वहां से ऐसे तरीकों का उपयोग करें जैसे .find () , .html () यह काम करता है एफएफ एंड amp पर; क्रोम लेकिन IE नहीं यह भी एक के लिए मिला। IE में यह कैसे तय करने के लिए? यानी, यह काम क्रॉस ब्राउज़र कैसे करें? - ध्यान दें कि बंद करें बटन कभी भी IE में दिखाई नहीं देता है। कृपया आईई में इसे ठीक करने के लिए नीचे कोड का उपयोग करें var content = $ ('# content'); $ ('# ओपन')। ('क्लिक', फ़ंक्शन) (var win = window.open ("", "", "width = 400, height = 200"); $ newWindow = $ (win.document ;), $ NewWindow.html (document.getElementById ("सामग्री")। InnerHTML); $ newWindow.find ('# close')। पर ('क्लिक', फ़ंक्शन () {win.close ();}) ;}); या उपयोग करें: var content = $ ('# content...

Merging two SQL Server tables conditionally into a third table -

Obviously, I'm not a SQL person, so I have to ask for help on simple tasks from the following. I have two SQL Server 2008 tables: t1 and t2 several identical columns and one key column ( entry_ID ) with. T2 rows that are not present in t1 , but should. I want to merge those rows with t2 which is not present in t1 , but from me t2 No line that is already present in t1 I want to set the result to fill the new t3 I have seen many solutions online, but the above scenario can not be resolved. Thank you. There are several ways to do this UNION ALL or OUTER JOIN . Assuming that you are using Entry_ID to find similar records, and Entry_ID is unique within each table, here is a OUTER JOIN method: This receives your record set: T1 and T2 are merged: Select when T1.Entry_ID then 'T2' when T is 2.Entry_ID then ' T1 'All other' both 'end SourceTable, COALESCE (T1.Entry_ID, T2.Entry_ID) Entry_ID, COALESCE (T1.Col1, T2.Col1) Co...

Bubble Sorting with Scheme -

I am working on implementing a bubble sorting algorithm in the plan, and I should say that the functional way of programming is weird Is the concept and I am struggling to understand it a little bit. I have successfully created a function that will get the biggest value first of all, but it is about all that it does. (Bubble H '(5109)) (598 7 ​​10) I am struggling with the help function Whichever requirement is necessary, until a swap has been done completely through the list, the loop. Here I am where, obviously this is not right, but I think I am on the right track. I know that I can pass through the number of elements in the list, but I am looking for a different solution than that. (bbba s (ld) (cond ((= (length = 1) (Bubba-assist lst)) (and (bubbaS (BubbaS (Bubba-assist lst))))) ) b> In reference to the implementation of sort-aux , I referenced ... (defined (bubble L) (if (empty (CDR L)) L (if ( ..., this is the simplified syntax: ( Define Bub...

android - CWAC Camera - Unsure of using setCameraView() -

I used CameraDemo-Layout as an example to place the button properly on a screen with a piece of camera I am using. I am trying to use setCameraView () / ** * if you are overriding on Creatives () and * having your camera view To increase the layout, there is a piece of camera view, so this piece can help * Manage it. You do not need to call it if you allow * to make your camera Viv * instances * pieces. * * Param camera view * Cameraview with your inflated layout * / Protected Zero set cameraAreview (cameraview camera view) {this.cameraView = cameraView; } However, I can not use it because it is protected I am using CameraDemo - layout as an example. I have my customcams, customcamfragment and customcommost host. In the CustomCamFragment I am trying to use setCameraView in the onCreateView, but it is undefined. Was it a mistake or should I follow the rule "You do not have to call it ..." because I do not consider that part to be enough? But, I can not use ...

javascript - comparing values from two different context using mustache and canjs -

Let's say that I have this mustache template below. Contacts and categories are basically an array of objects: & lt; Script type = "text / mustache" id = "contactsList" & gt; & Lt; Ul class = "clearfix" & gt; {{# Contact}} & lt; Li class = "contact span8" & gt; & Lt; A href = "javascript: //" class = "remove" & gt; & Lt; I class = "icon-remove" & gt; & Lt; / I & gt; & Lt; / A & gt; & Lt; Form & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "span2" & gt; & Lt; Img src = "img / canjs.jpg" width = "100" height = "100" & gt; & Lt; / Div & gt; & Lt; Div class = "span3" & gt; & Lt; Input type = "text" name = "name" placeholder = "add name" value = "{{name}}" & gt; & Lt; Select Name = "Cate...

javascript - Phonegap Database Call Too Slow -

I have developed a phonegap application that shows me all the rows in the table. There are approximately 9,000 lines in this table, and the repetition of these elements is really slow, it takes around 20 seconds to get it This is part of the code: function getProducts () {var query = "name from selection table"; Db.transaction (function (tx) {tx.executeSql (query, [], function (tx, result) {var len = results.rows.length; if (len == 0) {hide waitingMessage (); $ (' #adend ("& lt; li data-theme = 'E' & gt; & lt; h3 & gt; no item & lt; / h3 & gt; & lt; / li & gt;"); & amp; " One onClick = 'goToProduct ()' & gt; & lt; h3 & gt; + + + (+ & lt; l3; gt; Results.rows.item (i) .name + "& Lt; / h3 & gt; & lt; / a & gt; & lt; / li & gt;"};} Hide waiting message ();} $ ('# elementList'). Listview ('refresh' );}, Callback);}, callback);} is very...

Java3D Texture Brightness -

im them a texture on a QuadArray object, which works exactly as far as using a 3D Display of pictures in the environment. But now I have so that the result is displayed darker than before painting texture I used to "dim" (I think that needs to display 3D backsides pictures in environments that purpose For the same texture I create a second QuadArray object with, the mirror is deep and deep so that the user knows that he is looking backwards). how can I do this? I ColoringAttributes, using TransparencyAttributes + color QuadArray, TextureAttributes materials and hours but bright as everyone behind just as frontside ... what the normal way to get what I want? Here is the code to generate the back of the fiddled photo along with the code and some stuff I had already tried. . White ambient light btw using Im QuadArray plane2 = new QuadArray (4, QuadArray.COORDINATES | GeometryArray.TEXTURE_COORDINATE_2 | GeometryArray.ALLOW_COLOR_WRITE | QuadArray.COLOR_3 | Primitive.GEN...

html - Freeze div that shifts from dynamically sized text -

In the code below I have 3 divisions, where there are 1 and 3 divisible tables, Submit a user (fixed by the user) Submit a second div is an image when a user submits and the text is filled in tables, then the center image (2 dv) runs depending on the length of the text, for example For, if the longest word of the tables is on the left table If the longest word is the same length in each table, then nothing will run. Can I use CSS to ensure that the positioning is done? Is there no point in the length of the text in the Divis at the center of the second div? Basically I want to extend 1 div to the left and extend the third party to the right, so that & lt; Span & gt; No change in length of can not take the centered image at all & lt; Div class = "text_tables" id = "left_table" & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Span class = "output render" id = "text1" & gt; & ...

Finding closest values in a list of dictionary keys Python -

एक बिंदु को देखते हुए: a = [X, Y, Z] मैं अनिवार्य रूप से शब्दकोशों की एक सूची से उस बिंदु तक निकटतम 3 बिंदु ढूंढने की कोशिश कर रहा हूं। यह जिस प्रकार की डेटा की तुलना करने की आवश्यकता है, उसका एक सरल उदाहरण दिया गया है रूप में: अंक = [{'बिंदु': 1, 'समनुरूप': [0,1,2]}, {'प्वाइंट': 2 ', सह-समन्वय ': [0,1,3]}, {' बिंदु ': 3,' समांतर ': [1,1,2]}] आदि। कोई भी विचार या सुझाव आप एक रिवर्स लुकअप टेबल रख सकते हैं, जहां आप कुंजी-वैल्यू युग्म वापस करते हैं और निर्देशांकों को संग्रहीत करते हैं कुंजी के रूप में यह कार्यान्वयन करना आसान है फिर आप फिर से कुंजियाँ वापस कर सकते हैं और प्रत्येक निर्देशांक पर दूरी सूत्र कर सकते हैं। जैसा कि आप जानते हैं, दूरी सूत्र है: dist = sqrt ((x1 - x2) ** 2 + (y1 - y2) ** 2 + (z1 - z2) ** 2) नोट: ऐसा लगता है कि आपके पास उस सूची में 3 अलग-अलग शब्दकोश हैं।

Can a Java List be output as a String? -

If I want to print string "output", after which any method results, only one will do the same On the same line, "Output:" is a method that returns the string type. For example: public static zero main (string [] args) {System.out.println (return string ("hello")); } Public stable string return string (string s) {return "output:" + s; } If, I want to print the string "output", then after returning any other variable type method, the return will be on a different line. For example: public static zero main (string [] args) {System.out.println (returning (2)); } Pubic static intricate returning (int n) {System.out.println ("Output:"); Return n; } or by changing the return type to a string and using an implicit conversion method that is suitable for return type. For example: public static zero main (string [] args) {System.out.println (returning (2)); } Public static string returning (int n) {return "output:...

osx - How to get CGImageForProposedRect to provide 1:1 pixel data on Retina Mac -

In our app, we are creating a PDF NSImage (hence scalable) and then This non-retina display works fine on Macintoshs to write that code to TIFF file in the CGMage routine, but on the retina machines, the data that has returned, we expect twice that resolution (Like the screen). The code we are using is forming a new NSView reference to the data to draw subclass as a printmap view (the original on- Not a screen view). NSData * pdfData = [printingMapView Datavith PDFInsert: frame]; NSImage * image = [[NSImage alloc] initWithData: pdfData]; [Image set size: size]; NSRactPrint = NSMKRCT (0, 0, [image size]. Wide, [image size] .high); CGImageRef cgImage = [Image CGImageForProposedRect: & amp; Reference Reference: Zero Signals: NULL]; I have seen around for any signal that can be assigned to CGImageForProposedRect: reference: signal / code, but anything in the Apple documentation related to content scale is not. Is there any way that passes the whole code's code...

r - ggplot normalize a group histogram by group -

Image
प्रति समूह जीजीप्लोट समूह हिस्टोग्राम को सामान्य कैसे करें उदाहरण: लाइब्रेरी (डेटा योग्य) लाइब्रेरी (जीजीप्लोट 2) # टेस्ट डेटा टेस्ट एंड लेफ्टिनेंट; - डेटा योग्य (आईडी = 1: 100, बिल्ली = सी (प्रतिनिधि (सी ("ए", "बी", "ए", "ए", "बी"), 20)), ग्राफ़ = पेस्ट 0 ("जी", सी (प्रतिनिधि (1: 2,50)))) परीक्षा [, कैटग्रापी: = पेस्ट 0 (बिल्ली, जीआरपी)] # जीआरपी द्वारा बिल्ली का सामान्यीकृत हिस्टोग्राम # यह सभी जीआरपी पर सामान्यीकृत है # मैं इसे जीआरपी द्वारा सामान्यीकृत करना चाहता हूं। Ggplot (परीक्षण, एईएस (एक्स = बिल्ली, समूह = जीआरपी, भर = जीआरपी)) + जीओएम_हिस्टोग्राम (एईएस (y = .. गिनती .. / राशि (.. गिनती ..)), स्थिति = स्थिति_डॉज ()) परिणाम मुझे मिलता है: मैं उसी हिस्टोग्राम को इस एक के रूप में प्राप्त करना चाहता हूं लेकिन प्रत्येक समूह = 1 के लिए योग के साथ या स्तर 0.6 और amp; 0.3 के बजाय 0.4 & amp; 0.2। पूरा करने का सबसे आसान तरीका क्या है? धन्यवाद। टैब & lt; - as.data.frame (prop.table (तालिका ( परी...

windows - C++ Boost Compile Error with Simple_ls.cpp - Undefinded Referece to boost::filesystem::path::filename -

I am "new" like C / C ++ I spent several hours setting up my desk boost and with MinGW Beating in the desk in an attempt to work on your Windows 8 64 bit computer. In my quest for answers, I found it in Open_distro_window.bat after clicking twice, the errors were changed to something different. Using, I found these errors: & gt; G ++ simple_ls.cpp -o simple_ls.exe C: \ users \ joe \ appdata \ local \ temp \ ccQLpVCt.o: simple_ls.cpp :( .text + 0x1ba): `boost :: filesystem :: path :: Undefined reference file name () const 'C: \ users \ joe \ appdata \ local \ temp \ ccQLpVCt.o: simple_ls.cpp :(. Text + 0x23a): `promotion: filesystem :: path :: file name () Undefined reference to const: 'C: \ users \ joe \ appdata \ local \ temp \ ccQLpVCt.o: simple_ls.cpp :(. + 0x294 text): `promotion: filesystem :: path :: filename () const' C : Undefined reference user for \ 'user \ who \ appadda \ local \ temp \ ccQLpVCt.o: simple_ls.cpp :(. + 0x4bf text): ` Ref: ...

javascript - Add CSS tilemap to canvas -

Image
I am creating my CSS tilemap, the tilemap is 5x5, and will be in 1000x1000px size. I would like to add it to the 500x500px canvas element, so that only a map of 1/2 can be shown. I have a camera function that gives the player the center in the canvas and transfers the tilemap relative to the player. Map array given Var mapArray = [[0, 0, 0, 0, 0], [0, 1, 0, 0, 0 ], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 1, 1, 0]]; I draw my map in such a way: function drawMap () {for (var i = 0; i & lt; mapArray Length; i ++) {for (var j = 0; j & lt; mapArray [i] .length; j ++) {if (parseInt (mapArray [i] [j]) == 0 $ {$ ( '# MapContainer'). Attachments ('& lt; div class = "grass"> CSS: I have tried to add the element directly to HTML, and maybe the tilemap background to use z-index: -1 , but that does not work #mapContainer {height: 1000px; width: 1000 pixel; position: relative; outline: 1 px solid black; z-index: -1;} gross {height:...

php - Parse/search for a certain function in twig templates -

In the latest version of , the customer function is implemented as the old method in the form of Twig_SimpleFunction s I have a custom translation function to handle message formats using {{trans ('key'}}} . I am creating PHP scripts to go through all my templates to retrieve those things. I do not want to render templates in this script because I have a template Not all variables to pass. Functions are not called when the functions are loaded using load () (which is important for display), so I'll need a laser to parse my template. Unfortunately, there is really a lot of information about this, so it is hard to say where to start. Alternatively, if there is one then { {Trans ('key')} ? To add a customer laser to parse such tasks, the better / simpler way to get it, I would love to know definitely! The solution is quite simple. We have to catch all the templates, load each template and then run the parser to generate AST. Then we walk through ...

java - Android Bundle is shares memory? -

I use setArgument () / getArgument () to pass data from one piece to another. I stored the archives in the bundle called bundle. Input PurselBabelArealyst (), and I installed them - put data and received data - are equivalent to memory Generally, I think, Parslebl source and rebirth (through the Creator) example If the memory bundle of shares, so many ways to support Datateps variety Bundle Why are- why not just give examples of objects or use generic on bundles? Why there are several ways to support different types of dataTaps in the bundle - why not Use only generic on object examples or bundles? If bundle is only one way to have objects class it would be awesome because it can be confusing to those diverse datatype systems programmers who are helping to make sure about the logic of the type that want to get it or take, to imagine the case where four programmers working on the project and object 1 programmer Bund le (eg Imagine this example bundle is only one w...

android - Show messages from tablet Samsung Galaxy tab 3 on logcat -

I have prepared for the Android app has been developed that map, it found the tablet Acer Android 4.0.3 the right thing to do, but does not work on the tablet Samsung Galaxy tab 3 and do not show log on log-in on Galaxy show really not anything, I think that when the map is posted if I have problems. I'm from the terminal using Algat app abd but it will not logs for my app. I'm trying to put on the manifest (Android: debuggable = true). How do I show logs on log in at Galaxy Tab 3? Any ideas Try Debuggable and make sure that USB debugging

Can Page.IsPostBack property be used in Windows forms?? c# -

Hi friends, I'm trying to use "Page.IsPostBack" in my Windows project. I know that it can be used on the web page, but can it be used as a Windows? If this is the case, then will I need to import anything? No, these are two completely different criteria i IsPostBack is for stateless programming, while the windows form Is stable.

php - Searching not working in ajax once textbox onblur event is called -

I have the following code to search through AJAX Now if I type onblur Apply the event (so that the search result disappears) and then come back to the text box, the search feature is no longer working. So the thing is that it can not be able to call onfocus event correctly once the code is called onblur any help would be appreciated. & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ (". Searchproductbrand") keyup (function () {var kw = $ (". Searchproductbrand"). Val (); if (kw! = '') {$ Jax ({type: "POST", url: "livesearch.php", data: "kw =" + kw, success: function (option) {$ ("# livesearch"). Html (option); document.getElementById ( "Life-education"). Style.bird = "1px solid # a5 acb2";}})} and {$ ("#scache"). Html (""); document.gate elementbid ("lifeship") Style.border = "0 pixels";} return fa...

javascript - Validate Checkbox and Link to New Page(s) -

I am trying to create a form that validates the checkbox I think you have to check the box And then submit before going to a new page. So I have a checkbox, and I have a function to test it, but I can not find it to load the pages. I have two pages here that are saved locally and they are correct, so this verification work There should be a problem with. Any help is appreciated! & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; AcceptTerms & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1 & gt; You must agree to our terms and conditions before proceeding. & Lt; / H1> & Lt; Br> & Lt; H3 & gt; Do you accept our terms? & Lt; / H3 & gt; & Lt; Form & gt; & Lt; P & gt; & Lt; Input type = "checkbox" name = "checkbox" value = "yes, I accept" /> Yes, I accept & lt; / P & gt; & Lt; Input ty...

Simple bash script; what's wrong with this syntax? -

I am reading the Bash script tutorial and it seems like this should work, but I'm clearly missing something Is: isframecount = 0 francacount = 0 while p is read; If ["$ isframecount" -eq 0] then resonance $ p $ isframecount = 1 second echo "frame count" echo $ p $ isframecount = 0 complete When I try to run above, "Command not found errors"; Any indicators? Look for those spaces where they give importance and where should not be. In this case, if ["$ isframecount" -eq 0] should be if ["$ isframecount" -q 0] ( [[/ /> and Before ] ). The reason for this is that [ is actually the name of a program ... see itself .. type ls / bin / [ .. Now, if there is no room, then bash, ["0" or something like that will appear for a similar program, which is most certainly not present in your path. Then, in the opposite position ... the assignment in the variable should have no place = . Then there should be...

Load Url within the WebView Onclick Android -

How do I click the button on my webview? I tried this code but it opens the URL in the default browser, I want to open the URL in the same webview. Public Zero OpenNew Activity (see View) {Intent to myWebLink = New Intent (android.content.Intent.ACTION_VIEW); MyWebLink.setData (Uri.parse ("http://google.com")); StartActivity (myWebLink); } I also tried it, it works fine! But it inspires me to take an application and when I press the back button, it works public null openNewActivity (see view) {intent to myWebLink = new intent (android.content .intent.ACTION_VIEW); MWebView.loadUrl ("http://google.com"); StartActivity (myWebLink); } This works for me Public Zero OpenNewActivity (see view) {myWebLink = new intent (android.content.Intent.ACTION_VIEW); MWebView.loadUrl ("http://google.com"); }

c# - HttpClient missing from .Net portable subset while creating PCL in Xamarin -

I have created a portable class library in Xeramin and want to use it for the Android app. I want to use HttpClient inside this PCL I've added Microsoft HTTTP client libraries to NuGet package manager. Now I will call .net portable subset Can add to my context. But somehow I still can not use the HTTP client and this Not even in portable subsets. In addition, my current profile is PCL 4.0-profile 158 . If I change the profile to 4.5, the zaminin crashes and the solution does not open Can anyone help me with this? Thank you. The goal of a simple solution is .NET 4.5, the Windows Store app (Windows 8.1), XMERIN IOS, and XMERIN Android (4.5-Profile 7), you will not need the HTTP client newgate package to receive those APIs. If you try to choose a 4.5 profile, please make sure that you are using the latest version and then report the bug, about how it repro and details about what happens. with. In addition, the HTTP client newgate package should allow you to...

c# - Comparing dataSet values -

I am using this code to display images to edit: safe void repeiter_Outer_ItemDataBound (object sender, repeater item avent e) {repeater item = E. ITEM; If (item item type == list item type.itm). Type item.im Type == List item. Aborting item) {repeater inner = (repeater) item. Fund control ("image_reptiter"); Hiddenfield Inner_ID = (hidden field) items Fund control ("hidden field_id"); MySqlConnection conn = New MySqlConnection (Configuration Manager. Connection Strings ["DBCNX"]. Toasting ()); MySqlCommand cmdNew = New MySqlCommand (); CmdNew.Connection = conn; CmdNew.Parameters.AddWithValue ("@ ID", Inner_ID.value); CmdNew.CommandText = "Select from images WHERE FK_album = @id"; Conn.Open (); Inner.DataSource = cmdNew.ExecuteReader (); Inner.DataBind (); Label_Amount = Label (label) item.FindControl ("Label_Amount"); Label_Amount.Text = Convert Toaster (inner.itimes.cc); Conn.Close (); }} My problem is that every ti...

matlab - Connected component labeling (CCL) for vehicle headlight detection -

Image
I am developing a project to detect vehicle headlights in the night scene. I am working on a demo at MATLAB. First of all I use Gaussian blur to filter grayscale image, then threshold to get binary image. The next step is to identify components connected to them and to identify the bounding box. I have CCL code using two pass 4-connectivity method without using BCLL and it is quite easy. But I think this method is very resource when implementing on FPGA. I am considering other algorithms like Contour Tracing or Single Pass Can you suggest some other CCL methods suitable for FPGA? Depending on the type of image you are using and depending on the output of thresholding, many thanks Operation, you can bypass CCL and go directly to contour tracing. I can say that the real challenge is to correctly image the threshold, so that only the headlight (as close to possible) in the binary resultant can be. For example, if I take this image: and do this sequentially in the followi...

sql server - using "USE" keyword Vs. full table name in T-SQL -

When I want to select the table wi in table wi from select * X]. [DBO]. [Y] or selection of USE X * from [Y] debo Use the debob as the owner of all database objects to manage objects Can make it easy. Your database will always be a DBO user in the database, as long as the user has the proper permissions, he will be able to access any object owned by the debob without specifying the owner. USE X When a SQL Server login connects to SQL Server, the login is automatically linked to its default database and receives the database user's security context is. If a database user is created for SQL Server login, the login joins as a guest if the database user does not have permission to connect to the database, the USE statement will fail. If no default database is specified for login, its default database will be set to master.

SQL Server synonyms with concurrent execution -

I work in a DW project where we do ETL using T-SQL with STL Server 2012. Our code works well for so long A set of tables coming from the heritage system However, the data architect has announced that we will get tables from other heritage systems. He wants only one piece of code to be able to handle all the tables in all systems because they have the same structure but are present in different DBs in the same server. On that, the existing system code must be run for all system tables at the same time so that we can save execution time. I am working on a POC which uses the synonyms that do the trick but it will not execute our codes for different sets of tables at the same time because we end up with references to synonyms that end in Overwrite. So now I am reconsiding the whole problem: How to avoid repeating the same code for repeating tables at the same time? Any insights or suggestions would be appreciated thanks. I will consider using SSIS to do my ETL. You can change th...

android - How to bend a horizontally scrolling listview at an angle to display it as a rotating listview ? -

Image
I have a horizontal scrolling list view with the image and text in my app. I want to fold the listview to an angle so that the scrolling list view It looks like its rotation The image of the given listview is given below, which I want to scroll horizontally at an angle and should increase the image in the center of the screen. How do I get it? I have searched a lot through Google and SO and no related or appropriate results could be found. Try using the carousel instead of the list view Get the right results Here you can check some examples

powershell - Increase Number each day -

I'm sure this is very easy, but I'm killing a dead end. I need to create a variable in PowerShell which increases by one day every day I am going to use this variable in an email subject, as part of the testing schedule. Defines the number of days. Like "Test - Day 38", when the script runs the next day, it will have to prepare "Test - Day 39". I can not use date and add-ons because the count is not limited Here is the code, $ day is the result # on the first day, starting $ startDate = [datetime] '2014-01-12 $ # Started with #defined dead (+ 1 "day 1") $ day = [int] ((date of receipt) - $ startdate) .TolDates + 1 # result string "test - day $ day" This code output (today) test - day 38

android - How to Play Sound Multiple Times in Method In java ? -

I want to play a similar sound when playing a button, when I call this method twice, its first Button in the first button, the second button has not been played here is the code the new thread (new runleball) {@Override Public Zero () {// from the command line Take the path of the audio file (file f = new file (this.getClass (). GetResource ("/ sounds / attention.wav"). GetFile ()); Create an audio player to create an audio player that ends I player p = manager .createplayer (f. Touri) .toURL (); // start music p.start (); try {thread.leep (100);} hold (exception e) {} p. Stop (); Thread.interrupted ();} catch (exception e) {e.printStackTrace ();}}}). Start (); I had this problem developing a game too. Note that I am using AudioInputStream and Clip clasés, but this solution worked for me: Secure synchronized Gone zero play (clip clip) {Try {if (clip.isOpen ()) {System.out.println ("The clip is opened ..."); Clip.start (); Clip.setMicrosecondPos...

objective c - How to load an image from Parse into a UIImageView (iOS) -

I can really ask for something easier, but I can not manage to find a tutorial or example that will help me. / P> How do I remove the string data from the pars and now I am trying to retrieve an image, it will be easy to think .. But I can not understand it. I'm trying to load 1 image in UIImageView (which I will change every day), retrieving the image from my data browser in Parse.com. Can anyone help please? Here's what I did: - (zero) viewDidoadload {[Super Viewedload]; [Self executable selector: @selector (retrieveprorsy)]; } - Recover (zero) Proposers {PFQuery * retrieveImage = [PFQuery query world code: @ "outfitDay"]; [Objects to find retrieval imageGramswithblocks: ^ (NSArray * objects, NSERR * error) {if (error!) {LoadimageArray = [[NSArray alloc] initWithArray: objects]; }}]; } I am missing part where you point to UIImageView to load that information. Thanks in advance! You can set the image in UIImageView with the help of this...

java - Powermock JUnit tests are taking more time to execute compared to normal JUnit -

We are using PowerMock by junking the static methods using annotations using @PrepareForTest . The test runs fine but the problem is that it is taking too much time to execute the test. The code snippet is as follows: @PrepareForTest ({StaticClass1.class, StaticClass2.class}) Normally However, it takes about 2 seconds to execute JUnit while joking the static method, but when we add annotation to the @PrepareForTest joke, static calls to complete the test execution It takes about a minute to take time. For a test, this is not a big effect, but we have more than 1K tests and the overall building time is taking more than 2 hours, which took 20 to 30 minutes before. For the time being what could be the reason for the powermoke. Any help would be greatly appreciated. PowerMock is a tool that performs bytecode instrumentation on your generated sections. Once your classes are compiled into Java bytecode, then the powermock comes with it and modifies this generated s...

How to create new column based on another column's contents in R -

This is a sample of my data set: & gt; Data C 1 C 2 C3C4C5C6Aatom 1 -4.7 9 4 -7.29 6.756C ATOM1-4.357-6.181 6.473 O ATM 2 -5.878 -8.511 5.233 C ATM 2 -7.02-9.179 5.732 C Atom 3 -7.479-9.499 6.108 C ATM 5 -4.873 -7.021 6.767 C Atom 8 -3.891 -6.723 6.31 O Atom 1 -7.515 -10.402 -0.621 C ATM 1 -7.26 -11.716 -0.22 o Atom 2 -7.53 -10.348 0.581 C Atom 3 -6.689 -11.008 2.344c Finally, what I want to achieve is to have a new column, when reset to number 1 in C2, as shown below Gone: & gt; Data C1 C 2 C3C4C5C6C7Aatom 1 -4.7 9 4 -7.29.6756C1Atom1-4.357-6.181 6.473O1Atom2-5.878-8.511 5.233C1Atom2-7.02- 9 .179 5.732 C1 Atom 3 -7.479-949 9910.108C1 ATO M5 -4.873 -7.021 6.767C1 Atom8-3.891 -6.723 6.31 O 1 Atom 1 -7.515 -10.402 -0.621 Sea Atom 1 -7.26 -11.716 -0.22 O 2 Atom 2 -7.53 -10.348 0.581 C2 Atom 3 - 6.689 -11.008 2.344 C2 I used the loop with the nested statement. My method was to compare an existing line with the following line if the value is less than the current value,...

java - Run PendingIntent in exact time -

Everyone I have received this code snippet pending = Sign = pending Gate activity (context, 0, intent, 0); Alarm = (AlarmManager) context.getSystemService (Event .ALARM_SERVICE); Alarm.set (alarm manager .rc, system syntetime millise (+ run della, pending signal); I'm getting rid of System.currentTimeMillis () + runDelay, and just run variable dynamic intofunction, does anyone know what I should do? PS I should have API 8 code Thanks a lot. one class variables: Personal Time PictureDialog Time_Picker; Private calendar target; A class creator public YOurClassName () {last calendar c = Calendar.getInstance (); Mayer = C. Gate (Calendar: IEER); MMonth = c.get (calendar .mONTH); Mday = c.get (Calendar DAY_OF_MONTH); MHour = c.get (calendar.HOUR_OF_DAY); Mminute = c. Gate (cal. Mnuete); } inside OnCreate () or onActivityCreated (): time_picker = New TimePickerDialog (getActivity (), mTimeSetListener, MHour, mminute, false); Inside the cla...