Posts

Showing posts from February, 2015

php - Assign a custom global pseudo variable in Code Igniter like {elapsed_time} -

Hello As you probably know, code igniter pseudo You can specify the variable by using the parser library, but you also know that if we want to assign a pseudo variable to use it in a single view, then we have to do it in each controller, which will convert those sequences to the pseudo-variable Loads with. I would like to know that if there is any way of Code Igniter 1.7.2 , then I can assign to a global pseudo variable (like a pseudo variable from the benchmarking class) . The pseudo variable I want, the normal data will be returned from the $ config array to the config.php file. If someone can help me Regards. I looked at the source code for benchmarking and output classes. These variables are specially replaced by the output class, so without modifying it or spreading it (if you are bound to use a template parser, or sticking to the normal PHP method If you are actually setting this to happen, you can write a library and use a hook to find / replace befor

php - Zend_Table_Db and Zend_Paginator and Zend_Paginator_Adapter_DbSelect -

मेरे पास निम्न क्वेरी है: $ this-> चुनें () - & gt <> अब मेरे पास Zend_Paginator कोड है: $ paginator = नया Zend_Paginator (// $ d Zend_Db_Select का नया उदाहरण Zend_Paginator_Adapter_DbSelect ($ d)); $ Paginator- & gt; getAdapter () - & gt; setRowCount (200); $ Paginator- & gt; सेट आईटमेकपेरपेज (15) - & gt; सेटपृष्ठरेंज (10) - & gt; सेट चालू पृष्ठ संख्या ($ pag); $ इस- & gt; दृश्य- & gt; डेटा = $ पृष्ठक; जैसा कि आप देख रहे हैं कि मैं डेटा को देखने के लिए पास कर रहा हूं $ this-> gt; view- & gt; डेटा = $ paginator इससे पहले कि मैं नहीं था $ paginator- & gt; getAdapter () - & gt; setRowCount (200); यदि मेरे पास कोई डेटा है या नहीं, तो डेटा के साथ मेरा क्या मतलब है, यदि क्वेरी में कुछ परिणाम हैं, इसलिए यदि क्वेरी में कुछ परिणाम हैं जो मैं उपयोगकर्ता को दिखाता हूं, यदि नहीं, तो मुझे उन्हें संदेश दिखाने की जरूरत है (कोई परिणाम नहीं!) लेकिन इस समय मुझे नहीं पता कि मैं इसे कैसे निर्धारित कर सकता हूं, क्योंकि < Cod

java - Scan screen for color -

I would like to scan the screen for a particular color. Any idea how to do this? robot robots = new robots (); Rectangle Captures = New Rectangle (Toolkit.Get DefaultToolKit (). GetScreenSize ()); Buffer image buffard image = robot.createcreenscapture (capture size); // ... int color = image.getRGB (x, y); Int red = (Color & amp; 0x00ff0000) & gt; & Gt; 16; Int green = (Color & amp; 0x0000ff00) & gt; & Gt; 8; Int Blue = Color & amp; 0x000000ff; // ...

html - How do I create a class in Javascript? -

This is what I have so far received, and it is not working at all: (all variables are my player class I mean a programming class, not a CSS class, not IE (.movingdiv {color: # ff0000;}) < Code> & gt; DOCTYPE Html> gt; html lang = "en" & gt; & gt; head & gt; & lt; title & gt; class test & lt; / title & gt; meta charset = "Utf-8" /> Body {text-align: center; Background color: #ffffff;} # box {condition: flood Left: 610px; top: 80px; height: 50px; width: 50px; background color: #ff0000; color: # 000000;}

Plotting a cumulative graph of python datetimes -

Say I have a list of datetimes, and we know that the timing of each time to be a record time of an event. Is it possible to graph the frequency of this occurring event in time, it is possible in matplotlib, to show this data in a cumulative graph (so that each point equals all the points that were before it or More than that), the list without pre-processing it? ("Date": 1998, "Month": 12, "Date": 15, "Events": 92} and then Generate a graph from this list? This should work for you: counts = arange ( 0, lane (list_of_dates)) plot (list_of_dates, counts) You definitely want to graph any general option of plot calls the way you want You can send it to see it. (I would suggest that matplotlib is very efficient in dealing with the date and time.) There will be another option - one of the options is 'Cumulative = True' which can be useful if you can create a cumulative histogram Which shows the number of events occurrin

javascript - jQuery code works in Firebug, but not on its own -

I still have a problem with the brain "I" with "feedback" I am trying to change. I have a simple script that should do it, though it does not work. The link does not change, however, firebug does not show any error and when I run the code in the Firebug console, it works as I want. Why is it not at work? Someone has a solution, I am on the edge of my mind with this. (function ($) {$ (document) .ready (function () {$ ("a [href $ (= 'response']"). Each (function () {$ (This) .attr ("href", $ (this) .attr ('href'). ("Feedback", "comments"));});});}) (JQuery.noConflict ()); Thank you very much, I know it may be a pain to test but I'm really grateful. You are using $ (document) instead of $ (.doc) .load () .ready () . (function ($) {// --------------- v $ (document) .load (function () {$ ("a [href $ = (" response ")"). (Work () {$ (this) .attr ("href", $ (this) .at

android - A Tab Exception Message -

06-14 00: 21: 30.398: त्रुटि / एंड्रॉइड रेंटाइम (332): द्वारा कारण: java.lang.RuntimeException: आपका सामग्री में एक टैबहोस्ट होना चाहिए जिसका आईडी विशेषता 'android.r.id.tabhost' है इसका क्या अर्थ है? मैंने पहले ही टैबॉस्ट के लिए आईडी दी है। और मैं आर.जावा में आईडी देख सकता हूं। यहां .xml है: & lt; TabHost xmlns: एंड्रॉइड = "Http://schemas.android.com/apk/res/android" android: id = "@ + id / tabhost" एंड्रॉइड: layout_width = "fill_parent" एंड्रॉइड: layout_height = "fill_parent" & gt; & Lt; LinearLayout एंड्रॉइड: अभिविन्यास = "लंबवत" एंड्रॉइड: layout_width = "fill_parent" एंड्रॉइड: layout_height = "fill_parent" एंड्रॉइड: padding = "5dp" & gt; & Lt; TabWidget android: id = "@ + आईडी / टैब्स" एंड्रॉइड: layout_width = "fill_parent" एंड्रॉइड: layout_height = "wrap_content" / & gt; & Lt; FrameLayout एंड्रॉइड: id = "@ + id / tabconten

numpy - unevenly centered subplots in matplotlib in Python? -

I have a simple couple's weekly in matplotlib which is unevenly centered for some reason. Let me tell them this way: plt.figure () # first subplot s1 = plt.subplot (2, 1, 1) plt.bar ([1, 2, 3], [ 4], 5, 6]) # seconds subplot s2 = plt.subplot (2, 1, 2) plt.pcolor (rand (5,5)) # add color bar plt.colorbar () # square axes axes_square (s1) Axes_square (s2) where axes_square is just: def axes_square (plot_handle): plot_handle.axes.set_aspect (1 / plot_handle.axes.get_data_ratio ( )) The attachment I get is enclosed. Top and bottom plots are uneven centered. I want their yaxis to be aligned and their boxes should be combine. If I remove the plt.colorbar () call, the plots become centered. How can i be plots centered while the colorbar of pcolor is still shown? I want the axes to be centered and the colors are out of that alignment, either on the left or on the right side of the pcolor matrix. > Thanks. OK, this is probably not what you want, but it will wo

Signal/Slot mechanism for Perl -

I'm wondering if QT's signal / slot mechanism is equal to Pearl. I have seen in POE, but since it is huge, I could not find anything useful. Thank you in advance, Maybe you are looking for something, As for most ADRI registration and emissions events, but I think you can use it somewhere else. It has a system that is similar to QT, especially combined, which lets you automatically map event slots. AnyEvent, a signal for Pearl Object methods or functions, is a common event loop that supports GTK / GLB and POE among other people, and is very easy compared to the large set modes of POE.

backup and restore mysql from php code -

I use php on windows , how do I backup mysql to a compressed file Can I reset it using the PHP code thanks? Export PhpMyAdmin to DB as a ZIP file.

read XML tag id from php -

मेरे पास निम्न XML फ़ाइल है & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "ISO-8859-1" & gt; & lt; संदेश आईडी = "भाषा" & gt; जर्मन & lt; / message & gt; & Lt; संदेश आईडी = "लैंगअंग्रेज़ी" & gt; जर्मन & lt; / संदेश & gt; & Lt; संदेश आईडी = "TopMakeHomepage" & gt; Mache 4W परामर्श वेब साइट प्रबंधक Starseite! & Lt; / संदेश & gt; & Lt; संदेश Id = "TopLinkEmpSec" & gt; 4W मिटरबीटर & lt; / संदेश & gt; & Lt; संदेश आईडी = "टॉपलिंक फीडबैक" & gt; फ़ीडबैक & lt; / संदेश & gt; & Lt; संदेश Id = "TopLinkSiteMap" & gt; साइट मानचित्र & lt; / संदेश & gt; & Lt; संदेश Id = "TopLinkContactUs" & gt; संपर्क करें & lt; / संदेश & gt; & Lt; संदेश Id = "TopSetLangEn" & gt; आईएनएस Englsche & lt; / संदेश & gt; & Lt; संदेश आईडी = "टॉपसेटलाइन" & gt; इन ड्यूश &a

c++ - Coordinate confusion -

I subclassed QGraphicsItem and rearranged paint. In the paint I wrote some label like this: painter-> Draw text ("Test", 10,40); After some time I think it can be useful to handle labeling with different items. That's why I wrote something like that. QGraphicsTextItem * label = new QGraphicsTextItem ("test", this); SetPos (10,40); But two "Tests" do not appear in the same place on the drawing screen. I think the difference can be related to the item coordinates - the visual coordinates I tried all the maps ... and the map ... the combination inside the QGraphics itam interface but there is no progress. I want a picture to come to the same place on the screen. What do I miss? I think you are using the same font size and type in both cases. If the difference in position is very small, then the reason may be that QGraphicTextItem is using some padding for the text in it. I try to use QGraphicsSimpleTextItem which is not going to i

parsing - Using Lucene Highlighter along with MultiFieldQueryParser -

I am using Lucene Highlighter to highlight those matches that I have found in the Lucene Index. Now, my problem is that if I have to search for several areas of a document, and I need to display matching text, how can I get to that area in which the hit happened? The code that I am using for Highlighter is basically another function If I do not know which field has hit, then what fields do I have above Pass the given function to get matching pieces? div>

java - Android - drawing path as overlay on MapView -

I have a class that extends overlays and overlap overlays. Acceptable I have overridden my Attention method: @ Override public zero draw (Canvas Canvas, Map Viv MV, Boolean Shadow) {projection projection = MV. F. Proogation (); ArrayList & LT; GeoPoint & gt; Geo Point = New Arrestist & lt; GeoPoint & gt; (); // Creating geopoints - ommited path for readability p = new path (); (Int i = 0; i & lt; geopoint.size (); i ++) {if (i == geoPoints.size () - 1) {break; } Point = new point (); = Point to new point (); launch. Toxic (geoPoints.get (i)); launch. Pixel (from geoPoints.get (i + 1)); P.moveTo (from.x, from.y); P.lineTo (to.x, to.y); } Paint mPaint = new paint (); MPaint.setStyle (Style.FILL); MPaint.setColor (0xFFFF0000); MPaint.setAntiAlias ​​(right); Canvas leftpath (P, M. Pint); Super.draw (canvas, mv, shadow); } As you can see, I make a list of points on the map and I want them to make a polygon shape. Now, the problem is that when I set the pain

asp.net mvc 2 - Silverlight 4, Google Chrome, and HttpWebRequest problem -

My Silverlight 4 application, hosted in ASP.Net MVC 2, is OK when used via Internet Explorer 8 Both development server and remote web server (IIS 6.0) however, when I try to browse through Google Chrome (version 5.0.375.70) it throws a "Remote server not returned" error, the problem code below Is: public class MyWebCl Ient {Private HttpWebRequest _request; Private Uri _uri; Personal Assign Operation _asyncOp; Public MyWebClient (Uri Uri) {_uri = uri; } Public Zero Start (Excite Data) {_asyncOp = Async Operation Manager. Cret operation (empty); _data = data; _request = (HttpWebRequest) WebRequest.Create (_uri); _request.method = "POST"; _request.BeginGetRequestStream (new AsyncCallback (BeginRequest), blank); } Private Zero BeginRequest (IAsyncResult result) {stream stream = _request.EndGetRequestStream (results); (Author of StreamWriter author = new streamer (stream)). Write (excel) _data) .ostring ()); } Stream. Stop it (); _request.BeginGetResponse (new Asy

core data - Why doesn't the undo/redo panel appear when I start a shake gesture in iPhone Simulator? -

I have created an NSUndoManager for the managed data object of core data, like this: NSUNDO MANAGER * ONDO MANAGER = [[NSUNDO MANAGER ALLOCK] INIT]; [Undo manager setvelloundou: 10]; [ManagedObjectContextSetendo Manager: Undo Manager]; [Ando manager release]; In the App Representative where the default launching method has been called, I did this: application.applicationSupportsShakeToEdit = YES; When I'm making a shake gesture in the iPhone simulator (from the menu), I'm never getting the panel back / again. Do I have to undo / re-enable the information in the application file elsewhere? As Lucia said, you have asked this question back before March.

python - Django admin, filter objects by ManyToMany reference -

The simple photo gallery, photos, and gallery objects for the photogood app, the demo is implemented. There are several fields in the gallery object, which references the photo objects. I should be able to get the list of all the photos for the given gallery. Is it possible to add the gallery filter to the admin's admin page? If this is possible, how to do it best? You must type a custom filter speaker! This will look like this: , F, request, params, model, model_admin): self Lookup_quoragg = f.name self._lookup_model = f.rel.to self.lookup_val = request.GET.get (self.lookup_kwarg, none) for self.user = request.user self.lookup_choices = G for gallery [( GPK, G. Names). Object.All ()] DEF Headout Out (Self): Return Lane (Self-Lookup_coreis) & gt; 1 DR title (self): Returns self_ lookup_model._meta.verbose_name FilterSpec.filter_specs.insert (0, (Lambda F: F.L.L.to == Gallery, GalleryFilterSpeak)) Place this in a module in your app package in filters.py and i

Safe ASCII char to replace whitespace before storing -

My code passes a large bunch of text data on a legacy lib, which is responsible for storing it. However, it works to remove white space on the rear. This is a problem when I read the data back. Since I can not change legacy code, so I thought about changing all the places with some unusual ASCII characters. When I read the lesson, I can turn them back. Is this a bad idea, considering that I can not touch the heritage storage code? Use as an option? I was thinking of some four above 180. There will be empty spaces - no tabs or new lines in the data. The data is alphanumeric, with special characters. If you need protection, then the previous location (embedded) is the space is fine), then ' $ 'Or at the end of every lesson about what kind of insert. Then you can remove it while reading it back. You may have a problem if the legacy system already has data in it, but you can read any existing data to find a letter (or string) that can be used by any existing da

c# - Resizing Grid Views On Window Resize -

I'm creating a small windows form application that has several grid views. I want all grid views to resize from window I can create a function that detects the size of the window and then changes the size of each grid view, but it seems that a little clunky is an easy / more intelligent way to do this? property dock , anchor , Padding and margins are your friends here. They are designed to waste almost all the recycling-by-hands.

javascript - jQuery UI Autocomplete IE Cursor Position Bug -

मैंने अभी उत्कृष्ट jQuery UI स्वत: पूर्ण कार्यान्वित किया है। IE 8 में एक अजीब बग (और शायद अन्य संस्करण)। जब आप आईई 8 में सुझावों के बॉक्स से एक आइटम का चयन करते हैं तो कर्सर उस शब्द के ठीक पहले पाठ बॉक्स की शुरुआत करने के लिए जाता है जो अभी तक डाला गया है। फ़ायरफ़ॉक्स ने डाला शब्द के बाद कर्सर डाल दिया पाठ "itemprop =" text "> निम्न कोड को चयनित ईवेंट में जोड़ने का प्रयास करें जो कि autocomplte फ़ंक्शन को पास किया गया है। इसलिए यदि आपके पास: JQuery ('कुछ')। स्वतः पूर्ण ({source: availableTags}); इसे परिवर्तित करें: jQuery ('some_val')। स्वत: पूर्ण ({source: availableTags, select: function (event, ui) {if (Document.selection) {this.focus (); var oSel = document.selection.createRange (); oSel.moveStart ('character', this.value.length); oSel.moveEnd ('चरित्र', 0); ओसेल .select ();}}}) और देखें:

flex - Adding Transparency/alpha to Embedded Font -

I have embedded the font type in my application. It works fine within the text area. Now I want to add 60% transparency to it. Will be. In fact, I need many transparency levels ? How do I advise to do this?

python - regular expression -

I need to find all the inventions of some logging macros in the code. I have a macro invoice form: < Pre DEBUG [1-5] ("method name: log message", logic) But the new version of macros are automatically named before, So my job is to write a Python script which will remove duplicate function names already specified by the programmer. I am using the subfunction again to change the module I mentioned. Below are the hints: || DEBUG [1-5] ("Law Name: Login Message", Logic) with the debug [1- 5] (" The problem is the following: I think that to find the sense, I use the following regular expression: ((DEBUG | INFO | all other macros Name) [1-5] *) \ s * \ (\ "\ w +: but it matches the whole expression (from debuges to the colon), but only macros Name, which is for DEBUG5 example. Is my expression wrong? Is there some disagreement in Python's reggae processing? (Perhaps the fact is that I use DEBUG [1-5] as a subgroup to do somethi

.net - Data Access example using Entity Framework -

Does anyone know how to use the unit framework version 2 in the data access layer, or is there any good example Is the interface on the interface instead of using the interface instead of knowing about EF? I have found some examples but they are all from 2009 and I am not sure how they relate to the unit framework version 2. / Em>

.net - how can I restrict access to all files in a folder without web.config -

I need limited access to my administrator folder for some people who do not have an authentication ticket, Permitted page "should be redirected to How do I identify all the pages in my Admin folder? I have yet, but it's okay? If url.Contains ("/ admin") then 'If the authentication ticket is incorrect then ` reaction. Redirect ("~ / notallowed_admin.aspx") ` end if And no, for this particular problem, I would like to have my web Can not use config Thank you very much You should put security checks in global.assax In addition to this, you will be wise to avoid mismatch, with a more accurate match by Rijks to change the location. Protected Override Zero Application_BeginRequest (Object Sender, EventArgs e) {if (Regex.IsMatch (Request.Url.ToString (), @ ". * / System \ .aspx / admin. * \ .aspx ", RegexOptions.IgnoreCase)) {Response.Redirect (" ~ / AdminSecurityCheck.aspx "); Return; } .......}

c# - Passing additional data value to strongly typed partial views in ASP.NET MVC -

I have the OrderForm domain class, which contains sub-categories of assets, such as some: < / P> Interface IOrderForm {int OrderId {get; } ICustomerDetails CustomerDetails {Receives; Set; } IDeliveryDetails DeliveryDetails {Received; Set; } IPADS Details Payment Details {Receive; Set; } IOrderDetails Order Details {Received; Set; }} My "description" view is strongly received from iOrderForm . I have a vigorous type partial to present each section: This work is fine till this point, but I am trying to add some good AJAX bits to update some parts of the order form, and I realize It is happened that every part of my thoughts also needs access to IOrderForm.OrderId . Is the easiest way to access this value partly? You this.ViewContext.RouteData.GetRequiredString ["OrderId "] Or you can get value from your root by adding it to your viewData TempData is also a very easy way ...

.net - XML Document straight to Stored Proc Mapping in NHibernate -

I am creating a mechanism for taking XML data from a queue and saving data directly from the XML document Calling stored procs seems like something that could address NHibernate for the database, but most of the information that I discuss about going from database to database rather than object data (XML, in this case). Is there a way to use NHibernate in this method or am I barking the wrong tree? Thank you. I think NH is not the right tool for this, its purpose is to map classes in a relational database. As long as you do not distribute XML to the object model and mapping the NH to the database, you can not take much advantage from it.

java - Static method,new thread performance question -

I have only two questions about the two methods used in many controllers / servlets in my app: 1 What is the difference between calling a steady method in a useful class or non-static method (such as how to deal with dates or for the current time, changing between timezones), which is better? 2-What is the difference between calling a method (there are many arguments like sending an email) in the controller or running this method in a different thread? 1) The classes are generally not used to have any state with them. In fact, there is nothing wrong in creating "example" in them. Although the compiler will never complain, the UL class interfication will be a misleading coding. Stateless Utilis class is completely Are safe, class methods, whether stabilized or not, on every thread stack frame. Get the copy and do not interfere with each other. Java Utilities classes are excellent examples of this. 2) If your method takes a time , It means to make asynchro

cruisecontrol.net - CC.NET Dashboard Error: Could not load type 'System.Security.Authentication.ExtendedProtection.ChannelBinding' -

Late last week I upgraded to CC.NET and build servers locally. The build server is still fine, but locally I am getting the following error: Exception Description: Exortech.NetReflector.NetReflectorTypeLoadException: Unable to load type from assembly system .ServiceModel, version = 3.0. 0.0, Culture = Neutral, Public Key Token = B77A5C 561934E 9 9: Failed to load 1 out of 3612 types defined in assembly. Exception: - Unable to load type: System.Security.Authentication.ExtendedProtection.ChannelBinding Exception: System.TypeLoadException: Type 'System.Security.Authentication.ExtendedProtection.ChannelBinding' assembly 'system, version = 2.0.0.0, not loaded by culture Could be done = neutral, public key token = b77a5c561934e089 ' I'm afraid it starts in the morning after a batch of windows. I had two more updates that were 9 9 7 9 9 and 982168 (I had an update that would not run in the last month). Anyone else have a problem? Thanks! EDIT: I can connect via

active directory - How to delete unused users after TFS2010 Migration-Upgrade from TFS2008 -

I have a situation where our TFS2008 server has a new domain after the migration is renewed, I have a lot of conflicts Users from the old domain have not created anything inside the 2008 server, nor need access yet. Do anyone know how to completely delete these old domain users since the TFS 2010 migration? Thanks, John To be more specific about "delete" They may be required if they are in the [server] \ Team Foundation Valid user group, then remove them from the group, and they will no longer be able to connect.

python - rename keys in a dictionary -

I want to change the names of keys in a dictionary which are ints, and I need them so that the inputs with key zero They can sort correctly. For example, my keys are like this: '1', '101', '11' and I may need them: '001', '101', '011' What is doing, but I know that there is a better way tmpDict = {} in the ADC for the old: t MpDict ['% 04d'% int (olden)] = addict [oldkey] New controlled = tmpDict You are going wrong about this if you want to draw entries on a line in a specific way, then you have to sort on the extraction. for sorted (D, key = int): print '% s:% R'% (k, d [k]) < / Div>

Compact Framework Remote Performance Monitor Error connecting to a device -

I'm trying to make a memory profile on the .Net CF app. Originally it was compiled in 2.0, but I changed it to 3.5 so that I could use 3.5 CF power tools Remote peg mon. I'm getting the following error message when trying to connect: ActiveSync Device: Transport Incompatible. I am connecting via DMA through ActiveSync, am I doing something differently? RPM does not work with emulator before CP 3.5 SP1, so if you target the emulator Make sure (you think) make sure that you have the latest version of RPM and manually deployed RPM bits in the amplifier.

jQuery Autocomplete plugin not working with jQuery 1.4.1 -

I am using the JQuery AutoComplete plugin with JQuery version 1.3.2, and it's working great I recently updated JQuery to my project in version 1.4.2, and the autocomplete plugin is now broken. JQuery code is not available at all to add items to a text box on my web page. Is the jQuery AutoComplete plugin incompatible with JQuery version 1.4.2, and if there is a fix for this problem, does anyone know? Here is some sample code that I created in the ASP.NET web site (which is okay, if I change jquery-1.3.2.js to the JQuery file, but nothing would be using jquery-1.4.2.js ): & lt;% @ Page Language = "C #" AutoEventWireup = "true" codeFile = "Default.aspx.cs" Inheritance = "_default"%> & Lt ;; DOCTYPE HTML PUBLIC "- // W3C // DTT XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Head ru

gtk - How do I send a client-event asynchronously to a GtkWidget? -

I am trying to send and receive client-events using GtkWidget on Win32 platform. The sender code looks like this: GtkWidget * Wnd; GdkNativeWindow Hnd = #ifdef WIN32GDK_WINDOW_HWND (wnd- & gt; Window); # Ilse GDK_WINDOW_XWINDOW (Wnd-> Window); #endif GdkEvent * Event = gdk_event_new (GDK_CLIENT_EVENT); // fill the event parameter gdk_event_send_client_message (Event, HD); Obtaining the code looks like this: Fixed Gabolian MyClientEvent (GtkWidget * widget, GdkEventClient * ev, MyWnd * Wnd) {// breakpoint here .. return TRUE; } GtkWidget * Wnd = gtk_window_new (GTK_WINDOW_TOPLEVEL); G_signal_connect (G_OBJECT (Wnd), "Client-Event", GCl Blind (MyClientEvent), this); Gtk_widget_add_events (Wnd, GDK_ALL_EVENTS_MASK); I am sending a message using Detective ++, so I know that the sender party is fine. The receiving party however does not get client-event. I was hoping to trigger my breakpoint in the callback ... but it's not. I also do not believe that

java - Introduction book for JBoss Application Server -

I have joined a programming competition for which the participant needs to use the JBoss application server platform. Do you have any suggestions for using books or articles? is the starting place

python - APT command line interface-like yes/no input? -

The APT ( advanced package device ) command line interface is any short path to achieving Python In? I mean, when the package manager indicates a yes / no question after which [yes / no] , accepts the script YES / Y / yes / Y or enter (as indicated by the original letter as yes ). Only the official documents come in I input and raw_input ... I know it is not difficult to simulate But, writing again is painful: | As you have said, the easiest way is to use raw_input () To do. There is no underlying way to do this. From: import sys def query_yes_no (question, default = "yes"): "" "via raw_input () ask a question / yes and answer back." The question "is a string that is presented to the user. If the user" hit "(default) by default," no "or none (which means the answer is needed for the user)" yes "return value" yes "True", "yes": true, "yes": true, "no&qu

objective c - How to detect if Safari is disabled on iPhone -

How do you know that the safari has been disabled from the parental controls on the iPhone? I know that this is possible because the app X3Watch has refused to work until Safari is disabled. As far as I can see, there is no API for parental control, so what techniques can be used for this? I have not tested this, but OS3.0 and later, you can find out That URL can be opened by any application on the system using the [[UIApplication sharedApplication] canOpenURL: myURL] . . I can bet that this will not return no if Safari is disabled.

Rails 3 equivalent of complex SQL query -

निम्न मॉडल को देखते हुए: वर्ग पकाने की विधि & lt; ActiveRecord :: बेस has_many: recipe_ingredients_which_many: सामग्री, के माध्यम से = & gt; : नुस्खा-सामग्री का अंत वर्ग पकाने की विधि संघटक & lt; ActiveRecord :: बेस is_to: recipe is_to: घटक अंत वर्ग संघटक & lt; ActiveRecord :: Base end मैं Rails 3 में Arel का उपयोग कर निम्न एसक्यूएल क्वेरी कैसे कर सकता हूं? चयन करें- व्यंजनों से जहां मौजूद नहीं है (SELECT * सामग्री से कहां में नाम ('चॉकलेट', 'क्रीम') और नहीं है (चयन करें * से नुस्खा-सामग्री कहां नुस्खाएं। Recipe_id = recipes.id और recipe_ingredients.ingredient_id = ingredients.id)) मुझे यकीन नहीं है कि Arel या ActiveRecord का उपयोग कर रिलेशनल डिवीज़ कैसे करें। यदि यह दो प्रश्नों को करने के लिए स्वीकार्य है, तो यह समतुल्य होगा: with_scope (शामिल है (व्यंजनों)) cream_recipes = Ingredient.where (: name = & gt; "cream")। .रेपिप्स चॉकलेट_रेसिप्स = संघटक.वहाँ (: नाम = & gt; "चॉकलेट")। पहले। पुनर्प्राप्ति के अंत

c# - serialport or USB port? -

I am using this code: Check it out For that what my port is connected to the USB phone is. It is believed that the USB will be a virtual com, but it seems wrong I figured out where my phone is and the output is just the garbage. Do not I have any way to talk to my USB port on C # so that I can talk to him with GSM phone? Virtual COM does not mean that it should respond to "ATI". The ATI modem command is not supported by every device. Code Usage

jQuery UI Themes -

So I've downloaded and linked a jQuery UI theme, but they do not like this on the site. Buttons are too big and there is such a text too. & lt; Link rel = "stylesheet" type = "text / css" href = "/ css / trontastic / jquery-ui-1.8.2 .custom.css" & gt; $ ('#delete'). Dialog ({Model: true, auto open: incorrect, title: "delete?", Button: {"yes": function () {$ (this) .dialog ('close'); $ ('Li #' + $ Id) .remove (); $ ('.nav'). SortUpdate ();}, "no": function () {$ (this) .dialog ('close');}}, dragable: false , Resizable: false}}; Am I missing something or what is the additional CSS that I have to encode? Thanksgiving The font size in jQuery themes is all relative sizes using all the scales. Start by setting the font-size in body tags, the theme will work with it Use of all jQuery demos: body {font-size: 62.5%; } As found in the jQuery demo CSS file: or t

version control - perforce connect history of two different files -

<<> When I did and everything was working I had removed the old (moved) files. Can I add file history with each other? Itemprop = "text"> Assume that your origin The file is // source / old / file.c # 5 and you can change this to // source / new / file.c , then modify the old file // Source / old / file.c # 6 . You need to integrate the old file with the old file using the -i flag, so Perforce will allow you to integrate between two files, which it does not know about any integration history : Integrate p4 -i //source/old/file.c#5 //source/new/file.c then files Resolve Normally during integrating, you want to accept a merged version of the file, but in this case you want to accept So interested, Perforce knows that you have already integrated, so that you can use "code" -ay to "accept yours", cancel the earlier version of the file: p4 resolution ------ //source/new/file.c then submit the revision. (Ideall

php - Difference between two commands of fetching Shopping Cart Items in Magento -

If you need to get / receive item descriptions of shopping cart, you can do it in any of two Methods that will provide you all the items in a array: - $ cartItems1 = $ cart-> GetQuote () - & gt; All items found (); $ cartItems2 = $ cart-> GetItems () - & gt; GetData (); $ Cart = new Mage_Checkout_Model_Cart (); $ Cart- & gt; Init (); Can anyone describe in detail what the two options provide? In any more option, available in Magento, can anyone expose it? If you look at the code of the cart and the coat class, everything will be clear. Code for $ Cart-> getItems () here: public function getItems () {return $ this-> getQuote () - & gt; GetAllVisibleItems (); } Simple and simple - this is just a method of quote item, so the question is now: getAllVisibleItems () and getAllItems ( ) ? What's the difference between ? Code for both methods: public function getAllItems () {$ items = array (); Forex Curren

functional programming - tail recursion vs. forward recursion -

Can someone give me a distinction between these two types of recycling and examples (especially OCaml)? A tail recursive function is a function where only the recursive call in the function is final. A non-tail recurring function is a function where there is no such case. A backward recurrence is a recursive, where the value of the parameter in each recurring call is less than the previous step. A next recurrence is a recursive, where it grows with each stage. These are two orthogonal concepts, that is, whether a next recurrence can be tail-recursive, it applies to backward recurrence. For example, factual work in important languages ​​is often written like this: from FC = 1 to 1 n: FAC: FAC = I The usual recurring version of the genre (i.e., it calls itself as a parameter in the form of n-1 ), although if you directly mentioned above Translate the solution, then you will come with a recurring version which is counted upward Something like this looks: let's F =

WAMP Not working Correctly -

Using WAMP for the first time, because I really have to do something, basically, when I go, say Firefox That it is unable to connect. And, even if it works, where do I put the file to display my website? Are you certain that all services are running properly? The bottom right should be white, if not click on it and then click on "Start all services" You can set your files in the www folder in the wamp directory (usually the C : / Program Files / wamp / www /) Ikke means that the question should be

java - Service for sending SMS and making Voice Calls from Web site and Desktop application -

We are planning to send SMS and call our desktop and web applications. Both are written in Java To send only the SMS, we know that there is a fantastic gateway from it. But ideally, we want to use a service similar to that, but Vox supports calls and SMS. Which service / gateway can you recommend? Dependable work At least Europe operators should be supported (if not,) Providing an external API SMS Send and make voice calls If there is, then for SMS and reusable components (for voice calls) that can be integrated with desktop and web Java-based applications < / Li> There is no service to support SMS and voice calls; Will attempt to integrate different services. Therefore, if you know the trustworthy services, please write about them, to send an SMS or make a voice call. Thanks for your reply. I also

javascript - How to make jQuery slidetoggle effect for multiple div on same page? -

यह एक के लिए ठीक काम करता है div (function ( $) {$ (दस्तावेज़) .ready (function () {$ ('# div1')। छुपाएं (); $ ('a.plus')। क्लिक करें (फ़ंक्शन () {$ ('# div1')। SlideToggle (); $ (यह) .toggleClass ("minus_icon"); वापसी झूठी;})}}}}}} (); एक ही पृष्ठ पर एकाधिक div के लिए इस स्लाइड सेगल प्रभाव कैसे बनाएं? # div1 , # div2 , div # 3 की तरह छुपाने के लिए मेरे पास एक से अधिक div s है। < / P> संपादित करें: यह html में स्थित है & lt; a class = "plus" & gt; अधिक विवरण & lt; / a & gt; & Lt; div id = "div1" class = "description" & gt; & Lt; p & gt; छिपी हुई सामग्री यहां & lt; / p & gt; & Lt; / div & gt; & Lt; एक वर्ग = "प्लस" & gt; अधिक विवरण & lt; / a & gt; & Lt; div id = "div2" class = "description" & gt; & Lt; p & gt; छिपी हुई सामग्री यहां & lt; / p & gt; & Lt; / div & gt; &am

c# - Store the cache data locally -

I develop a C # Winform application, it is a customer and connects to the web service to receive data. The data returned by Webservice is a datatile, the client will display it on a datagrid view. My problem is that: The client will take more time to get all the data from the server (web service is not local with the client) so I have to use a thread to get the data . This is my model: Create a thread to get client data -> complete the thread and send the event to the client -> Customer performance data on the datagrid view on the form However, when the user closes the form, the user can open this form at some other time, and the customer will have to get the data again. This solution will give the customer gradually reasons. So, I think about a cached data: The client & lt; --- get / add / edit / delete ---> cached data --- get / add / edit / delete ---> server (web service) please give me some Recommend example: Cached data should be developed in anoth

c++ - Segmentation fault on writing char to char* address -

I have a problem with my small program that you can help me. char * shiftuj vzorku (char * text, char * pattern, int offset) {char * pom = text; Int size = 0; Int index = 0; While (* (text + size)! = '\ 0') {size ++; } (* (Palm + index)! = '\ 0') {if (overrun (pod + index, pattern)) {while (* pattern! = '\ 0') {// vyment * pom s * pom + Offset if (palm + index + offset & lt; text + size) {char x = * (palm + index + offset); Char y = * (palm + index); Int adresa = * (palm + index + offset); * (Palm + index + offset) = y; // signature fault * (palm + index) = x; // * palm = * palm - * (palm + offset); // * (palm + offset) = * (palm + offset) + palm; // * palm = * (palm + offset) - * palm; } And {* palm = * palm - * (palm + offset - size); * (Palm + offset - size) = * (palm + offset - size) + palm; * Palm = * (pom + offset - size) - * palm; } Pattern ++; } break; } Index ++; } Return text; } Not important What the program is doing is proba

MySQL & PHP while code is out of memory, when there is only one row -

Why this code is throwing out of memory error, when there are only 1 row in the database .. < Pre> $ request_db = mysql_query ("Select SELECT * requests where = '0'") or die (mysql_error ()); $ Request = mysql_fetch_array ($ request_db); Echo "& lt; table border = \" 1 \ "align = \" center \ "& gt;"; While ($ request ['triggered'] == "0") {resonates "<"> ; Echo $ request ['SongName']; Echo "& lt; / td> & lt; td & gt;"; Echo "& lt; tr & gt; & lt; td & gt;"; Echo $ request ['artist']; Echo "& lt; / td> & lt; td & gt;"; Echo "& lt; tr & gt; & lt; td & gt;"; Resonance $ request ['dedicated']; Echo "& lt; / td> & lt; td & gt;"; } Resonates "& lt; / table & gt;"; Thanks. Hm, to be honest, I do not have to type in whi

javascript - Getting all the style properties using JQuery. Basically I want an equivalent of getComputedStyle() and I dont want to handle cross-browser stuff -

मैं वर्तमान शैली / कम्प्यूट स्टाइल ऑब्जेक्ट प्राप्त करना चाहूंगा और मैन्युअल रूप से ब्राउज़र के प्रकार की जांच नहीं करना चाहता। (मैं क्रॉस-ब्राउज़र हैंडलिंग से छुटकारा पा रहा था, इसलिए मैं जेक्यूरी में आया हूं)। दरअसल, मैं स्टाइल ऑब्जेक्ट को सभी स्टाइल-प्रॉपर्टी लौटाता हूं: वैल्यू मैप कृपया मदद करें। ठीक है, एक समान समस्या के लिए एक आत्मा है: < P> उन्होंने फायरबग से विशेषताओं की एक सूची का इस्तेमाल किया और एक ऑब्जेक्ट से एक दूसरे को शैलियाँ क्लोन करने में सक्षम होने के लिए jQuery के साथ एक गणना शैली वस्तु बनाई: jQuery.fn.css2 = jQuery.fn सीएसएस; JQuery.fn.css = फ़ंक्शन () {if (arguments.length) return jQuery.fn.css2.apply (यह, तर्क); Var attr = ['font-family', 'font-size', 'font-weight', 'font-style', 'color', 'text-transform', 'text-decoration', 'letter-spacing' 'शब्द-रिक्ति', 'रेखा-ऊंचाई', 'पाठ-संरेखण', 'लंबवत-संरेखित करें', 'दिशा', 'पृष्ठभूमि-रंग', '

mercurial - create hgrc file to work on all paths on a machine, and for several repos -

I want to create an hgrc file to set the username and password for all the paths on some machines, e.g. The directory does not matter if I am inside, hg clone some_path will always work without any prompt for the username and password (this is for an auto-deployment script). In addition, many repos should work for, not just one. I followed the instructions and made a file: /etc/mercurial/hgrc.d/deploy.rc this content is: [auth] default.prefix = http: // myrepo default.username = myuname default.password = pwd But when I hg clone some_path < / Code> I'm abort: error: refused connection . What am I doing wrong? This should work. You can use the hg showconfig to verify that it is actually reading config and that you do not have a connection problem or anything else. How are you using HG? In addition, it may be that your .hg / hgrc file is preceded by your global config.

javascript - How to set up flag in wizard form to allow submit/override other function -

Hello, I have a long form that is divided into wizards. I have the following from preventing the user from hitting the browser back button and losing data: window.onbeforeunload = function () {return "returning back will lose all form data."; }; How do I insert a flag and apply it to the last step so that the form can be deposited properly? Thanks, You can set a variable on the last step and test against it, Like: var okToSubmit = false; Window.onbeforeunload = function () {If (! OkToSubmit) "Hit back you must lose all form data."; }; // set okToSubmit = true; In the last step without my current code, I can not say where it is to insert, but where your script runs in the last step, a okToSubmit = true ; / Code> there.

sql order by - Get result from mysql orderd by IN clause -

मेरे पास निम्न क्वेरी है SELECT * इनवॉइस WHERE इनवॉइस_आईडी इन (13, 15 , 9, 27) मेरा परिणाम है: चालान_आईडी | इनवॉइस_एनम्बर | ... ------------------------------------ 9 | 201006003 | 13 | 201006020 | 15 | 201006022 | 27 | 201006035 | जो परिणाम सेट है, मैं चाहता हूं कि इसके अलावा इनवॉइस_आईड (जो कि एक ऑटोमुक्रिमेंट मान है) द्वारा आदेश दिया गया है। अब मैं परिणाम मेरी क्वेरी में निर्दिष्ट क्रम में चाहता हूँ (13, 15, ...)। क्या उसको प्राप्त करने का कोई तरीका है? पृष्ठभूमि यह है कि मेरे पास एक DataTable को एक डाटाग्रीड दृश्य के लिए बाध्य किया गया है। उपयोगकर्ता परिणाम को फ़िल्टर कर सकता है और सॉर्ट कर सकता है लेकिन यदि वह परिणाम को प्रिंट करना चाहता है तो मैं डाटाटीबल को प्रिंट करने के लिए उपयोग नहीं कर रहा हूं क्योंकि यह केवल सबसे महत्वपूर्ण स्तंभों में है और इसके बजाय मैं डेटाबेस से पूरे रिकॉर्ड खींचता हूं और इसे मेरे मुद्रण नियंत्रण में पास कर देता हूं । मैंने भी मौजूदा डेटाटाले को लापता परिणामों के साथ बढ़ाने का प्रयास किया है लेकिन ऐसा लगता है कि IN (...) क्वेरी की

javascript - Binded click loses context of my Class. JS -

I have a problem that I understand, but there is no way, how will it be known. I have a simplified class: function drawing tab (canvas_id) {this.canvas_id = canvas_id; Bind_events () function bind_events () (click) (function (e) {var canvas = get_canvas () // works do_something_in_the_instance_who_called_click ()} function get_canvas () {return document.getElementById (canvas_id)} function do_something_in_the_instance_who_called_click () {Warning (this.canvas_id) // fail!}} Because when it clicks (which is not it ) inside, example But I need to change any one of them .. Is there any way, which can be many examples? I do not really know how but get_canvas () work I'm using jQuery but probably not relevant to This happens because you are calling the function without any object reference , but you can store this value: function DrawingTable (canvas_id) {var instance = this; // & lt; - `` Store this `value this.canvas_id = canvas_id; Click Bind_events () f

multithreading - What happens with this thread after the method finishes? -

In my ASP.NET application, I call the following code at the bottom of the stack: < Code> All shared Larkas (VAL person as integer) DID thread as a new system. threading. Thread (new Paramatised ThreadStart (Address of AlarmTread thread)) thread. Start (Person Revenue) End Sub Private Shared Sub Larma_Thread (ByVal Individual Integer) StartaLarm (personId) Thread Sleep (1000 × 30) StoppaLarm (person id) end sub While this thread is in progress, the rest of the request is handled and a response is sent to the customer. However, ever since I do not thread anymore. Ebert () or anything like this, and I am very unpopulated with threading in ASP.Net, I worry that I'm opening memory leaks or other threading problems. After the Larma_Thread has ended, what happens to the thread starting with the code above? After executing the code of the thread, the thread will be closed and its resources will be retrieved .

objective c - Creating an application that can open files of a given format -

I have an app that has been written in Obj-C. Info.plist has a list of file types, which can open the app. I'm pretty sure that this is working because when I try to drag an unacceptable type of file, the app is not highlighted, but when I drag a file of an acceptable type, it highlights it and Leaves me / P> When I leave, the app starts, right, still, I get a dialog: The document "foo.tiff" could not be opened. DocView can not open the file in "TIFF file" format. I have this in my info.plist & lt; Key & gt; CF Band Type Extension & lt; / Key & gt; & Lt; Array & gt; & Lt; String & gt; TIF & lt; / String & gt; & Lt; String & gt; Tiff & lt; / String & gt; & Lt; / Array & gt; & Lt; Key & gt; CFBundleTypeIconFile & lt; / Key & gt; & Lt; String & gt; TIFFFile.icns & lt; / String & gt; & Lt; Key & gt; CFBundleTypeName & lt; / Key & gt; & L

data structures - Java datastructure to map multiple keys to the same value -

In Java, I am looking for a way to map multiple keys to the same value. Suppose I have a key of 0-9, and the values ​​of "x", "y" and "z" are as follows: 0-> y 1- & Gt; Y 2 -> y 3-> x 4-> x 5-> y 6-> gt; Z 7-> y 8- & gt; Z 9- & gt; Z Now X, Y, and Z are really long strings, and I have millions of keys, so I can not afford to store the string several times. How would you go about it? I had an idea that two arrays are formed: An artificial second is produced for the key for which the original key is mapped and another array is the key to the actual values. In this way the values ​​are stored only once and the original key can still be indirectly mapped on values: 0-> K1 1-> K1 2- & gt; K1 3- & gt; K2 4-> K2 5- & gt; K1-6-6; & Gt; Of 3-7-gt; K-8-> K3-9-> K3- k1-> Y k2-> X3- & gt; Z Question though: Is there a better data structure for this? any map and lieutenant

foreach - How to make a object (class) foreachable in D? -

How can I make the class eligible for a foreach statement? In the class, an associative array (eg string [string]), the above statement, uses this array as a source. So this is what I want: auto obj = new obj (); Foreach (key, value; obj) {...} Do I have to implement the interface for some time like this? Edit: Solution: Public Ent Operation (Int Rep (referee string, Ref type) DG) {int result = 0; Foreign currency (referee, ref price; data) {result = dg (key, value); If (results! = 0) {break; }} Return result; } This is done for the Public Ent Operate (Int Rep (DG)). : class Foo {uint array [2]; Int opeple (int representative (referee UIP) dg) {int result = 0; For (int i = 0; i & lt; array.label; i ++) {result = dg (array [i]); Break the (result); } Return results; }} : Structure and class objects can be done with a range of diagrams, which means [a set of properties] is defined Should:

reflection - What's the term (if any) for frameworks that support dynamic class creation? -

Sorry about the vocabulary question, but I am writing my master thesis and it is a pain to repeat "painkill", which supports the dynamic class. Build "There is a word for it again and again? Some explanations: I mean you can create a square on the runtime, that is, dynamically. For example, for example, the .NET System.Reflection supports it with namespace. thanks :) Thanks for all for suggestions, I do not take an answer yet I am going to, if there is a word for it and someone finds it, but if there is not then I am sure Thanksgiving. DCC Framework, invent invention .

java - Updating text on JFrame depending on ActionListener -

This is the result of ActionListener, it returns a price based on the combo box which she chooses, I just got a simple $ 39.99 Want as and nothing else I have packagedx = packagechoice.get select index (); All prices are in an array: string [] prices = {"49.99, 39.99, 34.99, 99.99"} Now I should know how to remove the price and display it and later be able to work with the data. But I do not know how to draw a piece of the array and set it in another variable. If you declare the array: string [] You can then use individual values: You can use individual values: String value = value [package index];

c++ - Why an auto_ptr can "seal" a container -

said that "an auto-IPT containing an STL container can be used to prevent further modification of the container. . " The following example was used: auto_ptr Push_back (8); / /> If I decrease the last line, then G ++ will report an error t05.cpp: 24: error : Const std :: vector & lt; Int, std :: allocation & lt; Int & gt; & Gt; 'Zero' std :: vector as & lt; _Tp, _Alloc & gt; : [_Tp = int, _Alloc = std :: allocator & lt; as the 'this' argument of push_back (const _Tp & amp; Int & gt;] with 'qualifier discards Why am I anxious after transferring ownership of this vector, can not it be modified now? Thanks a lot! indicator const vector < ContainedType & gt; The type close_vec indicator keeps. Because this type is const , you can not call it any method, which is also not defined as const (which means that it is internal The data do not change). Naturally, push_back is non-constant,

Problems when splitting Silverlight App into smaller components -

I have a Silverlight 3 app that has grown significantly over time. That's why I tried to break it in many Smulner applications, which would be dynamically loaded in my main application on demand. But I'm not sure about my VS I go into a strange problem with 2008. When I add a new Silverlight Application project to my solution and the copy of my old main application from my old core app is periodically (twice per day) in this new project, behind the XML files and files The code relaxes their association. When this happens and I try to build this project, the compiler complains that they can not find all CTC buttons such as buttons, labels, etc. in the code behind the files added in the class XAML-file. And the construction definitely fails. The only solution I have found so far is to add another Silverlight project and transfer all the content from the project it was previously added to. As long as the problem occurs, everything works well for a while but it is not really

user interface - How should nested components interact with model in a GUI application? -

Comprehensive design / architecture question If you have nested components in the GUI, to communicate with the data of those components What is the most common method? For example, suppose a component gets a click on a button to save the data. Should the request to save be handed over to the ancestors of that component, eventually the request for a controller is passed with the former ancestor? Or model / dataseters usually a single song in the GUI application, so that at any level can a component get a hierarchy directly / get the data? Or is there a controller injected as a dependency in the hierarchy of components, so that only one intermediary can be removed from any component datastore / model? My first idea is to define a singleton data-layer API, which is callable by GUI components is. P> If you want many examples of data, leave the 'handles', which can be stored by GUI components, and can get data by passing near the data layer Are there. This idea is

Formatting a CSV File that contains HTML for Import to Excel -

I import a CSV file from my application to import Excel (or any other spreadsheet that supports CSV files) Would like to export Either way, one of the cells present in my table contains rich content (i.e. HTML) which can, of course, include a comma as well as other HTML characters and formatting. I have realized that Excel can handle "HTML formatted text", but to export it as a CSV it has to screw the data, is there any special way that I can format that particular cell so that Are you importing properly? provided you double quote (or some other delimiter, but double quotes are the most common) in all your fields , Then the comma should not present a problem in field data. If your data is also included in double quotes, if double quote fields are present in the value, then they will run away by putting another double quote ahead of it. The Wikipedia page is readable on CSV files, because it explains problems, and solutions, very well:

Assigning a value to an integer in a C linked list -

itemprop = "text"> I have a question about linked lists. For example, I have the following strings and functions. struct node {int value; Structure node * next; }; Structure entry {structure node * first; Structure node * final; Integer length; }; Zero addnode (structure entry * entry) {struct node * nextnode = (struct node *) malloc (sizeof (struct node)); Int temporary; If (entry-> first == faucet) {printf ("Please enter an integer. \ N"); Scan ("% d", and temporary); Nextnode-> Value = temp; Nextnode-> Next = null; Entry-gt; First = next node; Entry-gt; Final = next node; Entry-> Length ++; } And (entry-> last-> next = next node; printf ("please enter integer. \ N"); Scanf ("% d", nextnode-> values); Nextnode-> ; Next = null; entry-gt; final = next node; entry-> length ++;}} If in the first part of the I statement, I have to input a floating variable And then assign the field to that string. The se

JavaScript Regex: Complicated input validation -

I am trying to create a valid part and / or serial number with rage in combination with the rags. A valid part number is a two alpha, three digit pattern or / [a-z] {2} \ d {3} / is I Aa123 or ZZ443 Etc. ... A valid serial number is five digit pattern, or / \ d {5} / 13245 or 31234 and prompt. That part is not a problem. I want to validate combinations and categories: 12345, ab123, ab234-ab245, 12346 - 12349 - Final goal In any combination, the and / or series of streams and / or serial numbers note that the spaces after the specifying the series or after the comma are optional Are there. Note that the part numbers are equal on both sides of a border border (i.e. ab 123 - ab 23 9) I have two days For now, this expression has been wrestling, and nothing has come better than this: ... My Reggae-Foo is weak . First of all, [edge] is incorrect. In addition to the letters, it will match a square bracket, backslash, carat, underscore or backtick -

php - Prevent XSS but allow all characters? -

How can I stop the XSS but allow any character to be used? As I write the HTML code to & lt; Html & gt; & Lt; Body & gt; & Lt; H1 & gt; Test & lt; / H1> & Lt; / Html & gt; I can post on a forum such as , but it will not be rendered as a browser HTML? How can I do this so that it does not change the characters in PHP? Pass a string through the function: // Out of HTML as HTML, the output resonates with HTCL's (' body ');

wcf - Request/Response pattern in SOA implementation -

In some Enterprise-like projects (.NET, WCF) I saw that all service contracts accept a single request Parameter and always Response : [DataContract] Public class CustomerRequest: RequestBase {[DataMember] Public long id {get; Set; }} [DataContract] Public Class Customer Response: ResponseBus {[Datamember] Public Customer Inphone Customer {Receive; Set; }} Where RequestBase / ResponseBase Both the service methods and proxy bodies are wrapped in trials / catches, common stuff like, Therefore the only way to check for errors is to look at ResponseBase.ErrorCode (which is computation). I want to know how this technique is called and why it is better to pass than what is necessary as the method standards and passing the standard WCF reference / using the fault mechanism? The pattern you are talking about is based on the first development on the contract It is not necessary that you use WCF Use the error block pattern in, you can still bring back the Faltexception to th

inline - Django admin: how to sum item amounts and place to top Model in total_amount after save? -

मॉडल.py वर्ग प्रमुख (models.Model): total_amount = models.DecimalField (Max_digits = 9, decimal_places = 2) वर्ग आइटम (models.Model): head = models.ForeignKey (हेड) item_amount = models.DecimalField (max_digits = 9, decimal_places = 2) Admin.py वर्ग आइटम इनलाइन (admin.TabularInline): मॉडल = आइटम वर्ग HeadAdmin (admin.ModelAdmin: inlines = [ItemsInline] admin.site.register (हेड, हेडएडमिन) प्रश्न हेडएडमिन की 3 वस्तुओं की इनलाइन भरने के बाद, क्लिक करने के बाद सिर में कुल आइटम की संख्या और स्थान की कुल राशि को कैसे जमा करें? < P> आप ऐसा क्यों करना चाहते हैं? एनोटेशन के तरीकों के जरिए इसकी ज़रूरत होने पर उस राशि की गणना करना बेहतर होगा: < पूर्व> से आयात करें django.db sum my_head = head.objects.get (pk = myid)। एनोॉटेट (मद_सूम = योग (आइटम__itemamount)) < / Html>

performance - Improve speed of a JOIN in MySQL -

I know a similar thread around there, but this is actually the first time I think that query speed affects me So it is not easy for me to actually transfer from other people's problems. Being said I'm successfully using the following queries with small data, but if I use it on what are the lighter tables (records about 120,000). I am waiting for hours select anothertable (id, someint1, someint1, somevarchar1, somevarchar1), DISTINCT md.id, md.someint1, md.someint1, md.somevarchar1, table1 From joining MD to pd.somevarchar1 join PD as the table 2 (md.id = pd.id); There are approximately 120,000 records in Tables 1 and 2. The question is currently running for about 2 hours. Is this normal? Do I just have to wait, I do not really know, but I am sure that since one is better than this it could be my first attempt. I have read about indexing, but so far do not know the index in my case? Thanks for any suggestions - I do not hesitate to direct beginners guides! p>

How to include custom files in Doxygen -

I would like to add custom (non-project) files to create some additional pages. I'm actually (in fact) unsure how to file this file and how their content should be formatted. Before I got the answer I was searching a lot, so I thought it was good to share Will happen! According to this article I finally found that: dox extension should block the C-style comment in its contents: < Pre> / *! \ Page My test page content ... more content * / Make sure that your custom files are placed in a directory that is included in the setting or in the current directory if the INPUT is empty Excluded, so these files can be found.

"Android Create" call fails in windows 7 - missing JDK -

I'm having a problem getting my Android Dev environment setup in Windows 7. I follow the instructions as well as many environmental sublinks. I am using Eclipse with the Android plugin. I have installed Java's JDK at many places in many places (JDK-6U-20-windows-i586.exe) - but I'm clearly forgetting something C: \ Users \ Andrew> Create Android ADD - Every time I run "Create Android" ADD - Target 2 - Name my_avd "I get an error: - Goal 2 --name my_avd WARNING: Java is not found on your way. It is being checked, it is installed in C : \ Program Files \ Java Error: Instead of using the Android Developer Tool, you need a suitable version of Java on your system. We recommend that you use Java version here Install the JDK version of: http://java.sun.com/javase/downloads/ You can find the full Android SDK here: http://developer.android.com/sdk/ Requirements.html this error message jedi many times for me First of all, I tried to install a location