Search Results

Search found 5133 results on 206 pages for 'max krug'.

Page 54/206 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • DroidGap: how get webpage?

    - by Max Usanin
    My source: public class MainActivity extends DroidGap { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/index.html"); } @Override public boolean dispatchTouchEvent(MotionEvent e) { super.dispatchTouchEvent(e); // Now what page ?? return true; } How to get the current web page?

    Read the article

  • Git: Checkout only files without repository?

    - by Max
    Hi, i'd like to just checkout the files without the .git files and the whole repository. It's because i'd like to manage a website (php & html) with git and i'm looking for an easy way to update the files in the htdocs folder from the repository, without having the repository public. (now it's in the home-dir and is accessed via ssh, but i have to put the new files to htdocs manually.

    Read the article

  • Getting rid of function's argument

    - by Max
    It is better to explain my intention with code. So right now I have the following code: class A, IInterfaceUsedByB { } class B { void func(A someObject) { func2(someObject, 1); func3(someObject, "string"); func4(someObject, new MyObject()); } func2(A someObject, int val); func3(A someObject, string val); func4(A someObject, C val); } Where func2, func3, func4 do need references to someObject. I want to change this to void func() { with(someObject, () => { func2(1); func3("string"); func4(new MyObject()); } ); } Or even better to void func(someObject) { func2(1); func3("string"); func4(new MyObject()); } So that I don't have to drag this someObject around, but I should still be able to use it inside func2,3,4. I can use any of the three languages (C#, F# or IronPython) for this. UPDATE In the ideal solution class B would be independent of A. func* functions only depend on a small interface of A consisting of 2 methods.

    Read the article

  • Running the script for the 2-nd time, the messages are not retrieved from the mail server

    - by Max Li
    I read the mails from my gmail account with the code following below. import poplib pop_conn = poplib.POP3_SSL('pop.gmail.com') pop_conn.user('user') # result: '+OK send PASS' pop_conn.pass_('password') # result: '+OK Welcome.' print pop_conn.list()[1] pop_conn.quit() It shows me 1 message as expected. However, if I run this script for the second time, I get 0 messages as result. On the server the message is still there and unread. How can I get all the messages also running the script for the second time? For me it behaves as an email client that doesn't download the same mail twice. Is there some flag to force the program to download everything again? I use python 2.7.x on ubuntu 12.10

    Read the article

  • Creating instance of interface in C#

    - by Max
    I'm working with MS Excel interop in C# and I don't understand how this particular line of code works: var excel = new Microsoft.Office.Interop.Excel.Application(); where Microsoft.Office.Interop.Excel.Application is an INTERFACE defined as: [Guid("000208D5-0000-0000-C000-000000000046")] [CoClass(typeof(ApplicationClass))] public interface Application : _Application, AppEvents_Event { } I'm thinking that some magic happens when the interface is decorated with a CoClass attribute, but still how is it possible that we can create an instance of an interface with a new keyword? Shouldn't it generate a compile time error?

    Read the article

  • BlackBerry - Multiple Screens or Single Screen with Content Manager?

    - by Max Gontar
    Hi! I've seen projects which use many screens each one for different layout and functionality. I've seen projects with only one screen (like wizard workflow) where content is changed on user interaction (and this seems to be logical to use single screen in wizards). But also I've seen projects (apps like game or messenger or phone settings utility) which use single screen for different functionalities. I can see such advantages of having single screen in app: keep same decoration design and menu or toolbar (which may be also achieved with inheritance) keep single screen in ui stack (which may be achieved by pop/push screen) easy to handle data over application Can you tell other advantages/disadvantages of single screen app? When its better to use this approach? Thank you!

    Read the article

  • How to get google app engine logs in C#?

    - by Max
    I am trying to retrieve app engine logs the only result I get is "# next_offset=None", below is my code: internal string GetLogs() { string result = _connection.Get("/api/request_logs", GetPostParameters(null)); return result; } private Dictionary<string, string> GetPostParameters(Dictionary<string, string> customParameters) { Dictionary<string, string> parameters = new Dictionary<string, string>() { { "app_id", _settings.AppId }, { "version", _settings.Version.ToString() } }; if (customParameters != null) { foreach (string key in customParameters.Keys) { if (parameters.ContainsKey(key)) { parameters[key] = customParameters[key]; } else { parameters.Add(key, customParameters[key]); } } } return parameters; }

    Read the article

  • Can I override a group policy setting as a machine admin?

    - by Max
    Group policy prevents several configuration settings on my Windows 7 / Vista machines. Since my domain account is a member of the local Administrators group on these boxes, is there still a way to override them locally? For instance, GP prevents changing the power management option "Turn off the display" (even changing it from cmd fails: POWERCFG -X -monitor-timeout-ac 60 = "An unexpected error condition has occurred. Unable to perform operation. You may not have permission to perform this operation.") Even when logging on with a local account and not the domain account, it's not possible to change the setting anymore ..

    Read the article

  • Common strategies to deal with rounding errors in currency-intensive soft?

    - by Max
    What is your advice on: compensation of accumulated error in bulk math operations on collections of Money objects. How is this implemented in your production code? (things like variable rounding, etc...) theory behind rounding in accountancy. any literature on topic. I currently read Fowler. He mentions Money type, but says nothing on strategies. Older posts on money-rounding (here, and here) do not provide a details and formality I need. Thanks for help.

    Read the article

  • How do I generate a RouteLink to a route in a different area?

    - by Max Schmeling
    I have two different areas, and I have a route in one of those areas that is specific to that area, but I need to generate a link to that route using Html.RouteLink from another area (it's how you get over into the new area) but it won't work... It doesn't seem possible to use RouteLink to routes in a different area. What is the best way around this? Should I just define a new route in the other area and name it differently?

    Read the article

  • Importing data from many excel workbooks and sheets into a single workbook/table

    - by Max Rusalen
    Hi, I have 54 excel files with three sheets each, each sheet has a different amount of data entries but they are set out in a identical format, and I need to import the data from those sheets into a single workbook using VBA. Is there any way I can program it so I can build the loops to import the data, but without having to write in each workbook name for each loop/sheet? I think I can use the call function, but I don't know how to make the loop codes independent of the workbook name they apply to. Thank you so much in advance, Millie

    Read the article

  • String comparison in Java

    - by Kliver Max
    I want to compare two strings using Java. First sting name i get from .mif file using GDAL in cp1251 encoding. Second kadname i get from jsp. To compare i do this: if (attrValue instanceof String) { String string3 = new String((attrValue.toString()).getBytes("ISO-8859-1"), "cp1251"); dbFeature.setAttribute(name, string3); System.out.println("Name=" + name); System.out.println("kadname=" + kadname); if (name.equalsIgnoreCase(kadname)) { kadnum = string3; System.out.println("string3" + string3); } } And in console i get this: Name = kadnumm kadname = kadnumm Whats wrong with this?

    Read the article

  • try finally block around every Object.Create?

    - by max
    Hi, I have a general question about best practice in OO Delphi. Currently, I but a try finally block around everywhere, where I create an object, to free that object after usage (to avoid memory leaks). E.g.: aObject := TObject.Create; try aOBject.AProcedure(); ... finally aObject.Free; end; instead of: aObject := TObject.Create; aObject.AProcedure(); .. aObject.Free; To you think, it is good practice, or too much overhead? And what about the performance?

    Read the article

  • a mathematical problem

    - by Max
    Hi i need a function that should give me a 10th or 100th array, for example if i pass 5, it should return 1 to 10 if i pass 67, it should return 1 to 100 if i pass 126, it should return 101 to 200 if i pass 2524, it should return 2001 to 3000 Any guidance?

    Read the article

  • reading files provided via $_GET

    - by Max
    I have a php script which takes a relative pathname via $_GET, reads that file and creates a thumbnail of it. I dont want the user to be able to read any file from the server. Only files from a certain directory should be allowed, otherwiese the script should exit(). Here is my folder structure: files/ <-- all files from this folder are public my_stuff/ <-- this is the folder of my script that reads the files My script is accessed via mydomain.com/my_stuff/script.php?pathname=files/some.jpg. What should not be allowed e. g.: mydomain.com/my_stuff/script.php?pathname=files/../db_login.php So, here is the relevant part of the script in my_stuff folder: ... $pathname = $_GET['pathname']; $pathname = realpath('../' . $_GET['pathname']); if(strpos($pathname, '/files/') === false) exit('Error'); ... I am not really sure about that approach, doesnt seem too safe for me. Anyone with a better idea?

    Read the article

  • should a student be diversifying or mastering programming languages?

    - by Max Link
    As the question states, is it better if a student diversifies or explores when learning programming languages or should they focus only on 2-3 languages and really get to know them well? Example of what I mean by diversifying: Functional -> Scheme Procedural -> C Object Oriented -> Java Dynamic or scripting -> Python Other -> C++ I have a few breaks in between semesters sometimes (up to 3 months) and I'm thinking of either learning a new language or "master" those that I know right now. Which would benefit me in the future? I know some(about 3 months of self studying each) Java, C, and C++ already . If I'm not mistaken, where I live, the industry is heavy on Java, C++, and C#.

    Read the article

  • How to execute query with empty fields?

    - by Kliver Max
    I have a SQL Query: SELECT documents.*, t_rights.rights, documents_list.docs FROM documents INNER JOIN t_rights on t_rights.num=documents.type_right INNER JOIN documents_list on documents_list.num=documents.document1 WHERE code_document=1 or code_document=1 In case if i have fields documents.document1 and documents.document1 with some value all works fine. But if this field empty i get empty query result. Its possible make query like this with empty fields?

    Read the article

  • including .h files.

    - by Max
    Suppose I have two .h files: A.h and B.h. Moreover, A.h includes B.h itself: B.h - declares class B. class B { ... }; A.h - declares class A, which uses class B. #include B.h class A { void SomeFunction(const B& b); }; Now, I have some .cpp file, that uses both A and B classes (B class maybe used not only in A::SomeFunction(B)) What are the pluses to include both A.h and B.h (instead of only A.h) from the perspective of design-patterns and coding style.

    Read the article

  • Wrong class type in objective C

    - by Max Hui
    I have a parent class and a child class. GameObjectBase (parent) GameObjectPlayer(child). When I override a method in Child class and call it using [myPlayerClass showNextFrame] It is calling the parent class one. It turns out in the debugger, I see the myPlayerClass was indeed class type GameObjectBase (which is the parent class) How come? GameObjectBase.h #import <Foundation/Foundation.h> #import "cocos2d.h" @class GameLayer; @interface GameObjectBase : NSObject { /* CCSprite *gameObjectSprite; // Sprite representing this game object GameLayer *parentGameLayer; */ // Reference of the game layer this object // belongs to } @property (nonatomic, assign) CCSprite *gameObjectSprite; @property (nonatomic, assign) GameLayer *parentGameLayer; // Class method. Autorelease + (id) initWithGameLayer:(GameLayer *) gamelayer imageFileName:(NSString *) fileName; // "Virtual methods" that the derived class should implement. // If not implemented, this method will be called and Assert game - (void) update: (ccTime) dt; - (void) showNextFrame; @end GameObjectPlayer.h #import <Foundation/Foundation.h> #import "GameObjectBase.h" @interface GameObjectPlayer : GameObjectBase { int direction; } @property (nonatomic) int direction; @end GameLayer.h #import "cocos2d.h" #import "GameObjectPlayer.h" @interface GameLayer : CCLayer { } // returns a CCScene that contains the GameLayer as the only child +(CCScene *) scene; @property (nonatomic, strong) GameObjectPlayer *player; @end When I call examine in debugger what type "temp" is in this function inside GameLayer class, it's giving parent class GameObjectBase instead of subclass GameObjectPlayer - (void) update:(ccTime) dt { GameObjectPlayer *temp = _player; [temp showNextFrame]; }

    Read the article

  • Faster way of initializing arrays in Delphi

    - by Max
    I'm trying to squeeze every bit of performance in my Delphi application and now I came to a procedure which works with dynamic arrays. The slowest line in it is SetLength(Result, Len); which is used to initialize the dynamic array. When I look at the code for the SetLength procedure I see that it is far from optimal. The call sequence is as follows: _DynArraySetLength - DynArraySetLength DynArraySetLength gets the array length (which is zero for initialization) and then uses ReallocMem which is also unnecessary for initilization. I was doing SetLength to initialize dynamic array all the time. Maybe I'm missing something? Is there a faster way to do this?

    Read the article

  • How does Ruby's Array.| compare elements for equality?

    - by Max Howell
    Here's some example code: class Obj attr :c, true def == that p '==' that.c == self.c end def <=> that p '<=>' that.c <=> self.c end def equal? that p 'equal?' that.c.equal? self.c end def eql? that p 'eql?' that.c.eql? self.c end end a = Obj.new b = Obj.new a.c = 1 b.c = 1 p [a] | [b] It prints 2 objects but it should print 1 object. None of the comparison methods get called. How is Array.| comparing for equality?

    Read the article

  • Anyone help me! java basic question

    - by Max
    How can I get a specific value from an object? I'm trying to get a value of an instance for eg. ListOfPpl newListOfPpl = new ListOfPpl(id, name, age); Object item = newListOfPpl; How can I get a value of name from an Object item?? Even if it is easy or does not interest you can anyone help me??

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >