Search Results

Search found 9872 results on 395 pages for 'preg replace callback'.

Page 26/395 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • callback pattern

    - by robUK
    Hello, gcc 4.4.3 c89 I am creating a client server application and I will need to implement some callback functions. However, I am not too experienced in callbacks. And I am wondering if anyone knowns some good reference material to follow when designing callbacks. Is there any design patterns that are used for c. I did look at some patterns but there where all c++. Many thanks for any suggestions,

    Read the article

  • What Is The Callback Method When A Daemon Application Exists

    - by ChloeRadshaw
    I need to be able to create a little daemon application that will keep running until the machine is restarted or the process is forcefully killed. Is there a callback I can implement to get called when the application is exiting (either by force or at system shutdown) I am not creating a Windows form but a daemon application - I have serached google with no luck

    Read the article

  • How to create an after_save callback on runtime

    - by dorelal
    I am using ruby on rails 2.3.5 . I have user instance. On run time depending on certain conditions I want to add an after_save callback just for this instance. The other issue is that this after_save should take a block or a proc as parameter. What I want is something like this. This is psuedo code. user = User.first proc = Proc.new do puts 'this is foo' end user.after_save proc

    Read the article

  • Add constant value to numeric XML attribute

    - by Dave Jarvis
    Background Add a constant value to numbers matched with a regular expression, using vim (gvim). Problem The following regular expression will match width="32": /width="\([0-9]\{2\}\)" Question How do you replace the numeric value of the width attribute with the results from a mathematical expression that uses the attribute's value? For example, I would like to perform the following global replacement: :%s/width="\([0-9]\{2\}\)"/width="\1+10"/g That would produce width="42" for width="32" and width="105" for width="95". Thank you!

    Read the article

  • Laptop Battery Diagnostics Software?

    - by Wesley
    My Compaq CQ50-215CA laptop with Windows 7 Ultimate RC 32-bit recently told me to replace my battery for fear of sudden shutdowns. Is there any good diagnostics software that anyone has used to test for battery condition and max. life? Also what are good practices for keeping maximal battery life? Thanks.

    Read the article

  • I have made two template classes,could any one tell me if these things are useful?

    - by soul
    Recently i made two template classes,according to the book "Modern C++ design". I think these classes are useful but no one in my company agree with me,so could any one tell me if these things are useful? The first one is a parameter wrapper,it can package function paramters to a single dynamic object.It looks like TypeList in "Modern C++ design". You can use it like this: some place of your code: int i = 7; bool b = true; double d = 3.3; CParam *p1 = CreateParam(b,i); CParam *p2 = CreateParam(i,b,d); other place of your code: int i = 0; bool b = false; double d = 0.0; GetParam(p1,b,i); GetParam(p2,i,b,d); The second one is a generic callback wrapper,it has some special point compare to other wrappers: 1.This template class has a dynamic base class,which let you use a single type object represent all wrapper objects. 2.It can wrap the callback together with it's parameters,you can excute the callback sometimes later with the parameters. You can use it like this: somewhere of your code: void Test1(int i) { } void Test2(bool b,int i) { } CallbackFunc * p1 = CreateCallback(Test1,3); CallbackFunc * p2 = CreateCallback(Test2,false,99); otherwhere of your code: p1->Excute(); p2->Excute(); Here is a part of the codes: parameter wrapper: class NullType; struct CParam { virtual ~CParam(){} }; template<class T1,class T2> struct CParam2 : public CParam { CParam2(T1 &t1,T2 &t2):v1(t1),v2(t2){} CParam2(){} T1 v1; T2 v2; }; template<class T1> struct CParam2<T1,NullType> : public CParam { CParam2(T1 &t1):v1(t1){} CParam2(){} T1 v1; }; template<class T1> CParam * CreateParam(T1 t1) { return (new CParam2<T1,NullType>(t1)); } template<class T1,class T2> CParam * CreateParam(T1 t1,T2 t2) { return (new CParam2<T1,T2>(t1,t2)); } template<class T1,class T2,class T3> CParam * CreateParam(T1 t1,T2 t2,T3 t3) { CParam2<T2,T3> t(t2,t3); return new CParam2<T1,CParam2<T2,T3> >(t1,t); } template<class T1> void GetParam(CParam *p,T1 &t1) { PARAM1(T1)* p2 = dynamic_cast<CParam2<T1,NullType>*>(p); t1 = p2->v1; } callback wrapper: #define PARAM1(T1) CParam2<T1,NullType> #define PARAM2(T1,T2) CParam2<T1,T2> #define PARAM3(T1,T2,T3) CParam2<T1,CParam2<T2,T3> > class CallbackFunc { public: virtual ~CallbackFunc(){} virtual void Excute(void){} }; template<class T> class CallbackFunc2 : public CallbackFunc { public: CallbackFunc2():m_b(false){} CallbackFunc2(T &t):m_t(t),m_b(true){} T m_t; bool m_b; }; template<class M,class T> class StaticCallbackFunc : public CallbackFunc2<T> { public: StaticCallbackFunc(M m):m_m(m){} StaticCallbackFunc(M m,T t):CallbackFunc2<T>(t),m_m(m){} virtual void Excute(void){assert(CallbackFunc2<T>::m_b);CallMethod(CallbackFunc2<T>::m_t);} private: template<class T1> void CallMethod(PARAM1(T1) &t){m_m(t.v1);} template<class T1,class T2> void CallMethod(PARAM2(T1,T2) &t){m_m(t.v1,t.v2);} template<class T1,class T2,class T3> void CallMethod(PARAM3(T1,T2,T3) &t){m_m(t.v1,t.v2.v1,t.v2.v2);} private: M m_m; }; template<class M> class StaticCallbackFunc<M,void> : public CallbackFunc { public: StaticCallbackFunc(M method):m_m(method){} virtual void Excute(void){m_m();} private: M m_m; }; template<class C,class M,class T> class MemberCallbackFunc : public CallbackFunc2<T> { public: MemberCallbackFunc(C *pC,M m):m_pC(pC),m_m(m){} MemberCallbackFunc(C *pC,M m,T t):CallbackFunc2<T>(t),m_pC(pC),m_m(m){} virtual void Excute(void){assert(CallbackFunc2<T>::m_b);CallMethod(CallbackFunc2<T>::m_t);} template<class T1> void CallMethod(PARAM1(T1) &t){(m_pC->*m_m)(t.v1);} template<class T1,class T2> void CallMethod(PARAM2(T1,T2) &t){(m_pC->*m_m)(t.v1,t.v2);} template<class T1,class T2,class T3> void CallMethod(PARAM3(T1,T2,T3) &t){(m_pC->*m_m)(t.v1,t.v2.v1,t.v2.v2);} private: C *m_pC; M m_m; }; template<class T1> CallbackFunc *CreateCallback(CallbackFunc *p,T1 t1) { CParam2<T1,NullType> t(t1); return new StaticCallbackFunc<CallbackFunc *,CParam2<T1,NullType> >(p,t); } template<class C,class T1> CallbackFunc *CreateCallback(C *pC,void(C::*pF)(T1),T1 t1) { CParam2<T1,NullType>t(t1); return new MemberCallbackFunc<C,void(C::*)(T1),CParam2<T1,NullType> >(pC,pF,t); } template<class T1> CParam2<T1,NullType> CreateCallbackParam(T1 t1) { return CParam2<T1,NullType>(t1); } template<class T1> void ExcuteCallback(CallbackFunc *p,T1 t1) { CallbackFunc2<CParam2<T1,NullType> > *p2 = dynamic_cast<CallbackFunc2<CParam2<T1,NullType> > *>(p); p2->m_t.v1 = t1; p2->m_b = true; p->Excute(); }

    Read the article

  • Integrating CKFinder with InnovaStudio WYSIWYG Editor

    - by Sonny
    I use InnovaStudio WYSIWYG Editor, and I am trying to replace InnovaStudio's Asset Manager with CKFinder. There's a line in the editor configuration for what URL to use for the asset manager. I have pointed it at CKFinder. The part I can't get to work is getting the field to populate with the double-clicked file's path from CKFinder. It appears to use the 'func' parameter to specify the callback function. The URL I'm calling is: /common/ckfinder/ckfinder.html?action=js&func=setAssetValue The InnovaStudio WYSIWYG Editor provides the setAssetValue(v) callback function for setting the field value. The v parameter should hold the URL. CKFinder pops up as expected when it's invoked, but neither double-clicking the thumbnails nor using the "select" option in the context menu works. The normal/expected behavior is that CKFinder closes and the target field is populated with the URL for the selected asset. Additional Info: The InnovaStudio WYSIWYG Editor has a "popup" for adding an image or flash file to the content. This pop-up is in an iframe. When it calls CKFinder (or it's own asset manager), that is also in an iframe. It appears that CKFinder is looking in the scope of the main window rather than the image/flash iframe that actually contains the field that needs to be populated.

    Read the article

  • fullcalendar : updating option function callbacks after init

    - by Paul Maneesilasan
    Ok, so I have a problem with setting options whose values are callback functions when I try to set them after plugin initialization. I think this would be a common behavior, to dynamically set event callback after init'ing the calendar. Here is a snipit of code: $(document).ready(function() { $('#calendar').fullCalendar({ editable: false ,events:[{"title":"meeting.title","start":"2010-05-21 15:58:16 UTC"},{"title":"meeting.title","start":"2010-05-24 15:58:16", "url":"http://google.com"}] /* ,eventClick: function(event) { if (event.url) { window.open(event.url); return false; } } */ }); $('#calendar').fullCalendar('options', 'eventClick', function(event) { if (event.url) { window.open(event.url); return false; } }); }); You can see that I have setting the eventClick function as an init option commented out. If I do it that way, it works fine. However if I try to set it after the init, it doesn't work :( Is the some other way to do this? Or am I stuck with having to set the behavior upfront?

    Read the article

  • Is it possible to use boost::bind to effectively concatenate functions?

    - by Catskul
    Assume that I have a boost::function of with an arbitrary signature called type CallbackType. Is it possible to use boost::bind to compose a function that takes the same arguments as the CallbackType but calls the two functors in succession? Hypothetical example using a magic template: Template<typename CallbackType> class MyClass { public: CallbackType doBoth; MyClass( CallbackType callback ) { doBoth = bind( magic<CallbackType>, protect( bind(&MyClass::alert, this) ), protect( callback ) ); } void alert() { cout << "It has been called\n"; } }; void doIt( int a, int b, int c) { cout << "Doing it!" << a << b << c << "\n"; } int main() { typedef boost::function<void (int, int, int)> CallbackType; MyClass<CallbackType> object( boost::bind(doIt) ); object.doBoth(); return 0; }

    Read the article

  • How do I make custom functions chain-able with jQuery's?

    - by sergio
    I need a "callfront" or "precall" (the opposite of "callback" ¿?) to add in MANY places before an animation occurs in an existing plugin, To be used like e.g. $(some_unpredictable_obj).preFunct().animate(… The problem is, as I said they are MANY places, and all of them are different animations, on different objects. I can TELL where all of them occur, but I don't want to add over and over the same code. I actually have to add both a function before and after those animations, but I think I can use the callback for all of them. In a perfect world, I'd like to replace every animate(property, duration) by preFunct().animate(property,duration).postFunct() preFunct and postFunct don't need parameters, since they are always the same action, on the same object. This could be an amazing addition to "jQuery" (an easy way to jQuerize custom functions to be added to the normal chain (without messing with queues) I found this example but it will act on the applied element, and I don't want that because, as I said above, all the original animations to be added to are on different elements. I also found jQuery.timing, but it looks cooler the chain-able function :) Thanks.

    Read the article

  • Javascript Closures, Callbacks, This and That

    - by nazbot
    I am having some trouble getting a callback function to work. Here is my code: SomeObject.prototype.refreshData = function() { var read_obj = new SomeAjaxCall("read_some_data", { }, this.readSuccess, this.readFail); } SomeObject.prototype.readSuccess = function(response) { this.data = response; this.someList = []; for (var i = 0; i < this.data.length; i++) { var systemData = this.data[i]; var system = new SomeSystem(systemData); this.someList.push(system); } this.refreshList(); } Basically SomeAjaxCall is making an ajax request for data. If it works we use the callback 'this.readSuccess' and if it fails 'this.readFail'. I have figured out that 'this' in the SomeObject.readSuccess is the global this (aka the window object) because my callbacks are being called as functions and not member methods. My understanding is that I need to use closures to keep the 'this' around, however, I have not been able to get this to work. If someone is able show me what I should be doing I would appreciate it greatly. I am still wrapping my head around how closures work and specifically how they would work in this situation. Thanks!

    Read the article

  • grep_replace: unknown modifier

    - by tic
    Let assume that $body is equal to something that does not interest me <!-- start --> some html code <!-- end --> something that does not interest me If I use $body=preg_replace("(.*)<!-- start -->(.*)<!-- end -->(.*)","$2",$body); I obtain: Warning: preg_replace() [function.preg-replace]: Unknown modifier '<' How have I to correct?

    Read the article

  • Wrapping ASP.NET Client Callbacks

    - by Ricardo Peres
    Client Callbacks are probably the less known (and I dare say, less loved) of all the AJAX options in ASP.NET, which also include the UpdatePanel, Page Methods and Web Services. The reason for that, I believe, is it’s relative complexity: Get a reference to a JavaScript function; Dynamically register function that calls the above reference; Have a JavaScript handler call the registered function. However, it has some the nice advantage of being self-contained, that is, doesn’t need additional files, such as web services, JavaScript libraries, etc, or static methods declared on a page, or any kind of attributes. So, here’s what I want to do: Have a DOM element which exposes a method that is executed server side, passing it a string and returning a string; Have a server-side event that handles the client-side call; Have two client-side user-supplied callback functions for handling the success and error results. I’m going to develop a custom control without user interface that does the registration of the client JavaScript method as well as a server-side event that can be hooked by some handler on a page. My markup will look like this: 1: <script type="text/javascript"> 1:  2:  3: function onCallbackSuccess(result, context) 4: { 5: } 6:  7: function onCallbackError(error, context) 8: { 9: } 10:  </script> 2: <my:CallbackControl runat="server" ID="callback" SendAllData="true" OnCallback="OnCallback"/> The control itself looks like this: 1: public class CallbackControl : Control, ICallbackEventHandler 2: { 3: #region Public constructor 4: public CallbackControl() 5: { 6: this.SendAllData = false; 7: this.Async = true; 8: } 9: #endregion 10:  11: #region Public properties and events 12: public event EventHandler<CallbackEventArgs> Callback; 13:  14: [DefaultValue(true)] 15: public Boolean Async 16: { 17: get; 18: set; 19: } 20:  21: [DefaultValue(false)] 22: public Boolean SendAllData 23: { 24: get; 25: set; 26: } 27:  28: #endregion 29:  30: #region Protected override methods 31:  32: protected override void Render(HtmlTextWriter writer) 33: { 34: writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID); 35: writer.RenderBeginTag(HtmlTextWriterTag.Span); 36:  37: base.Render(writer); 38:  39: writer.RenderEndTag(); 40: } 41:  42: protected override void OnInit(EventArgs e) 43: { 44: String reference = this.Page.ClientScript.GetCallbackEventReference(this, "arg", "onCallbackSuccess", "context", "onCallbackError", this.Async); 45: String script = String.Concat("\ndocument.getElementById('", this.ClientID, "').callback = function(arg, context, onCallbackSuccess, onCallbackError){", ((this.SendAllData == true) ? "__theFormPostCollection.length = 0; __theFormPostData = ''; WebForm_InitCallback(); " : String.Empty), reference, ";};\n"); 46:  47: this.Page.ClientScript.RegisterStartupScript(this.GetType(), String.Concat("callback", this.ClientID), script, true); 48:  49: base.OnInit(e); 50: } 51:  52: #endregion 53:  54: #region Protected virtual methods 55: protected virtual void OnCallback(CallbackEventArgs args) 56: { 57: EventHandler<CallbackEventArgs> handler = this.Callback; 58:  59: if (handler != null) 60: { 61: handler(this, args); 62: } 63: } 64:  65: #endregion 66:  67: #region ICallbackEventHandler Members 68:  69: String ICallbackEventHandler.GetCallbackResult() 70: { 71: CallbackEventArgs args = new CallbackEventArgs(this.Context.Items["Data"] as String); 72:  73: this.OnCallback(args); 74:  75: return (args.Result); 76: } 77:  78: void ICallbackEventHandler.RaiseCallbackEvent(String eventArgument) 79: { 80: this.Context.Items["Data"] = eventArgument; 81: } 82:  83: #endregion 84: } And the event argument class: 1: [Serializable] 2: public class CallbackEventArgs : EventArgs 3: { 4: public CallbackEventArgs(String argument) 5: { 6: this.Argument = argument; 7: this.Result = String.Empty; 8: } 9:  10: public String Argument 11: { 12: get; 13: private set; 14: } 15:  16: public String Result 17: { 18: get; 19: set; 20: } 21: } You will notice two properties on the CallbackControl: Async: indicates if the call should be made asynchronously or synchronously (the default); SendAllData: indicates if the callback call will include the view and control state of all of the controls on the page, so that, on the server side, they will have their properties set when the Callback event is fired. The CallbackEventArgs class exposes two properties: Argument: the read-only argument passed to the client-side function; Result: the result to return to the client-side callback function, set from the Callback event handler. An example of an handler for the Callback event would be: 1: protected void OnCallback(Object sender, CallbackEventArgs e) 2: { 3: e.Result = String.Join(String.Empty, e.Argument.Reverse()); 4: } Finally, in order to fire the Callback event from the client, you only need this: 1: <input type="text" id="input"/> 2: <input type="button" value="Get Result" onclick="document.getElementById('callback').callback(callback(document.getElementById('input').value, 'context', onCallbackSuccess, onCallbackError))"/> The syntax of the callback function is: arg: some string argument; context: some context that will be passed to the callback functions (success or failure); callbackSuccessFunction: some function that will be called when the callback succeeds; callbackFailureFunction: some function that will be called if the callback fails for some reason. Give it a try and see if it helps!

    Read the article

  • Suspend not working after kernel update on an HP Envy14 1050

    - by leoxweb
    I just update ubuntu 12.04 to the kernel 3.2.0-30 and together with it a lot of packeges in the system. I am running it on an HP Envy14 1050. When I first made a fresh install of the clean ubuntu 12.04 I had the problem that when restoring from suspend the screen was black, although some backlight was there. I could fix it following this https://bugs.launchpad.net/ubuntu/+source/linux/+bug/989674/comments/20. Now, after the update the black screen after suspend has reappeared but with no backlight at all and the led in the caps lock key blinking. The laptop is using a ATI radeon 5600 with the privative drivers. During the update process there was an error with depmod . You can see the /var/log/dist-upgrade/apt-term.log file at the end. UPDATE: suspend is not working at all. The problem is not when restoring from suspend, but when I try to suspend the system it gets blocked and the fan running. Only option is to press power button. Log started: 2012-09-12 00:46:46 (Reading database ... 198909 files and directories currently installed.) Removing icedtea-7-jre-cacao ... Selecting previously unselected package linux-image-3.2.0-30-generic. (Reading database ... 198901 files and directories currently installed.) Unpacking linux-image-3.2.0-30-generic (from .../linux-image-3.2.0-30-generic_3.2.0-30.48_amd64.deb) ... Done. Preparing to replace icedtea-7-jre-jamvm 7~u3-2.1.1~pre1-1ubuntu3 (using .../icedtea-7-jre-jamvm_7u7-2.3.2-1ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement icedtea-7-jre-jamvm ... Preparing to replace openjdk-7-jre-lib 7~u3-2.1.1~pre1-1ubuntu3 (using .../openjdk-7-jre-lib_7u7-2.3.2-1ubuntu0.12.04.1_all.deb) ... Unpacking replacement openjdk-7-jre-lib ... Preparing to replace openjdk-7-jre-headless 7~u3-2.1.1~pre1-1ubuntu3 (using .../openjdk-7-jre-headless_7u7-2.3.2-1ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement openjdk-7-jre-headless ... Preparing to replace python-problem-report 2.0.1-0ubuntu12 (using .../python-problem-report_2.0.1-0ubuntu13_all.deb) ... Unpacking replacement python-problem-report ... Preparing to replace python-apport 2.0.1-0ubuntu12 (using .../python-apport_2.0.1-0ubuntu13_all.deb) ... Unpacking replacement python-apport ... Preparing to replace apport 2.0.1-0ubuntu12 (using .../apport_2.0.1-0ubuntu13_all.deb) ... apport stop/waiting Unpacking replacement apport ... Preparing to replace apport-gtk 2.0.1-0ubuntu12 (using .../apport-gtk_2.0.1-0ubuntu13_all.deb) ... Unpacking replacement apport-gtk ... Preparing to replace firefox-globalmenu 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-globalmenu_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-globalmenu ... Preparing to replace firefox 15.0+build1-0ubuntu0.12.04.1 (using .../firefox_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox ... Preparing to replace firefox-gnome-support 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-gnome-support_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-gnome-support ... Preparing to replace firefox-locale-en 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-locale-en_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-locale-en ... Preparing to replace firefox-locale-es 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-locale-es_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-locale-es ... Preparing to replace firefox-locale-zh-hans 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-locale-zh-hans_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-locale-zh-hans ... Preparing to replace totem-mozilla 3.0.1-0ubuntu21 (using .../totem-mozilla_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement totem-mozilla ... Preparing to replace libtotem0 3.0.1-0ubuntu21 (using .../libtotem0_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement libtotem0 ... Preparing to replace totem-plugins 3.0.1-0ubuntu21 (using .../totem-plugins_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement totem-plugins ... Preparing to replace totem 3.0.1-0ubuntu21 (using .../totem_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement totem ... Preparing to replace totem-common 3.0.1-0ubuntu21 (using .../totem-common_3.0.1-0ubuntu21.1_all.deb) ... Unpacking replacement totem-common ... Preparing to replace gir1.2-totem-1.0 3.0.1-0ubuntu21 (using .../gir1.2-totem-1.0_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement gir1.2-totem-1.0 ... Preparing to replace glib-networking-common 2.32.1-1ubuntu1 (using .../glib-networking-common_2.32.1-1ubuntu2_all.deb) ... Unpacking replacement glib-networking-common ... Preparing to replace glib-networking 2.32.1-1ubuntu1 (using .../glib-networking_2.32.1-1ubuntu2_amd64.deb) ... Unpacking replacement glib-networking ... Preparing to replace glib-networking-services 2.32.1-1ubuntu1 (using .../glib-networking-services_2.32.1-1ubuntu2_amd64.deb) ... Unpacking replacement glib-networking-services ... Preparing to replace linux-firmware 1.79 (using .../linux-firmware_1.79.1_all.deb) ... Unpacking replacement linux-firmware ... Preparing to replace linux-generic 3.2.0.29.31 (using .../linux-generic_3.2.0.30.32_amd64.deb) ... Unpacking replacement linux-generic ... Preparing to replace linux-image-generic 3.2.0.29.31 (using .../linux-image-generic_3.2.0.30.32_amd64.deb) ... Unpacking replacement linux-image-generic ... Selecting previously unselected package linux-headers-3.2.0-30. Unpacking linux-headers-3.2.0-30 (from .../linux-headers-3.2.0-30_3.2.0-30.48_all.deb) ... Selecting previously unselected package linux-headers-3.2.0-30-generic. Unpacking linux-headers-3.2.0-30-generic (from .../linux-headers-3.2.0-30-generic_3.2.0-30.48_amd64.deb) ... Preparing to replace linux-headers-generic 3.2.0.29.31 (using .../linux-headers-generic_3.2.0.30.32_amd64.deb) ... Unpacking replacement linux-headers-generic ... Preparing to replace linux-libc-dev 3.2.0-29.46 (using .../linux-libc-dev_3.2.0-30.48_amd64.deb) ... Unpacking replacement linux-libc-dev ... Preparing to replace openjdk-7-jre 7~u3-2.1.1~pre1-1ubuntu3 (using .../openjdk-7-jre_7u7-2.3.2-1ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement openjdk-7-jre ... Preparing to replace openjdk-7-jdk 7~u3-2.1.1~pre1-1ubuntu3 (using .../openjdk-7-jdk_7u7-2.3.2-1ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement openjdk-7-jdk ... Preparing to replace policykit-1-gnome 0.105-1ubuntu3 (using .../policykit-1-gnome_0.105-1ubuntu3.1_amd64.deb) ... Unpacking replacement policykit-1-gnome ... Preparing to replace xserver-xorg-input-synaptics 1.6.2-1ubuntu1~precise1 (using .../xserver-xorg-input-synaptics_1.6.2-1ubuntu1~precise2_amd64.deb) ... Unpacking replacement xserver-xorg-input-synaptics ... Processing triggers for ureadahead ... ureadahead will be reprofiled on next reboot Processing triggers for hicolor-icon-theme ... Processing triggers for shared-mime-info ... Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' Unknown media type in type 'uri/mms' Unknown media type in type 'uri/mmst' Unknown media type in type 'uri/mmsu' Unknown media type in type 'uri/pnm' Unknown media type in type 'uri/rtspt' Unknown media type in type 'uri/rtspu' Processing triggers for man-db ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Processing triggers for gconf2 ... Processing triggers for libglib2.0-0:i386 ... Processing triggers for libglib2.0-0 ... Setting up linux-image-3.2.0-30-generic (3.2.0-30.48) ... Running depmod. update-initramfs: deferring update (hook will be called later) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic Error! Problems with depmod detected. Automatically uninstalling this module. DKMS: Install Failed (depmod problems). Module rolled back to built state. run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic update-initramfs: Generating /boot/initrd.img-3.2.0-30-generic run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.0-30-generic Found initrd image: /boot/initrd.img-3.2.0-30-generic Found linux image: /boot/vmlinuz-3.2.0-29-generic Found initrd image: /boot/initrd.img-3.2.0-29-generic Found linux image: /boot/vmlinuz-3.2.0-23-generic Found initrd image: /boot/initrd.img-3.2.0-23-generic Found memtest86+ image: /boot/memtest86+.bin Found Windows 7 (loader) on /dev/sda1 Found Windows Recovery Environment (loader) on /dev/sda2 Found Windows Recovery Environment (loader) on /dev/sda3 done Setting up python-problem-report (2.0.1-0ubuntu13) ... Setting up python-apport (2.0.1-0ubuntu13) ... Setting up apport (2.0.1-0ubuntu13) ... apport start/running Setting up apport-gtk (2.0.1-0ubuntu13) ... Setting up firefox (15.0.1+build1-0ubuntu0.12.04.1) ... Please restart all running instances of firefox, or you will experience problems. Setting up firefox-globalmenu (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up firefox-gnome-support (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up firefox-locale-en (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up firefox-locale-es (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up firefox-locale-zh-hans (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up libtotem0 (3.0.1-0ubuntu21.1) ... Setting up totem-common (3.0.1-0ubuntu21.1) ... Setting up totem (3.0.1-0ubuntu21.1) ... Setting up totem-mozilla (3.0.1-0ubuntu21.1) ... Setting up gir1.2-totem-1.0 (3.0.1-0ubuntu21.1) ... Setting up totem-plugins (3.0.1-0ubuntu21.1) ... Setting up glib-networking-common (2.32.1-1ubuntu2) ... Setting up glib-networking-services (2.32.1-1ubuntu2) ... Setting up glib-networking (2.32.1-1ubuntu2) ... Setting up linux-firmware (1.79.1) ... Setting up linux-image-generic (3.2.0.30.32) ... Setting up linux-generic (3.2.0.30.32) ... Setting up linux-headers-3.2.0-30 (3.2.0-30.48) ... Setting up linux-headers-3.2.0-30-generic (3.2.0-30.48) ... Examining /etc/kernel/header_postinst.d. run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic Setting up linux-headers-generic (3.2.0.30.32) ... Setting up linux-libc-dev (3.2.0-30.48) ... Setting up policykit-1-gnome (0.105-1ubuntu3.1) ... Setting up xserver-xorg-input-synaptics (1.6.2-1ubuntu1~precise2) ... Setting up openjdk-7-jre-headless (7u7-2.3.2-1ubuntu0.12.04.1) ... Installing new version of config file /etc/java-7-openjdk/security/java.security ... Installing new version of config file /etc/java-7-openjdk/jvm-amd64.cfg ... Setting up openjdk-7-jre-lib (7u7-2.3.2-1ubuntu0.12.04.1) ... Setting up icedtea-7-jre-jamvm (7u7-2.3.2-1ubuntu0.12.04.1) ... Setting up openjdk-7-jre (7u7-2.3.2-1ubuntu0.12.04.1) ... Setting up openjdk-7-jdk (7u7-2.3.2-1ubuntu0.12.04.1) ... update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/bin/jcmd to provide /usr/bin/jcmd (jcmd) in auto mode. Processing triggers for libc-bin ... ldconfig deferred processing now taking place Log ended: 2012-09-12 00:49:16

    Read the article

  • Callback Error when using Sharepoint PeopleEditor

    - by BeraCim
    Hi all: I'm getting a "There was an error in the callback" error when clicking on the check names button of the PeopleEditor in Sharepoint. I didn't do anything fancy. All I did was just to create a PeopleEditor in the C# code and add it to a Panel, and let the aspx page renders it. The address book (the button next to the check names button) works. But everytime when I enter something in the PeopleEditor and click the check names button, I get that error. I had a look at my aspx page, and I'm getting the feeling that I'm missing some sort of Javascript library. I have JQuery library included in my aspx page, but thats about it. Does anyone know what might be wrong? [UPDATE] The PeopleEditor is appended to a panel, which is displayed when the value of a dropdown list changes. Thanks.

    Read the article

  • jQuery 1 minute countdown with milliseconds and callback

    - by Josh
    I'm trying to figure out a way to display a simple countdown that displays 1:00:00 whereby 1 = minutes, 00 = seconds, and 00 = milliseconds. I've found loads of jQuery countdowns on the interwebs, but none of the contain the ability to display milliseconds natively, and I really don't want to dig through thousands of lines of code to try and find a way to hack it in there myself. Is this something that would be pretty easy to whip up? I'm also hoping to have the ability to add a callback to the end of the countdown (0:00:00) so that when it finishes, I can run another function.

    Read the article

  • Using String+string+string vs using string.replace

    - by Madi D.
    A colleague told me that using the following method: string url = "SomeURL"; string ext = "SomeExt"; string sub = "SomeSub"; string subSub = "moreSub"; string Url = @"http://www." + Url +@"/"+ ext +@"/"+ sub + subSub; is not efficenet (takes more resources) and it is preferred to use the following method: string Url = @"http://www.#URL.#EXT/#sub/#subSub"; string url = "SomeURL"; string ext = "SomeExt"; string sub = "SomeSub"; string subSub = "moreSub"; Url.Replace("#URL",url) Url.Replace("#EXT",ext); Url.Replace("#sub",sub); Url.Replace("#subSub",subSub); Is that true? and what is the explanation behind it?

    Read the article

  • Facebook Graph Api doesn't redirect to my callback

    - by Pentium10
    I am following the steps to do the authorization as described here, but I am not redirected to my callback url. I get the following five steps after calling the first one: https://graph.facebook.com/oauth/authorize?display=touch&client_id=...&redirect_uri=... https://www.facebook.com/connect/uiserver.php?display=touch&client_id=...&redirect_uri=...&next=https://graph.facebook.com/oauth/authorize_success?display=touch&client_id=...&redirect_uri=...&type=web_server&cancel_url=https://graph.facebook.com/oauth/authorize_cancel?display=touch&client_id=...&redirect_uri=...&method=permissions.request&return_session=1 http://www.facebook.com/ http://touch.facebook.com/?w2m http://touch.facebook.com/login.php?next=http://touch.facebook.com/?w2m&cancel=http://touch.facebook.com/?w2m&fbconnect=0&r39c26cf0&refid=108 As you see the 5th steps just displays the login screen. If I log in, or I am already logged in I am presented with the home page. I use my application key, and the connect url of the app I've setup in FB Developers page. What I am doing wrong, why I am not redirected to my url?

    Read the article

  • jQuery Plugin for TinyMCE callback

    - by SomewhereThere
    I am using the jQuery plugin from the jQuery build of TinyMCE. This simplified code initializes the editor: $('textarea.tinymce').tinymce({ script_url : '../js/libraries/tiny_mce/tiny_mce.js' }); This loads tiny_mce.js via AJAX. I have code that I want to run once this file is loaded. I essentially want to specify a callback function, but there is no mention of this in the documentation for the plugin. Any ideas? I would be up for adding the functionality if it is not there but I cannot find an uncompressed version of the plugin.

    Read the article

  • SubSonic Alias/Where Clause

    - by JohnBob
    Hey, I want to convert the following SQL Query to a SubSonic Query. SELECT [dbo].[tbl_Agency].[ParentCompanyID] FROM [dbo].[tbl_Agency] WHERE REPLACE(PhoneNumber, ' ', '') LIKE REPLACE('%9481 1111%', ' ', '') I thought I would do it like below, but I just can't get it to produce valid SQL. //SubSonic string agencyPhoneNumber = "9481 1111"; SubSonic.SqlQuery subQueryagencyPhoneNumber = new SubSonic.Select(Agency.ParentCompanyIDColumn.ColumnName); subQueryagencyPhoneNumber.From(Agency.Schema.TableName); //WHERE subQueryagencyPhoneNumber.Where("REPLACE(" + Agency.PhoneNumberColumn.ColumnName + ", ' ', '')").Like("%" + agencyPhoneNumber + "%"); Does anyone out there know how to fix this - I'm using SubSonic 2.2. I feel like I'm taking crazy pills here - this should be straightforward, right? Cheers, JohnBob

    Read the article

  • jQuery $.ajax success must be a callback function?

    - by b. e. hollenbeck
    I've created a wrapper function for jQuery's $.ajax() method so I can pass different dataTypes and post variables - like so: function doPost(dType, postData, uri){ $.ajax({ url: SITE_URL + uri, dataType: dType, data: postData, success: function(data){ return data; }); } The problem I'm having is getting the data (which is always JSON) back out. I've tried setting a var ret before the $.ajax() function call and setting it as ret = data in the success function. Am I being stupid about this? If I don't set a success function, will the $.ajax simply return the data? Or is it just success: return data? Or does success require a callback function to handle the data, which could just be return data?

    Read the article

  • Using RegEx to replace invalid characters

    - by yeahumok
    Hello I have a directory with lots of folders, subfolder and all with files in them. The idea of my project is to recurse through the entire directory, gather up all the names of the files and replace invalid characters (invalid for a SharePoint migration). However, i'm completely unfamiliar with Regular Expressions. The characters i need to get rid in filenames are: ~, #, %, &, *, { } , \, /, :, <, ?, -, | and "" I want to replace these characters with a blank space. I was hoping to use a string.replace() method to look through all these file names and do the replacement. So far, the only code i've gotten to is the recursion. I was thinking of the recursion scanning the drive, fetching the names of these files and putting them in a List. Can anybody help me with how to find/replace invalid chars with RegEx with those specific characters?

    Read the article

  • MySQL, replacing &nbsp; with... nothing (delete those, please!)

    - by javipas
    I'm trying to purge my WordPress content from "false" carriage return (CR). These are caused after a migration of my content, that now presents from time to time a &nbsp; code that makes the web rendering engine to "paint" a CR where I would like to be nothing. The paragraphs seem to have a double CR because of this, and look too far apart. I'd like to be able to make a MySQL query in order to get rid of that strings, but at the moment I haven't found the key. What I've tried is UPDATE wp_posts set post_content = replace (post_content,'&nbsp;',' '); But i get <p> </p> where before were the &nbsp; strings. This seems not the answer at all. Could it have to be with the ampersand, and in that case, should I use something like &amp;nbsp; or something similar?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >