Search Results

Search found 266636 results on 10666 pages for 'back stack'.

Page 11/10666 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Creating a Stack Overflow notifier

    - by Trey
    I could not find a Stack Overflow notifier Android app so I am planning on making one. I hope that my app will serve a similar purpose as the Stack Overflow Notifier Chrome extension. This will be my first Android app so I am still unfamiliar with the platform. My main concern when creating this app is, what is the proper way to access the user's Recent Activity page? I thought of two different approaches but I'm not sure how to implement either one: Make the user login to Stack Overflow through the Browser application or an embedded browser and scrape their recent activity page occasionally for updates. Ask the user for their username and password and forward this information to Stack Overflow for authentication, storing cookies somehow to keep the session active. I think Astrid uses something similar to the first approach, but I haven't been able to figure it out yet from skimming their code. What is the correct way to handle a notification application like this that requires session management?

    Read the article

  • Problem with stack based implementation of function 0x42 of int 0x13

    - by IceCoder
    I'm trying a new approach to int 0x13 (just to learn more about the way the system works): using stack to create a DAP.. Assuming that DL contains the disk number, AX contains the address of the bootable entry in PT, DS is updated to the right segment and the stack is correctly set, this is the code: push DWORD 0x00000000 add ax, 0x0008 mov si, ax push DWORD [ds:(si)] push DWORD 0x00007c00 push WORD 0x0001 push WORD 0x0010 push ss pop ds mov si, sp mov sp, bp mov ah, 0x42 int 0x13 As you can see: I push the dap structure onto the stack, update DS:SI in order to point to it, DL is already set, then set AX to 0x42 and call int 0x13 the result is error 0x01 in AH and obviously CF set. No sectors are transferred. I checked the stack trace endlessly and it is ok, the partition table is ok too.. I cannot figure out what I'm missing... This is the stack trace portion of the disk address packet: 0x000079ea: 10 00 adc %al,(%bx,%si) 0x000079ec: 01 00 add %ax,(%bx,%si) 0x000079ee: 00 7c 00 add %bh,0x0(%si) 0x000079f1: 00 00 add %al,(%bx,%si) 0x000079f3: 08 00 or %al,(%bx,%si) 0x000079f5: 00 00 add %al,(%bx,%si) 0x000079f7: 00 00 add %al,(%bx,%si) 0x000079f9: 00 a0 07 be add %ah,-0x41f9(%bx,%si) I'm using qemu latest version and trying to read from hard drive (0x80), have also tried with a 4bytes alignment for the structure with the same result (CF 1 AH 0x01), the extensions are present.

    Read the article

  • Strange activity stack behavior when using MapActivity

    - by AndroidDev
    I have the following activity structure in my application A simple "splash screen" activity is started when the application is fired up (let's call it "Splash"). This activity starts the main activity when the user presses a button (I will call it "Main"). Main can in turn start two activities from the menu. The first activity presents a simple form (let's call this one "Form"), the second is a MapActivity that presents a map (it is called "Map"). Main, Form, and Map are declared exactly the same in the manifest: <activity android:name="fully qualified activity class" android:screenOrientation="landscape" android:configChanges="keyboard|keyboardHidden|orientation" > <intent-filter> <action android:name="android.intent.action.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> When Main is active and I start Form and press "back", Main comes up again. Pressing "back" again brings up "Splash". Nothing strange here. Now comes the strange part: when I am in Main, start Map, and press "back", Main comes up as expected. But pressing "back" again just restarts Main. A second press on "back" is needed to bring me back to Splash! So it seems that starting the Map activity somehow results in Main ending up on the activity stack twice while starting the Form activity does not! Both Form and Map are started like this: startActivity(new Intent(this, MyActivity.class)); I don not catch the back key in any activity. Any clues on what is going on or how to debug this?

    Read the article

  • NSMutableArray Vs Stack

    - by Chandan Shetty SP
    I am developing 2D game for iphone in Objectice-C.In this project I need to use stack, I can do it using STL(Standard template library) stacks or NSMutableArray, since this stack is widely used in the game which one is more efficient? @interface CarElement : NSObject { std::stack<myElement*> *mBats; } or @interface CarElement : NSObject { NSMutableArray *mBats; } Thanks,

    Read the article

  • Implementing a Stack using Test-Driven Development

    - by devoured elysium
    I am doing my first steps with TDD. The problem is (as probably with everyone starting with TDD), I never know very well what kind of unit tests to do when I start working in my projects. Let's assume I want to write a Stack class with the following methods(I choose it as it's an easy example): Stack<T> - Push(element : T) - Pop() : T - Seek() : T - Count : int - IsEmpty : boolean How would you approch this? I never understood if the idea is to test a few corner cases for each method of the Stack class or start by doing a few "use cases" with the class, like adding 10 elements and removing them. What is the idea? To make code that uses the Stack as close as possible to what I'll use in my real code? Or just make simple "add one element" unit tests where I test if IsEmpty and Count were changed by adding that element? How am I supposed to start with this?

    Read the article

  • How to determine values saved on the stack?

    - by Brian
    I'm doing some experimenting and would like to be able to see what is saved on the stack during a system call (the saved state of the user land process). According to http://lxr.linux.no/#linux+v2.6.30.1/arch/x86/kernel/entry_32.S it shows that the various values of registers are saved at those particular offsets to the stack pointer. Here is the code I have been trying to use to examine what is saved on the stack (this is in a custom system call I have created): asm("movl 0x1C(%esp), %ecx"); asm("movl %%ecx, %0" : "=r" (value)); where value is an unsigned long. As of right now, this value is not what is expected (it is showing a 0 is saved for the user value of ds). Am I correctly accessing the offset of the stack pointer? Another possibility might be could I use a debugger such as GDB to examine the stack contents while in the kernel? I don't have much extensive use with debugging and am not sure of how to debug code inside the kernel. Any help is much appreciated.

    Read the article

  • Unable to get values in ftl from value stack in custom Result Type

    - by Nagadev
    Hello, I am unable retrieve value from value stack in FTL file. Here is the code. Action class holds a property called 'name' private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } public String execute(){ setName("From value stack .. "); return SUCCESS; } FTL code: ${name} Custom result Type deExecute Method Configuration configuration = new Configuration(); String templatePath = "/ftl"; ServletContext context = ServletActionContext.getServletContext(); configuration.setServletContextForTemplateLoading(context, templatePath); configuration.setObjectWrapper(new DefaultObjectWrapper()); Template template = configuration.getTemplate("sample.ftl"); OutputStreamWriter out = new OutputStreamWriter(System.out); template.process(ActionContext.getContext().getValueStack(), out); I am passing the value Stack which contains recently executed Action as well. But FTL is throwing an exception Expression name is undefined on line 1, column 3 in sample.ftl I tried with passing session instead of value stack and I could get the value in FTL. Please suggest me a way to get values from Action class to FTL from value stack. Thanks inadvance.

    Read the article

  • Stack trace with incorrect line number

    - by adrianbanks
    Why would a stack trace show "line 0", but only for one frame in the stack trace? eg. ... at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at My.LibraryA.Some.Method():line 16 at My.LibraryB.Some.OtherMethod():line 0 at My.LibraryB.Some.Method():line 22 at My.LibraryA.Some.Method():line 10 Background: I have an application that is failing with an exception, and is logging a stack trace to its log file. When the applciation was built, all assemblies were compiled with full debug info (Project Properties - Build - Advanced - Debug Info - Full), and so PDB files were generated. To help me diagnose where the error is coming from, I dropped the PDB files into the application's bin directory, and reproduced the exception. All line numbers for each stack frame look correct, with the exception of one which displays "line 0" as its source.

    Read the article

  • OpenGL: Implementing transformation matrix stack

    - by Jakub M.
    In a newer OpenGL there is no matrix stack. I am working on a simple display engine, and I am going to implement the transformation stack. What is a common strategy here? Should I build a push/pop stack, and use it with a tree representing my model? I suppose this is the "old" approach, that was deprecated in the newer OpenGL versions. Maybe then it is not the best solution (it was removed for some reason)

    Read the article

  • infix operation to postfix using stacks

    - by Chris De La O
    We are writing a program that needs to convert an infix operation (4 5/3) to postfix (4 5 3 / ) using stacks. however my convert to postfix does not work as it doesnt not output the postFix array that is supposed to store the conversion from infix notation to postfix notation. here is the code for the convertToPostix fuction. //converts infix expression to postfix expression void ArithmeticExpression::convertToPostfix(char *const inFix, char *const postFix) { //create a stack2 object named cow Stack2<char> cow; cout<<postFix; char thing = '('; //push a left parenthesis onto the stack cow.push(thing); //append a right parenthesis to the end of inFix array strcat(inFix, ")"); int i = 0;//declare an int that will control posFix position //if the stack is not empty if (!cow.isEmpty()) { //loop to run until the last character in inFix array for (int x = 0; inFix[x]!= '\0'; x++ ) { //if the inFix element is a digit if (isdigit(inFix[x])) { postFix[i]=inFix[x];//it is assigned to the next element in postFix array i++;//move on to next element in postFix } //if the inFix element is a left parenthesis else if (inFix[x]=='(') { cow.push(inFix[x]);//push it unto the stack } //if the inFix element is an operator else if (isOperator(inFix[x])) { char oper2 = inFix[x];//char variable holds inFix operator if (isOperator(cow.stackTop()))//if the top node in the stack is an operator { while (isOperator(cow.stackTop()))//and while the top node in the stack is an operator { char oper1 = cow.stackTop();//char variable holds node operator if(precedence( oper1, oper2))//if the node operator has higher presedence than node operator { postFix[i] = cow.pop();//we pop such operator and insert it in postFix array's next element cow.push(inFix[x]);//and push inFix operator unto the stack i++;//move to the next element in posFix } } } //if the top node is not an operator //we push the current inFix operator unto the top of the stack else cow.push(inFix[x]); } //if the inFix element is a right parenthesis else if (inFix[x]==')') { //we pop everything in the stack and insert it in postFix //until we arrive at a left paranthesis while (cow.stackTop()!='(') { postFix[i] = cow.pop(); i++; } //we then pop and discard left parenthesis cow.pop(); } } postFix[i]='\0'; //print !!postFix array!! (not stack) print();//code for this is just cout<<postFix; }

    Read the article

  • Is stack address shared by Heap addresses ??

    - by numerical25
    I read On most operating systems, the addresses in memory starts from highest to lowest. So I am wondering if the heap, stack, and global memory all fall under the same ordering..? If I created... pointerType* pointer = new pointerType //creates memory address 0xffffff And then created a local varible on the stack localObject object would localObjects address be 0xfffffe Or is heap and stack ordering completely different.

    Read the article

  • Allocation Target of std::aligned_storage (stack or heap?)

    - by Zenikoder
    I've been trying to get my head around the TR1 addition known as aligned_storage. Whilst reading the following documents N2165, N3190 and N2140 I can't for the life of me see a statement where it clearly describes stack or heap nature of the memory being used. I've had a look at the implementation provided by msvc2010, boost and gcc they all provide a stack based solution centered around the use of a union. In short: Is the memory type (stack or heap) used by aligned_storage implementation defined or is it always meant to be stack based? and, What the is the specific document that defines/determines that?

    Read the article

  • How To Easily Back Up Your Gmail and Perform Scheduled Backups With GMVault

    - by Chris Hoffman
    We all know backups are important, but we rarely think about backing up our email. GMVault can automatically back up your Gmail to your computer and even restore the emails to another Gmail account – convenient when switching Gmail addresses. We’ve also covered using Thunderbird to back up your web-based email account, but GMVault has a few advantages, including its integrated restore function and easy integration with the Windows Task Scheduler. 8 Deadly Commands You Should Never Run on Linux 14 Special Google Searches That Show Instant Answers How To Create a Customized Windows 7 Installation Disc With Integrated Updates

    Read the article

  • Chargeback and showback...both a 'throw back'

    - by llaszews
    Been getting asked again by customers and partners about chargeback and showback in the cloud so thought I would blog on my response to this question. Charge Back background, information and industry analysis: Cloud computing is all about shared resources. These shared resources are computer servers (including memory and CPU), network devices, hard disk storage, database servers, application servers, cooling, floor space, electricity and more. These resources are shared by departments within a company, or by a number of companies, when resources are hosted in the public or hybrid cloud. Currently, hosting providers that run other companies on their cloud platforms do not have an accurate way to measure the shared computing resources used by a specific user let alone used by a specific customer. Additionally, companies running their own cloud data centers, for private or hybrid clouds, have no way of measure and charging back the departments in the company that are using these shared cloud resources. In both cases, the lack of determine shared resource costs and to charge them back to the company, department or user that is using this resources is limited a clear measure of business benefit and impacting company’s ability to measure the Return on Investment (ROI). An IT chargeback system is an accounting strategy that applies the costs of IT services, hardware or software to the business unit in which they are used. This system contrasts with traditional IT accounting models in which a centralized department bears all of the IT costs in an organization and those costs are treated simply as corporate overhead. Showback involves showing the IT costs to a department or customer but not actually charging them for their IT usage. Showback is a gradual method of introducing chargeback into an enterprise. Most companies implement a show back mechanism before a full chargeback system is put in place. Oracle chargeback product: Oracle Enterprise Manager provides tools for defining detailed Chargeback plans spanning different metrics collected for each type of resources as well as defining Cost Centers for grouping costs across multiple developers. Chargeback plans can use not only usage based costs, but also configuration based costs (e.g. version of the platform) or fixed costs (e.g. flat-rate management fee). Chargeback has rich out of the box reports. Trending reports show how charge and resource consumption varies over time, while Summary reports show the breakdown of charges or usage by different dimensions such as Cost Center or Target Type. These reports help consumers in understanding how their charges relate to their consumption and also assist the IT department with budgeting and planning activities. With BI Publisher, the reports can be made available in a variety of formats such as PDF, HTML, Word, Excel or PowerPoint.

    Read the article

  • Disable XF86Back and XF86Forward (back/forward on Lenovo Thinkpad)

    - by Nicolas Raoul
    My Thinkpad R500 has back/forward keys just about the direction keys, so on Firefox I keep losing entered text, accidentally. How to disable these back/forward keys? Excerpt from xev: KeyPress event, serial 29, synthetic NO, window 0x5e00001, root 0xbc, subw 0x0, time 2375874, (1279,794), root:(1285,881), state 0x10, keycode 166 (keysym 0x1008ff26, XF86Back), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 32, synthetic NO, window 0x5e00001, root 0xbc, subw 0x0, time 2377115, (1279,794), root:(1285,881), state 0x10, keycode 167 (keysym 0x1008ff27, XF86Forward), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False

    Read the article

  • Rotate an image and get back to its original position - opengles glkit

    - by Manoj
    I need to rotate an image in opengles GLkit and get it back to its original position in GLkit. rotation += 5; _modelViewMatrix = GLKMatrix4Rotate( _modelViewMatrix, GLKMathDegreesToRadians(5), 1, 0, 0); _modelViewMatrix = GLKMatrix4Rotate( _modelViewMatrix, GLKMathDegreesToRadians(rotation), 1,0,0); I need to move it in x axis for certain amount and getting back to its original position from where it started. How should i do it?

    Read the article

  • How Many Back Links Do You Need?

    When you first embark on a link-building campaign, it seems pretty daunting to think about building hundreds or even thousands of links back to your site. If you are a beginner to link building, you may be wondering how many back links are enough?

    Read the article

  • How to Get Quality Back Links

    While doing a search engine optimization of a website, one of the most important things is to get quality back-links for your website. There are several ways of getting quality back-link for your website.

    Read the article

  • Disable XF86Back and XF86Forward (browser back/forward on Lenovo Thinkpad)

    - by Nicolas Raoul
    My Thinkpad R500 has back/forward keys just about the direction keys, so on Firefox I keep losing entered text, accidentally. How to disable these back/forward keys? Excerpt from xev: KeyPress event, serial 29, synthetic NO, window 0x5e00001, root 0xbc, subw 0x0, time 2375874, (1279,794), root:(1285,881), state 0x10, keycode 166 (keysym 0x1008ff26, XF86Back), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 32, synthetic NO, window 0x5e00001, root 0xbc, subw 0x0, time 2377115, (1279,794), root:(1285,881), state 0x10, keycode 167 (keysym 0x1008ff27, XF86Forward), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False

    Read the article

  • Getting Niche Specific Natural Back Links

    The only way your niche sites can become popular is by getting maximum natural back links. Search engines like it when your page is linked as a reference to some topic. These links have excellent anchor text in them. The websites which link back to your pages are also of the related category. This is an added bonus.

    Read the article

  • Catching an exception class within a template

    - by Todd Bauer
    I'm having a problem using the exception class Overflow() for a Stack template I'm creating. If I define the class regularly there is no problem. If I define the class as a template, I cannot make my call to catch() work properly. I have a feeling it's simply syntax, but I can't figure it out for the life of me. #include<iostream> #include<exception> using namespace std; template <class T> class Stack { private: T *stackArray; int size; int top; public: Stack(int size) { this->size = size; stackArray = new T[size]; top = 0; } ~Stack() { delete[] stackArray; } void push(T value) { if (isFull()) throw Overflow(); stackArray[top] = value; top++; } bool isFull() { if (top == size) return true; else return false; } class Overflow {}; }; int main() { try { Stack<double> Stack(5); Stack.push( 5.0); Stack.push(10.1); Stack.push(15.2); Stack.push(20.3); Stack.push(25.4); Stack.push(30.5); } catch (Stack::Overflow) { cout << "ERROR! The stack is full.\n"; } return 0; } The problem is in the catch (Stack::Overflow) statement. As I said, if the class is not a template, this works just fine. However, once I define it as a template, this ceases to work. I've tried all sorts of syntaxes, but I always get one of two sets of error messages from the compiler. If I use catch(Stack::Overflow): ch18pr01.cpp(89) : error C2955: 'Stack' : use of class template requires template argument list ch18pr01.cpp(13) : see declaration of 'Stack' ch18pr01.cpp(89) : error C2955: 'Stack' : use of class template requires template argument list ch18pr01.cpp(13) : see declaration of 'Stack' ch18pr01.cpp(89) : error C2316: 'Stack::Overflow' : cannot be caught as the destructor and/or copy constructor are inaccessible EDIT: I meant If I use catch(Stack<double>::Overflow) or any variety thereof: ch18pr01.cpp(89) : error C2061: syntax error : identifier 'Stack' ch18pr01.cpp(89) : error C2310: catch handlers must specify one type ch18pr01.cpp(95) : error C2317: 'try' block starting on line '75' has no catch handlers I simply can not figure this out. Does anyone have any idea?

    Read the article

  • CLR 4.0 inlining policy? (maybe bug with MethodImplOptions.NoInlining)

    - by ControlFlow
    I've testing some new CLR 4.0 behavior in method inlining (cross-assembly inlining) and found some strage results: Assembly ClassLib.dll: using System.Diagnostics; using System; using System.Reflection; using System.Security; using System.Runtime.CompilerServices; namespace ClassLib { public static class A { static readonly MethodInfo GetExecuting = typeof(Assembly).GetMethod("GetExecutingAssembly"); public static Assembly Foo(out StackTrace stack) // 13 bytes { // explicit call to GetExecutingAssembly() stack = new StackTrace(); return Assembly.GetExecutingAssembly(); } public static Assembly Bar(out StackTrace stack) // 25 bytes { // reflection call to GetExecutingAssembly() stack = new StackTrace(); return (Assembly) GetExecuting.Invoke(null, null); } public static Assembly Baz(out StackTrace stack) // 9 bytes { stack = new StackTrace(); return null; } public static Assembly Bob(out StackTrace stack) // 13 bytes { // call of non-inlinable method! return SomeSecurityCriticalMethod(out stack); } [SecurityCritical, MethodImpl(MethodImplOptions.NoInlining)] static Assembly SomeSecurityCriticalMethod(out StackTrace stack) { stack = new StackTrace(); return Assembly.GetExecutingAssembly(); } } } Assembly ConsoleApp.exe using System; using ClassLib; using System.Diagnostics; class Program { static void Main() { Console.WriteLine("runtime: {0}", Environment.Version); StackTrace stack; Console.WriteLine("Foo: {0}\n{1}", A.Foo(out stack), stack); Console.WriteLine("Bar: {0}\n{1}", A.Bar(out stack), stack); Console.WriteLine("Baz: {0}\n{1}", A.Baz(out stack), stack); Console.WriteLine("Bob: {0}\n{1}", A.Bob(out stack), stack); } } Results: runtime: 4.0.30128.1 Foo: ClassLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null at ClassLib.A.Foo(StackTrace& stack) at Program.Main() Bar: ClassLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null at ClassLib.A.Bar(StackTrace& stack) at Program.Main() Baz: at Program.Main() Bob: ClassLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null at Program.Main() So questions are: Why JIT does not inlined Foo and Bar calls as Baz does? They are lower than 32 bytes of IL and are good candidates for inlining. Why JIT inlined call of Bob and inner call of SomeSecurityCriticalMethod that is marked with the [MethodImpl(MethodImplOptions.NoInlining)] attribute? Why GetExecutingAssembly returns a valid assembly when is called by inlined Baz and SomeSecurityCriticalMethod methods? I've expect that it performs the stack walk to detect the executing assembly, but stack will contains only Program.Main() call and no methods of ClassLib assenbly, to ConsoleApp should be returned.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >