Posts

Showing posts from March, 2013

php - how can i delete rows id from the database -

Can someone help me? Here is my PHP script ... $ req = Mysql_query ('Select ID, email, start_data, end date, time_imm, timed upload, payment_moth, booking_import status status from where status = "cancel "'); While ($ dnn = mysql_fetch_array ($ req)) $ req1 = mysql_query ('booking_elements WHERE id =' $ id '); While ($ dnn1 = mysql_fetch_array ($ req1)) {& lt; Td square = "left" & gt; & Lt; Center & gt; & Lt; A href = "delete.php? Id = How do I get an ID from $ dnn ['id'] to delete the rows? Mike Brent is perfect; You should delete them without first searching one, but if you want to use the ID, you will use it: // last ... ($ dnn = mysql_fetch_array ($ Req)) {$ delete_id = $ dnn [id ']; $ Req1 = mysql_query ("booking_members delete WHERE id = '". $ Delete_id. "'"); // ... Continue

PHP - How can i display all the images on a selection list -

I want to count all the images in a specific folder (I did already), and I Selection List How can I customize it and put all the images in a selection list? The user must select an image, and this image should be saved in a table. & lt; Html & gt; & Lt; Body & gt; & Lt ;? Php $ files = glob ("imagens /*.*"); ($ I = 1; $ i & lt; Count ($ files); $ i ++) {$ image = $ files [$ i]; Print $ image. "& Lt; br / & gt;"; Echo '& lt; Img height = "30" width = "30" src = "'. $ Image." "Alt =" random image "/> & gt; & lt; br /> gt; & Lt; " The easiest way to use a selection box for your images is to protect the image, it is in front of many other issues (DB connections, forms, etc.) Try the problem, if you have problems, then you come back with what you have done.

jquery - Javascript issue with mathematical equations -

Before I start, I can see you in this post that possibly the abundance of code you have made Apologize for This is the most annoying bug I've ever tried to fix. I am working for hours, and I still have not got anything. I have two javascript variables, one name, addfood and named click . The first task ( addBPS ) takes the variables from the code to addfood and click and this amount is re- Assign once again the variable click . The next part of the function is counted just one aviation in a div. It reads the number in the div, and it is animated to "new numbers" in "Variables" in variable clicks . add after the function runs if statement function when variable addfood is greater than zero This function runs addBPS every second Finally, defines a variable named if statement first and sets it to the right. The next function (which is executed when a button is clicked), reassign the variable addfood and whatever number adds Was...

xml - Error while reading SAML Response from Shibboleth IdP in java -

I am trying to write a service provider in Java. I am using Shibolith IDP I am able to send the request to IDP and I am getting the error when I am trying to read the response: java.lang.IndexOfOboutException: Index : 0 at java.util.Collections $ empty (unknown source) org.opensaml.xml.util.LazyList.get (LazyList.java:93) Just before: Rendering = response. GetAstration () Obtain (0); Map resutls = new hashm (); Any suggestions or indicators will be useful.

c++ - Expand macro at where it's defined, rather than where it's called -

Looks stupid, is it possible? struct bar {void dummy () {} # defined act (name, ...) dummy (); \ // Do something inside the bar, not in the main). Et (push_back, 42); I do not think so, but I'm trying to define a variation macro in some way as a member function of bar . Regular version looks like this: template & lt; Typename Func, typename ... Args & gt; Auto Act (FUN Funk, ARG & amp; Eg) - & gt; Decltype (func (std :: forward & lt; azae & gt; (args) ...) {Freak (CTD :: Forward & lt; ARJE & gt; (RGS) ...); } Two types of things are required for: : I want to use this macro to define each member's work required: #define cmf (name) struct name \ {\ template & lt; Typename ... Args & gt; \ Auto Operator () (RGS & ... args) - & gt; Decltype (cont.name (std :: forward & lt; azae & gt; (args) ...)) {\ return cont.name (std :: forward & lt; ergos & gt; (ARG) ...) ; \} \} Name; // ... bar.push_back (42);...

python - It doesnt work to specify CSS class for ModelChoiceField -

I have read through some widget documents and after seeing some thread on the stack overflow, I found some people There is only one problem, but their solution does not work for me. I am trying to specify the CSS class for ModelChoiceField and the error of getting "error" only " init ) at least 2 non-keyword arguments (1 Given "). This is the code related to me: import from django.forms ModelForm, ModelChoiceField .. widgets = {'rangeID': ModelChoiceField ( Queryset = "", widget = ModelChoiceField (attrs = {'class': 'form-control'})}} .. I read in two other answers that they characterize attrs As a feature of the field Were trying to Irdisht and widgets, so when specified as up to a feature widget, but it still does not work. Any thoughts? Anyway, you are trying to pass the whole area in widgets as you like As the name suggests, you have to pass the widget itself. In addition, you have set both field and widget...

c# - Extract gps data storage -

postpick = "text"> I ##### ### But my problem is this .. how can I erase GPS data into my USB GPS device (this is a passive GPS)? Device Information Brand: Landrassia Model: GPS Tracking Key Webpage: By looking at your user guide: You have past-track software to save stored data as .las format. You can use. I believe there is a LIDAR plug-in in DotSpotial which can be read. Las files: DotsPitial.plugin. Leader If you are asking how to write the C # replacement for the previous-track program that directly connects to the USB, but I do not know exactly. DotSpatial is a status library that was originally kept from DotSpatial.Positioning. It's possible that this utility will have the ability to connect to your device, but I think it will probably only support a limited subset of GPS devices, and I have never used it myself. Hope this information is a bit helpful and will tell you in the right direction. Edit: I downloaded the last-track 10 s...

asp.net mvc - Building a Proxy for remote sites (cross-origin js) -

I am working on an asp.net MVC application for which we need to run JavaScript bookmarklet on a remote website There is a cross-basic security restriction on our browser and the remote site can not be loaded in iframe, we can download the html of the page and load it on our page and create any type of "proxy" Of Thought Are is necessary as the work that we have been testing the code below to: public function test (String url) {var client = new WebClient (); Var html = encoding. UTF8.GetString (client.DownloadData (url)); // Manipulate here ... Return contents (html); } This simple part of the code works really well with one exception, all relative links (JS, CSS, images, etc ...) do not explicitly load. is. We had two questions: Is this the best way to manage the problem? While researching we believe that in this way we can inject javascript directly that we need to become a page and we have done it. What would be the best way to convert all related URLs downlo...

vim quickfix avoid buffer change -

I am using vimgrep to open search results cw quickfix buffer I select a line in the quickfix list, the cursor changes the new file buffer. How do I avoid this and keep my cursor forever in the quickfix list? assuming that you & lt; CR & gt; to "select a row in the quickfix list", you can simply & lt; CR & gt; in the quick fix window so that you come make sure that you have on the file type plugin indent and below ~ / .vim / ftplugin / Qf.vim : nnoremap & lt; Buffer & gt; & Lt; CR & gt; & Lt; CR & gt; & Lt; CW & gt; P

c++ - Scroll Bars Won't work in mfc application -

I have a visual class for my MFC app that is supposed to allow the easy scroll bar to inherit the CSrollView class Comes in. I can get scroll bars at a certain point, like when I zoom in on the stuff displayed in the scene, but when I try to scroll to the left, nothing happens, I have two hours This is done online research and I can not tell what I am doing wrong. Here are my manual () and onional update () methods in the View category: Zero CWaveEditView :: OnDraw (CDC * pDC) {CWaveEditDoc * pDoc = GetDocument (); ASSERT_VALID (pDoc); If (! PDC) return; // TODO: Add Draw code for native data here WaveFile * wave = & amp; PDoc-> Wave; If (wave-> HDR == tap) {return; } // Get the window dimensions. Kurt Rect; GetClientRect (Rect); // COLORREF COLORREG COLORREG = RGB (0, 255, 0) for color and wave set in color; CPN Pen 2 (PS_SOLID, 0, color); PDC- & gt; Selection Object (& amp; Pen 2); CBbrush brush 2 (color); PDC- & gt; Selection object (& amp; brush2); ...

VirtualBox Linked Clones Deletion -

This is a 2 part question ... I have created a master VM, a complete clone Master of God's work, and I want to try some new code, it will have an effect on OS, and currently set up MySQL DB, I do not want to mess the clone, so I will create a new clone from it. My question is whether I am making a link clone, run the code on which I have put it and selects the link to remove the clone, does it merge a snapshot back into the VM code, from which I have created a link or just disc disk will be removed? The second part is ... If the linked clone has just been removed and has not been merged with VM originally, what happens to the snapshot that takes the initial VM? Is it safe to remove / merge it or just to prevent the clones connected to it? I have a hard drive space, I do not feel like waiting for 30 minutes to complete the clone for every new potential feature. / P> This is partly a comment and partly a reply. Remark: Do not use a reason link clone? This is a case...

javascript - Why does inserting <div><%= render 'my_partial' %></div> w/ Coffeescript throw an error when the partial contains rails helper methods (e.g. link_to)? -

I have noticed that if I & lt; Div & gt; Insert with coffeescript like this: $ ('# container-1'). SlideUp 'Slow', - & gt; $ ('# Container-2'). Html (" > or collection_select , Coffeescript throws a syntax error if I delete link_to and it is a normal and lt ; A href = ... tag, I get an error. What is happening with any idea? As Felix suggests above, you're probably producing some coffee coffee scripts Because your coffee script is being inserted with irreversible quotation marks. Try using a helpful method, or its easy alias j : & lt; / div & gt; "$ $ (' # container- 2'). Slidedown ()

ruby - How to update hstore columns in Rails 4 -

Is there a way to restrict hstore columns to be saved? I've got the code to do so by now: store_accessor: widget_locations,: left_area1 ,: mid_area1,: left_area2,: mid_area2,: right_area2 But it still allows to save other key names. update_attributes or update / P> I may be wrong, but my guess is that you widget_locations item.widget_locations [: left_area1] = thing If so, you can call it item.left_area1 = thing > Because you have asked to create the store_accessor attributes : left_area1 ,: mid_area1,: left_area2,: mid_area2,: right_area2 The database will be serialized in the column : widget_locations . Now these attributes will behave like normal attributes, so that you can put the assumptions on them etc. This lets you update an item as usual: item.update (name: 'test', left_area: 'garden', mid_area: 'livingroom ') Hold with a hstore will allow be to access the serial column to allow you t...

regex - Insert a space after every given character - java -

I need to insert a location after a given character in the string. For example "Abc.def ..." need to be created "abc def ..." Then given in this case My search on Google did not answer that question I really need to get some serious reggae knowledge. Edit: ---------------------------------------- ---------- ------- string testing = "0:; 1:;"; Test.replaceAll ("\\:", "::" "); Println (test); // Output: 0 :; 1:: // Not done anything Solution: ------------------------------- ------------------- ----- string testing = "0:; 1:; "; ** test = ** test.replaceAll (" \\: ",": "); Println (test); You can use: string input = "abc.def ..."; string result = input.replaceAll (" \\. ",". "); // Results" abc. Def ". Edit: string testing =" 0:; 1:; "; Results = test.replaceAll (": ",": "); // The result will...

Why Fitnesse+RestFixture over JMeter? -

I am learning fitness + restfaction and it seems that JMT can do everything using fitness (eps. URIs are testing via HTBI verb)? Can someone shed some light on this please? "post-text" itemprop = "text"> FitNesse is an acceptance testing tool, where Jmeter is primarily a demonstration test tool. In acceptance testing, testing and examination results can not be a recipient of technical person, therefore, how you define your tests and how the results are presented, are important matters. Acceptance tests / criteria (in playful software development) are usually expressed in business customers and business domain language. [...] These tests are ideally designed in collaboration with business clients, business analysts, testers and developers. [...] the owner of the business customer (product) stakeholder primary project of these tests as user stories that cross their acceptance criteria, business owners can be assured that the developers are making progre...

area - Simpson's rule in C - Incorrect answer -

I've written a program to calculate the area under the curve for the function: f = tan (x) Fixed (i.e. should be more than 61 dimension) so that the program is compiled and runs but wrong answer gives output! I am thinking that the error is for the loop which is summarized over Tan [j], but it is not sure where ... #include & lt; Stdio.h & gt; # Include & lt; Math.h> // Question 3A Create a program that calculates the area below the curve: // y = tan (x) to 0 - & gt; PI / 3 / TODO: Announce the job to change the degree to radians in the form of x. 3 practical float digitizer (float AGR); Float pi = 3.1415927; Int main (zero) {int i, j, sum1 = 0, sum2 = 0; Int slow; // loop index, counter, array dimension float a, b, rd, h, tan [dim], region; // return value of function, result array, field, coefficient B = (float) (pi) / (float) (3); H = ((float) (b - a)) / ((float) (dim - 1)); Printf ("\ nPlease input an input for step size. \ N"); Scanf ("...

Can i compile in memory source code to executable with clang? -

To read this link: I think I can load the c / c ++ file and compile it Executionable for .. .. I did not get any information if I have any source code in C / C ++ which can be generated by my application or in other ways .. .. i can pass at least the step Where do I load the C file, and make my argument to compile just to be executable? Of course you can do this and for this purpose a project is already done - your source code To dig in the form of your desire. :) What is cling cling is an interactive C + + interpreter, which is built on top of LLVM and its advantage over blanket libraries standard interpreters is that there is a command line prompts in it and compilation Uses Bus-In-Time (JIT) compiler for Many of these software applications (such as Mono, named CNSPRPL) in their project (named Mono) call them interactive compilers, giving one of the main goals of Klinge to provide contemporary, high-performance options of the current C + + interpreter in the root project...

html - competing CSS stylesheets -

I am trying to remove the boundaries on a specific table: & lt ; Table class = "teacher" & gt; & Lt; TR & gt; & Lt; Td> Line 1 & lt; / Td> & Lt; Td> Colonel 1 & lt; / Td> & Lt; Td> Call 2 & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> Line 2 & lt; / Td> & Lt; Td> Colonel 1 & lt; / Td> & Lt; Td> Call 2 & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt; You can see my Bela I think that from bootstrap.css my site.css Competing but I am not sure how to get rid of the boundaries? My teacher (from site.css ) is styled here: Reader {Text-align: left; Padding: 0; } .taker table {limit: none! Important; Border-Fall: Fall! Important; }. Teacher .contentLabel {width: 45%; }. Reader input {width: 10px; Padding: 0 pixels; }. Reader texture {width: 225px; Padding: 0 pixels; } My bundle: bundles. Include ("~ / content / sit...

php - Why is a public writable directory vulnerable? -

बस सामान के साथ प्रयोग करना:) मैंने एक नई निर्देशिका बनाई और chmod 777 (इसे सार्वजनिक रूप से बनाया लिखने योग्य) अब मान लीजिए मेरे पास सर्वर तक पहुंच नहीं है, जहां यह निर्देशिका है मैंने निम्नलिखित की कोशिश की: file_put_content ('', "मेरी नई फ़ाइल फ़ाइल सामग्री"); (मैं एक PHP उपयोगकर्ता हूं)। // काम नहीं किया जैसा कि HTTP आवरण समर्थित नहीं है। मैंने जावास्क्रिप्ट को उसी लिखने योग्य फ़ाइल में अपलोड करने के लिए इस्तेमाल किया मुझे एक कॉरस त्रुटि मिलती है। अब जब मैं इस फ़ाइल को इस सार्वजनिक लिखने योग्य निर्देशिका में अपलोड नहीं कर सका क्या कोई बता सकता है कि किस तरह से सार्वजनिक लिखने योग्य निर्देशिकाओं का दुरुपयोग किया जा सकता है?

Return for an argument in iOS -

I am making a cydia tweak using theos and% hook, the methods I am trying to edit Is - (zero) setNumberOfCoins: Finally (float) arg1 I would like to know how to edit the float value and not the previous zero. Thanks! EDIT: The way to return a float value in general will have to do this - (float) coin value {return 100; } But I have to find out how to return the argument I'm not sure what you are trying to accomplish. method - (zero) setNumberOfCoins: (float) arg1 assumes a float and does something like this. For example: - (zero) setNumberOfCoins: (float) arg1 {float someFloat = arg1 * 2.0f; A float float = Arg 1 * 4.0F; Float and other flat = arg1 * 8.0F; NSLog (@ "Some float value is% F", some float); NSLog (@ "One float value is% F", second float); NSLog (@ "value and other fleet% F", and other flights); } and to use it: float number coins = 2; [Self setembarofffor comics: Nimbix]; Output: Some float values ​​are...

python - Python3 based WebSocket server, client closes connection on send -

I am currently learning Python and choosing a websacet server as a learning project, this is probably an intelligent decision Reading WebSket RFCs is not ... Getting hands-on and receiving single-framed packages is working, but the customer does not have to send the data back. I'm using Firefox and Chromium as clients for testing. While retrieving data from the server, both browsers are canceling the connection, this is an error message from Chromium: WebSket Connection 'ws: // localhost: 1337 / 'To fail: unrecognized frame opcode: 13 createFrame function should send a message text frame, Send to customer def createFrame (text): Length = len (text) if length is & lt; = 125: ret = byteearray ([12 9, length]) for byte in text.encode ("utf-8"): Ret.append (byte) print (ret) return reserved #TODO 16 & amp; 64 bit payload length This is the createframe debug output, which looks fine if I understand RFC, fin and UTF are 8 bits, length is 5: ...

jquery - Why am I unable to call a function in JavaScript? -

I have some javascript which is about to call two functions, but failed to do so. I suspect that I would know why, but I do not know how to fix it. Here's my jQuery: var is_mobile = false, page = document.location.pathname.match (/ [^ \ /] + $ /) [0]; $ (Document) .ready (function () {var ul = $ ('nav>'; ul '), li = ul.children (' li '), href = li.find (' a [href * = ' + (Page + ''] '), is404 = true; if ($ (' $ mobile '). CSS (' display ') ==' none ') {is_mobile = true;} {is_mobile} {orderList () ; ReadList);}}); / ************************************************************************************************* ***** ****** / Function Order List () {$ (li.find ('a [href * = "contact.php"]')). RemoveAttr ('style'); // step element on top. Ul.prepend (href.parent ()); If (page! = "") {Li.children ('a'). Each (function () {if (page == $ (this) .attr ('href')) {...

How to compare if combobox item is equal with listview item or listview already contains combobox item in c# -

How to compare or check whether the item in the combobox is already present in the list view or not? Please help .... if (lvCart.Items.ContainsKey (cmbdummy.SelectedItem.ToString ())) {MessageBox.Show ("Duplicate Entry!"); } You must check with the respective SelectedValue . Try it: if (lvCart.Items.ContainsKey (cmbdummy.SelectedValue.ToString ()) {MessageBox.Show ("Duplicate Entry!"); }

sql - Multiple Converts -

I have looked through orders online and through my book, without any luck. This is the last part of the problem. "Display current age of all employees." My tables and columns are: Employee Column: Name (VARCHAR (20), blank), address (VARCHAR (20), blank), Employee Number (INT, blank), Salary (SMALLMONEY, blank), Birthday (DATE, blank) ), Employment (date, blank) Whatever I have found is changing one or two birth dates online. Is there any order to convert many people to write in their birthdate in the query? DECLARE @ dob datetime SET @ dob = '1992-01-09 00:00:00 "/ code> What do I have to do Choose Name Name Date Date SET @ dob = 'yyyy-mm-dd' Something like this, I think there are 37 lines of names that I used to date Age will need to be changed. Any help is greatly appreciated, thanks in advance for help. You already have the date of birth column as date To calculate the age, you need the difference between it and now (the funct...

java - Spring MVC Validation of Inherited Classes -

I believe I'm the only one who wants to do this, but I'm not getting any reference to my obstacle Use Spring MVC and annotation-based verification to help me above (I'm using Framework 4.0 and Java 1.7), consider a simple class hierarchy as follows: Abstract square fu {@ size (max = 10, message = "name must be 10 characters or less. ") The name of the private string; Public string getName () {this.name; } Public Zero Setname (string name) {this.name = name; }} Square Bar Expands Fu {} Class Bang Phu {} If I have put Name in a bar, in the example of Bar or Bang I have more than 10 characters, I get the expected error. I suppose, though, I think that bar and bang are still to be obtained from the abstract base class fu, but that I have the name attribute of the hair sections different assumptions. How can I explain the bar and the bang so that the bar.name is the maximum length, 12 characters plus Bang.name the maximum length of 8 characters is? ...

c# - Find property "invocations" with Roslyn -

I am trying to create a call graph of C # methods and properties. This essentially means that I search for projects for the MethodDeclarationSyntax and PropertyDeclarationSyntax nodes. Then I find the method between these nodes by searching through invoices: syntax node = ...; // Some syntax nodes var method Invokes = node. Desendend nodes and SEF (). OfType & lt; InvocationExpressionSyntax & gt; (); // Process the invocations of these systems Is there a method to find the same method or all the property "invokesments"? I believe the C # compiler excludes the compilation in the gateter and setter functions. What is the best way to detect the use of properties with Roslyn? The Roslin model is not according to the source of IL and therefore the individual calls for received and set methods. Not represented. To do this, you will need to find MemberAccessExpression and IdentifierNameSyntax nodes and call GetSymbolInfo to see that they Mention. ...

visual studio 2010 - SQL Server Reporting Services Returns Too Many Records -

I have 3 large tables in SQL Server 2012 that are related to all phone numbers. .. "An error occurred during the local report process that occurred during the processing of an error during the processing of an exception occurred. 'System: When I create a report with Visual Studio BI reporting wizard I receive the following error The auto-exception was thrown "." I think the report is returning too much records if it is run. How can I turn it on? Or other suggestions? The query used in the report is given below select table1.customer_phone, table2. PhoneNumber, table3.ANI LMIRSIONS from within table1 table2.PhoneNumber based on combination = table1.customer_phoneInbound table2.PhoneNumber = table3.ANI join table3 Consider adding one or more add report to the returned SSRS to limit the number of records: . By looking at It may be wise to see the parameters - A parameter may be considered below PhoneNumber value By limiting the results of the...

C passing char array to function, compute with another char array and copy -

मैं ऐसा कुछ करना चाहूंगा: #include & lt; stdio.h & gt ; Char * myfunction (चार * में); शून्य myfunction2 (चार * में, const char ** सामग्री); Int main () {char * name = "aName"; चार * परिणाम = myfunction (नाम); वापसी 0; } Char * myfunction (char * in) {const char * test = NULL; Myfunction2 (में, और परीक्षण); वापसी परीक्षा; // मैं परीक्षण के मान को वापस करना चाहूंगा} शून्य myfunction2 (चार * में, const char ** सामग्री) {char input [1024]; // input * content = input भरने के लिए कुछ चीजें करें; } लेकिन मैं ऐसा करने में सक्षम नहीं हूं, कभी-कभी कुछ अजीब अक्षर मुद्रित होते हैं ... आपके उत्तर के लिए धन्यवाद, मैं इसे अच्छी तरह समझता हूं , लेकिन मैं अपनी समस्या के दूसरे पक्ष पर फंस गया हूँ। मैंने अपने उपयोग के मामले को ठीक से नहीं लिखा, इसलिए मैंने इसे पूरा करने के लिए संपादित किया। सबसे स्पष्ट myfunction (); गलत कॉन्स्ट के रूप में myfunction की पूर्ण घोषणा; की पूर्ण घोषणा > Myfunction के रूप में int myfunction (); यह हल करने के लिए पर्...

jquery - How do I make a bunch of different draggable/droppable elements droppable to each other? -

I have a bunch of elements (say "div a", "div b", and "div c"), And they are all dragable and droppolyle they accept all the pullable elements from the initial div ("div A") that the elements are in. If I'm in "div b" or "div c" then I can drag them back to "div a". However, I did not know how to do this so that I could pull from "div" to "divi" or vice versa. Whenever I try to add that code it spoils everything. "post-text" itemprop = "text"> Use Sortable instead of Dragable / Dropable

ios7 - Setting UITableViewCellStyle2 Tint Color -

I do not believe I do not see it anywhere on Google, but I have a strange problem. I am replacing Global Tint in App 7 in App Rep: [[UIView presence] Settin installer: [UIColor redColor]]; However, when I display the table view with UITableViewCellStyle2 cells, the title of the text is still the default blue color How can I decide ? I will not give this subclass. Thank you! Just change the color of the text. cell.textLabel.textColor = [UIColor redColor];

ios - Remove mapView from parent, then add back later -

After I am trying to remove my map view from parent view, then add it again at some point : Ex: Index on Self.mapView: 0]; } break; } Case 1: [Removing Malformed ViewproductsView]; break; }} When I click the second button in the control of my section, mapview is removed. However, when I click on the first button then it does not seem to add it back correctly. What does it mean that it has been added back to the parent scene but the map does not appear. I have subviews it with the same result And try to add the top bottom. You might ask why I want to do this (as I myself am asking). I am trying to give my users the ability to point to different map types (except for iOS). MKMapView will talk on iOS maps that's awesome, but I want to throw RMMapView (mapbox / routeme) map view as well. I'm not sure what is the best way to swap in and out of this kind of map, should I swap the views of old maps and create news on swap? Or should I keep looking at old maps ...

java - Create and sort 2d array from file -

Ok so basically I have to complete 2 things with this code 1. Two columns from the file have an array Sort them in 2. And arrange them in the order from the largest to the smallest, based on the second column. Before I can start the sorting algorithm, I need to sort the array properly. Any help would be great. Thank you. I have listed hyperlink to the contents of the file given below. Import java.util. *; Import java.io * *; Import java.text *; Public category sorter {public static id = 0; Public static score = 0; Public static zero major (string algos []) {scanner infix = zero; Int ROWS = 21; Int COLS = 2; {InFile = New Scanner (Try New File ("sorter.txt")); } Hold (FileNotFoundException e) {System.out.println ("File not found!"); System.exit (0); } While (inFile.hasNextLine ()) {string str = inFile.nextLine (); String [] parts = str.split (""); String part 1 = parts [0]; String Part 2 = Part [1]; Id = integer.percent (part 1); Score = integer Pe...

android - How to use tabhost to display tabs in fragments -

I used the activity to display 3 tabs using tab host, but now I want to display tabs I want to use FRAGMENT to display the tabs activity so I want the equivalent code to use the tab host in the segment. view this tutorial Hope it helps

C++ vector of objects: assigning the objects -

I have to create a hex board for the class and I have a problem with my code nodes for the board in my graph There are 2D vectors of each node in the vector of neighboring nodes. I can not specify neighboring nodes in the vector. Node class: class node {public: string hex_type = "E"; // To start vector blank & lt; Node & gt; Neighbors; Int xcordinate; Int Ycoordinate; Classroom Graph {Public: Integer Size; Graph () {it-> Size = 11; } Article (int a) {it-> Size = A; } Vector & lt; Vector & lt; Node & gt; & Gt; Nodes; Zero start () {int x, y; Int max = it-> Size-1; This- & gt; Nodes = vector & lt; Vector & lt; Node & gt; & Gt; (Shape, vector & lt; node & gt; (shape)); (X = 0; x & lt; size; ++ x) {for (y = 0; y nodes [x] [y] = node (); It-> nodes [x] [y] .xchordinate = x; this-> nodes [x] [y] ycoordinate = y; this-> nodes [x] [y] .neighbors = Vector & nt; node & gt; (6); if ((x == 0) ...

how to add days to java simple date format -

How do I add 120 days to my current date, which is to use simple date format? I has seen some posts about SimpleDateFormat dateFormat = New SimpleDateFormat ("dd / MM / yyyy") but it could not work, ); // Get the current date time with date () date = date new date (); Do I need to use the calendar library or can I do this with a normal date format? calendar , which will automatically roll the different areas of the date based on the changes Has potential. Single field, for example ... calendar cal = Calendar.getInstance (); Cal.setTime (date); Cal.add (calendar.date, 120); Date = cal.getTime (); Look closely for a more information. Yes, this is a method using add time, but I can type this example quickly;) Update with JodaTime Example An example is using the following. You can parse the string value using jodaTime directly, but since you have already done so, I did not bother ... date = ...; Date time DT = New date time (date); Dt = dt.pl...

iphone - ios method param assign global variable -

Why is the class NSMutableArray arl count still 0? Is there any way around this? Class B BH # import & lt; Foundation / Foundation. H & gt; # Imports "AH" @Interface B: NSOBEIS - (zero) DOSMANG; ", @" 3 ", @" 4 ", zero]; A * A = [[A allot] init]; [one getValue: array];} class A ah #import & lt; UKit / UKit.h & gt; @ class B; @ Intifes A: UIViewController; @ property (strong, Nonatomic) Ansamayutiablare * Arl; - array (zero) GetValue: (NSMutableArray *); - (IBAction) button: (id) this; @end Am @implementation A @ synthesis Arley; - (void) Drishydidlod {[super Wudidlod ]; B * B = [[B Elok] Init] [B Dotsing];} - (void) getValue: (NSMutableArray *) array {arl = array; // arl = [[NSMutableArray alloc] initWithArray: Array]; // [arl addObjectFromArray: Array]; Anselog (@ "Arlk count:% d", [Arl count]); // is connected here 4 - (IBAction) button: (id) sender {Anselog (@ "Arl count:% d", [...

jquery - Life-cycle of Ractive components -

In addition to being ins, I am not sure whether the life cycle of the reactant component is For example, Is it safe to access? I tried to use the popular sparkline jQuery plug-in, but I never got this work. post-text "itemprop =" text "> library is now quite To access the DOM, use Ractive.on ('render', ...); or onrender in the template / component. See:. This version is running on 0.6 .

standards - Where is UML Core in UML 2.5? -

background Before UML 2.5, UML was defined by two documents: UML Infrastructure and UML Superstructure MOF 2, a closely related OMG standard refers to the UML core, and is defined so that MOF 2 and UML 2 can share with some specifications. UML 2.4 Infrastructure, this UML Core was clearly defined. UML 2.5, which is a complete rewrite of UML 2, now comes in the form of a document, and in addition, the UML does not define the core more clearly, whether or not it is not naming it. Question I do not believe that MOF 2 and UML2 have been out of sync with the introduction of UML 2.5, because UML 2.5 is a small revision of UML 2.4 It is believed, therefore, I believe that MOF2 is still defined in parts by importations by 2.5 specifications, and just wondered what is the equivalent of UML core in UML 2.5. Is this chapter 7 titled "General Structure"? UML 2.4.1 (current) and 2.5 is a small and restructuring document and probably some cosmetic in the subject There are di...

Retrieving multiple values associated with a single record. MySQL PHP Codeigniter -

I need help with a query on the following tables. table user (user_id char 5), user name four (12), column x four (10)); * Telephone (user_id char (5), phone number number (10), primary (Y, n) four (1)); * Both tables are linked to user_id, each user can have multiple phone numbers here. I have to take out a group of users and their phone numbers. I am trying to do the following In the model $ This- & gt; Db- & gt; Where ('column', 'some'); $ Query = $ this- & gt; Db- & gt; Receive ('user'); Foreign currency ($ query-> result () as $ line) {$ this- & gt; Db- & gt; Select ('phone_number'); $ This- & gt; Db- & gt; Where ('user_id', $ line-> user_id); $ This- & gt; Db- & gt; Where ('primary', 'y'); $ Q = $ this- & gt; Db- & gt; Get ('phone'); } How do I return to the model and display multiple phone numbers for each user, when my first $ query returns m...

c++ - Need some clarification on #pragma once -

I have searched for some explanation as to whether #prramhas really does once and there is no definitive answer for some questions. I can still get it. Once the #pragma insurance is that the header file is included in it, it is said only once that the handlers included in the header file are not included yet? Also, if it is called only once, then what does it mean? Is the CPP file that requires a special title, will not be able to access it? If a header file is marked with #pragma once and is included in the CPP, can that header file be used elsewhere? These are explanations that I can not find. Sorry, if there is a document that clarifies it somewhere, but I can not really find anything specific. #pragma once protected one file in only one translation unit Does not count sub-hierarchy of being included in it. (However, if the second inclusion of the file is prevented, then there is not a chance to include twice as much in it.) You can re-add it to another .cpp Can r...

php - Upload PDF form to server via submit in Acrobat -

I have created a PDF form using Acrobat. The form has a submit button, and I really want to submit the entire form and upload it to the server. Is there any way to do this? I have experience with PHP and other languages, but do not do anything with PDF form. During form creation, when you submit an action to your button, Acrobat displays a dialog Which asks you to submit form data for the URL. This dialog allows you to choose how to submit the form. (At least this is like this in my ancient Acrobat 9.5.) If you want to submit the entire form, ie a full PDF with full form field, then the option of the full PDF document Select. If you do not want to get the original document already present, but want to add the increase as an update, select the option for FDF and check the change-by-step box. You can create a complete PDF from the original form and these incremental updates. Look for some backgrounds.

python - Weighted percentile using numpy -

Is there a way to use numpy.percentile function to calculate weighted countertops? Or does anyone calculate weighted vendetta with optional python function? Thank you! Unfortunately, the weighted functions for everyone in numpy are not created, but, you always have something together at the same time. can add. Append (i [0]) weighted np.percentile (weight_array (AR, weight), 25)

cakephp saveall Error Argument #2 is not an array -

I have a code that worked for months on my local host and development server. The two windows are the environment when it is moved to a new Linux hosting location, it throws these errors: Warning (2): array_merge () [function.array-merge]: logic # 2 Not an array [Core / Cake / Model / Model.php, Line 2036] Warning (2): array_merge () [function.array-merge]: Logic # 2 is not an array [Core / Cake / model / Model.php, line 2186] The code snippet in question is one left, all the calls which saves the data obtained from a form. Interestingly, the data still saves despite error. The code for my save is here if (! $ Quote ['quote'] ['total'] = = 0 = $ quotes ['quote' ] ['Total'] this - & quot; Citation-> Saving All ($ quote, true)) {$ this- & gt; Session->; Set flash ('quotation delivered', 'success'); $ This- & gt; Redirect ('/ client cases / view /'. $ Case. '# Tab6'); } Full function: p...

ios - Tableview delegate not return value -

I have a problem with UIButton tableviewcontroller , when I do The test, and I click the Cancel button to call the action, they did not call the representative, did not work, did not follow the code. StalkViewController . #import & lt; UIKit / UIKit.h & gt; #import "FMDBDataAccess.h" #import "EditStalkViewController.h" #import "NewStalkViewController.h" StalkViewController @interface: UITableViewController & LT; NewStalkViewControllerDelegate & gt; @protecti (nanatomic, strong) NSMutableEre * stalk; - (zero) populateStalk; @end StalkViewController.m - (Zero) addNewStalkViewControllerDidCancel: (NewStalkViewController *) controller {[self-dismissViewControllerAnimated: Yes Completion: zero]; } - (zero) prepareForSegue: (UIStoryboardSegue *) segue this: (id) this {if ([isEqualToString segue.identifier: @ "addstalk"]) {UINavigationController * navigationController = segue.destinationViewController; NewStallView c...

bash - Applescript+Shell Compare list of folders to list of files and move files into subfolders -

Image
I am trying to create an applescript which will run the script below. Transferring a file named temp_m to a folder with a name screenshot provided for reference is the benefit of easy applescript to select the "loose images" (source) folder and the build out (archive) folder for the user. Often exist in different places, sometimes at server / share. E.G. to set myFolder (folder Select pFolder myFolder Set the name for the paragraph of the POSIX path of the folder (Find Shell Script "PARENTDIRECTORY =" pFolder ". -Name" * .jpg "| When the file reads temp_m = $ (basename" $ ​​file " .jpg) look = $ (echo "$ PARENTDIRECTORY / * / * $ {temp_m}" | sed 's / / \\ / g') # All subfolders must be matched in this original folder , Which is the same name as Temp_m name = $ (Eval echo $ look) if [-f "$ look"] then todir = "$ {look% / *}" resonant mv "$ {temp_m}. Jpg "$ {todir} / # to copy op...

linux - Diff between two remote folders through SSH -

Do anyone know how to list files in a remote folder and not in other remote folders? I have two servers (called Server 1 and Server 2) with the same folder structure where I am Rsync However, in the Destination folder there are more files than the source because some files were deleted. Now I am trying to find a way to find which new files in Server2 using diff between Server2 and Server 2. I can take the difference between two local folders directly using the following command: diff / home / www / images / test_images / var / www / site / Images / test_images But I was wondering if the difference between two remote servers using SSH is possible for folders like this? diff ubuntu1@images.server1.com: / home / www / images / test_images ubuntu2@images.server2.com: / var / www / site / images / test_images The SSH configuration of Server 1 and Server 2 are as follows: Server 1 IP: Images.server1. Com user: ubuntu1 password: pa $$ word1 image path: / home / www ...

makefile - Rebuild specific object based on condition -

I am trying to modify the Geneva mefile of one of the big projects in which there are general / pattern specific rules. Macfill is compiling and linking in different rules. I have a specific need that if a certain condition is set on the link, then before re-linking I want to call the compilation rule again. The sample issue is below the makefile, $ (obj_dir) /% O: $ (src_base) /% Cpp @echo compiling: $ & lt; $ (Q) $ (CSEA) $ (CFFALAGS) $ (REV) $ (CFINICLUDUUUTUH) -o $ @ $ & lt; $ (Link_files): To add @echo $ @ $ (q) $ (cfi) $ (linkflages) -o $ @% O ifeq (1,1) #condition pass So I want to call the ompilation rule again above normal ?? ??? And $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ . Step 1: You probably already have it on the original messy file , But here's a framework: object: = $ (obj_dir) /foo.o $ (obj_dir) /bar.o $ (obj_dir) /baz.o # You can see a list like this Somewhere, should be constructed in any way $ (Obj_dir) /% O: $ (src_bas...

java - Get a part of data got using HTTPClient -

I am using HTTPClient to connect to the website. byte [] feedbackBody = method.getResponseBody (); System.out.println (new string); Now I just want to get a part of html. That is, I want the text that tags & lt; Td> & Lt; Font size = \ "2 \" & gt; and and are displayed before. > How should I use split function for the above problem? I used string [] substr = new string (responseBody) .split ("& lt; td> But it gives the address. I want to display the text. How should I go about this problem? For a simple case you can use regex to match and remove all tags You will leave with the data. \ & lt; [^ \ & Gt;] * \ & gt;

Google Sites: creating a site using a custom template, Scripts not being copied -

So I created a template for Google Sites. This template will be used to automatically create a site by the system. The problem is that like new sites, all share the same script (and script DB), where I thought the script would be copied and the script would have its own version on each site. The problem is that we will now move faster than quota, what I was trying to achieve was creating a site with a fixed layout, but the data for each site will be different (because they have different scripts Were). I thought this would work because I had used this technique for spreadsheets. I've created my spreadsheet, added my script to it and then made a copy and shared it with people who wanted to use it. Then I continued to work on the original script without modifying the script for the shared spreadsheet. Is there a job for this? Is there anything that can be done to create new scripts for each site? Here's the quota page. Update: So I copied the template to see if ther...

php - Mysqli does not retrieve password from database -

I am starting to learn PHP and using mysqli I am working on a simple password change script. I am using a MySQL tutorial as a reference. Now I have a problem where my code is unable to get the old password from the database, and I have not received any error messages. if ($ user) {// start password change ($ submit) {$ oldpassword = $ _POST ['oldpassword']; $ Newpassword = $ _POST ['new password']; $ Repeat_newpassword = $ _POST ['repeat_newpassword']; // $ db connect = mysqli_connect ($ mysqli_error (connect) "Could not connect to database!".) Connect ("localhost", "root", "****", "registration") or die Go; $ Queryget = mysqli_query ($ Connect, "Username WHERE Username = '$ user'" "Select password) or die (" query error ". Mysqli_error ($ connect)); $ line = mysqli_fetch_assoc ($ queryget); $ Oldpassworddb = $ line ['password']; // if checking fields are filled in ...

Clickonce application setup always asking to download prerequisites -

I have deployed a WPF application in properties in Visual Studio -> Publish tab. When I specify the prerequisites, I added the 'Microsoft Report Viewer 2012 Runtime' to see what happens when I click on setup.exe for the first time, it automatically installs Report Viewer on my machine Does. Now when I try to run setup.exe again, it is asking my permission to download the necessary software (the Microsoft Report Viewer is in the installed program). I thought that after clicking, it will be checked whether the pre-install is installed and if installed it will stop downloading. am I wrong? If this is not happening why? I am working on a similar problem. I want the new Access Database Engine Redistribution (ACE) to be a condition. I had to make a bootstrap package for this so it would appear in my list of something else. (This is a clickon, a Windows form application.) Then every time I install my app, it opens the ACE installer, whether it is needed or not. I've ad...

sharepoint - Creating periodic/looping workflows -

I have a list whose name is Reminder_Link in which a dateTime is the date the date reminds me Want to create a SharePoint Designer workflow on that list which runs daily and checks whether the date of the reminder is equal to the current date or not, if it is equal then it will send an email. Is it possible to do this? Any idea anybody? You can not do this by using the SharePoint workflow. You should use custom timer jobs instead, See:

android - Save ListView content -

मेरे पास Google का नेविगेशन ड्रॉवर है जो टुकड़े जोड़ता है नेटवर्क कोड ( asyncTask , समय लगता है) के द्वारा टुकड़ों में से एक listView कस्टम BaseAdapter से भर गया है। मुझे क्या चाहिए listView सामग्री को कहीं न कहीं बचाने के लिए है, अगर उपयोगकर्ता किसी अन्य टुकड़ा को नेविगेशन ड्रॉवर के माध्यम से नेविगेट करता है और फिर या बाद में खंड में listView - मुझे एक listView चाहता हूं कि तुरंत सहेजी हुई पुरानी सामग्री के साथ आसाइंड किया जाए इससे पहले कि asyncTask नई सामग्री लोड हो रहा है न्यूनतम एपीआई 10 है। मैंने क्या प्रयास किया। onSaveInstanceState - serialize पार्सलेबल अर्रे लिस्ट & lt; कस्टमऑब्जेक्ट & gt; । किसी तरह मुझे यह काम नहीं मिला। इसके अलावा, यह मेरी समस्या को हल नहीं कर रहा है, क्योंकि onSaveInstaceState नेविगेशन ड्रॉवर के माध्यम से नेविगेट करने पर ट्रिगर नहीं किया है। नया टुकड़ा सेट करना InitialState (setInitialSavedState) फिर बचत (सेवानिवृत्ति अंतरसेट) / इसे लोड कर रहा है। यह साधारण दृश्य जैसे EditTexts और TextView के लिए काम करता है, ...

jboss - Override logging in WildFly -

I use Tomcat and just override the default logging system How to enable logging with wildback on wildfly in my Spring app can go? My logback on Tomcat. XML Ok writing & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Configuration & gt; & Lt; Appender name = "STDOUT" class = "ch.qos.logback.core.ConsoleAppender" & gt; & Lt; Filter class = "ch.qos.logback.classic.filter.LevelFilter" & gt; & Lt; Levels & gt; Error & lt; / Level & gt; & Lt; OnMatch & gt; Accept & lt; / OnMatch & gt; & Lt; OnMismatch & gt; Denial & lt; / OnMismatch & gt; & Lt; / Filter & gt; & Lt; Encoder & gt; & Lt; Pattern & gt;% - 4relative [% Thread]% -5 Level% Logger {35} -% Message% n & lt; / Pattern & gt; & Lt; / Encoder & gt; & Lt; / Appender & gt; & Lt; Logger name = "org.springframework" level = "wARN...

java - How do ListActivities work with ListViews in Android? -

As a C # developer, I am trying to get acquainted with Java and more specifically the Android Framework. I have created some very basic introduction actions, but now I am trying to get and get a list view with 'listed'. I found this sample code: I do not think I have fully understood the concept of these ideas so far, because at the beginning I thought that the ListActivity class that I created was of some kind of user Will be made in the form - the company that I can replace my listView with just whenever I see the code, it seems as if it is trying to hook in an existing view that confuses me (How do I call this inventory activity from my current activity, and how do I use it with my list view?). getListView () SetEmptyView (progressbar); Can anyone please explain what's going on? Maybe I've become too The NET pattern is centered and I do not understand the image properly. A ListActivity is an activity that assumes that you have a list with a specific ID wit...

i have python 33 but unable to import numpy and matplotlib package -

I am unable to import numpy and matplotlib packages in python33. I am getting this error I tried to install these two packages but unable to import, I am getting the following error: import, named traceback ( Most recent call final): Import file number, line 1, import number: No module 'numpy' Import matplotlib traceback (most recent call final): import "matplotlib" file to import, line 1 , Import Line: A module called 'matplotlib' Only The oval and maplelib installer on the official site Available: Use them. Make sure that you get the right version you are on the window, so you want the latest version of the EXE library and the version of Python you are using (3.3).

java - Jmeter - Future timestamp -

Trying to create a parameter in the jacketer that gives the current timestamp + 5 minutes Does anyone have to do this ? I have this to create the current timestamp: $ {__ time (hh: mm: ss, timestamp)} I'm afraid the function does not provide sufficient flexibility. import will look like java.text.SimpleDateFormat will need to calculate this date value; Import java.util.Calendar; Import java.util.Date; Date now = new date (); // Current time calendar c = Calendar.getInstance (); // Get the Java Calendar Example c.setTime (now); // Set calendar time for now c.add (calendars, minutes, 5); // Add 5 minutes to the current time date now_plus_5_minutes = c.getTime (); // Receive date value for modified time SimpleDateFormat sdf = New SimpleDateFormat ("HH: mm: ss"); // Create formatting for date string mydate = sdf.format (now_plus_5_minutes); // date of format as "string wars.ppt" ("mite", maidet); You will be able to refer to the mydate...