Tuesday, 15 May 2012

reverse engineering - How do libraries such as discutils/to interact with .PSD files work? -


I see a lot of projects, including some degree reverse engineering (some things I know very little). For example, there was an API to interact with .psd files (remove layers, add layers, add masking, etc.) on codeproject and also has a Desudit Library for C #, which interacts with ISO files. (Not sure the library's featuretakers are exactly).

I know that these types of applications need to be reverse engineering, but how can I get more information about such programs (code is open source and I will see it, but How do I have some guides to make such programs)? Obviously this is more than just putting the C # methods together.

Thanks

Partial support for the management of GIMP PSD files on their implementation Take a look and start from there.


boost - C++ swap problem in inheritance scenario -


I want to add swap functionality to two existing C ++ classes. One class gets from the other. I want the examples of each class to be swapable with examples of only one class. To make this semi-concrete, say that I have the classes Fu and Bar are received from the bar fu. I define Fu :: Swap (Foo End) and Bar :: swap (bar end). Time :: Swap Delegate Fu :: Swap I want Foo :: Swap to work only on Fu instances and work Bar: swap only on bar instances: I can not understand the method of implementing this requirement.

Here's a sample of what is giving me trouble:

  Include # lt; Algorithm & gt; # Include & lt; Iostream & gt; Structure fu {int x; Foo (int x): x (x) {}; Virtual Zero Swap (Foo and others) {std :: cout & lt; & Lt; __PRETTY_FUNCTION__ & lt; & Lt; Std :: endl; Std :: swap (this->; x, other.x); }; }; Structure bar: Public fu {int y; Bar (int x, int y): fu (x), y (y) {}; Virtual Zero Swap (bar and others) {std :: cout & lt; & Lt; __PRETTY_FUNCTION__ & lt; & Lt; ""; Fu :: swap (other); Std :: swap (this-> y, other.y); }; }; Zero display (Foo and F1, Foo and F2, Bar and B 34, Bar and B 56) {Namespace Stead. Cout & lt; & Lt; "F1:" & lt; & Lt; F1.x & lt; & Lt; Endl; Cout & lt; & Lt; "F2:" & lt; & Lt; F2.x & lt; & Lt; Endl; Cout & lt; & Lt; "B 34:" & lt; & Lt; B34.x & lt; & Lt; "" & Lt; & Lt; B34.y & lt; & Lt; Endl; Cout & lt; & Lt; "B 56:" & lt; & Lt; B56.x & lt; & Lt; "" & Lt; & Lt; B56.y & lt; & Lt; Endl; } Ent Main (Int arzak, four ** argv) {{FU F1 (1), F2 (2); Bar B34 (3,4), B 56 (5,6); Std :: cout & lt; & Lt; Std :: endl & lt; & Lt; "Initial value:" & lt; & Lt; Std :: endl; Performance (F1, F2, B34, B56); } {FU F1 (1), F2 (2); Bar B34 (3,4), B 56 (5,6); Std :: cout & lt; & Lt; Std :: endl & lt; & Lt; "After identical swap:" & lt; & Lt; Std :: endl; F1.swap (F2); // desired b34.swap (b56); // desired display (F1, F2, B34, B56); } {FU F1 (1), F2 (2); Bar B34 (3,4), B 56 (5,6); Std :: cout & lt; & Lt; Std :: endl & lt; & Lt; "Odd Members After Swap:" & lt; & Lt; Std :: endl; // b56.swap (f2); // Not compiled, excellent f1.swap (b34); // Do not compile it, but make sure how the display (f1, f2, b34, b56); } Return 0; }  

Here is the output:

  Initial value: f1: 1 f2: 2 b34: 3 4 b56: 5 6 after uniform swap: virtual zero Foo :: Swap (Foo & amp;) Virtual Void Bar :: Swap (Bar & amp;) Virtual Zero Foo: Swap (FU) F1: 2F2: 1B 34: 5 6B 56: 3 4 Odd Members swap after: Virtual Zero Foo:: Swap (Foo and F) F1: 3F2: 2B 34: 1 4B 56: 5 6  

You can see where f1.swap (b34) "sliced" b 34 leads me to a potentially bad way Do not like it, either compiled or not blown at runtime. Due to participating heritage, I feel that if I use a non-member or friend swap implementation, then I would go to the same problem.

It is helpful but the code is available.

This usage case arises because Multi_array meets mult_array_ref, it only makes sense to swap multi_array_refs with multi-functional and multidimensional.

(some laughing solutions)

Add a protected virtual method, isBaseFoo () , Make it right in fu, and false in the bar, the swap method for foo can check that its argument is BaseFoo () == true.

Evil, and only detects the problem at the time, but I can not think of anything better, though Charles Bailey's answer may be better, if you allow dynamic_cast then <


iphone - touchtouchEnded is not getting called after touchesBegan and touchMoved -


I have a strange effect with touch Sometimes when I swipe the screen slowly, touch and Touch is touched, but it is called touch, which slightly screw up my visual movements. How is it possible that touch-ended calls are not made? And leaves the screen without running my finger or anything like this !! Any tips or suggestions to understand this behavior? I really need touch to clear my attitude.

Thank you for any advice

I suspect you < Code> was tampered with: Together: without whom touched cases have been added: Together: is being invoked Have you applied that method ?


mobile - Can anyone guess what protocol these packets belong to? -


We see that these packets should be injected into FTP-DTP channels during a downlink file transfer over Telstra's NXTG mobile network. Used to be. We are not sure whether these are network-level packets, like injecting our 3G modem (HC25 based) or something like a firewall stream.

Using a tool we saw that the preparation of PPP fails with protocol length errors, so they most likely have the possibility of mobile network packets.

I hope someone will have to identify the signature of the packet so that I can pursue it with the appropriate vendor.

There is definitely one format for these packets: -

Packet 1: 00 00 00 24C4B8 7B1A0907F 43 0f a1 08 00 45 00 01 10 F 4 4 00 00 40 06 2 F13 CB 7 A 9 DE 9 7 BD DD 71 7 7 A ADE 04 06 8 C 61 5 A A 9 01 F 7 0 CEB 50 10 FF FF 58 B900 00

Packet 2: 00 00 00 24C4B8 7B1A00907F 43 0 FA1 08 00 45 00 00 FF 6B 50 00 00 40 06 B 8 22 CB 7 A 9 DE 9 7 BD DD 71 7 7A Aad 04 06 8 C 61 7 B 82 01 F 7 C EB 50 10 FF FF A3 79 00 00

Packet 3: 00 00 00 24c4b8 7b1a01 90 7f 43ff 0f 080045 00 02 205b 50 00 00 40 06 C7 01 CB7A 9DE 9 7BDD 71 527A Ed 04 068C61 7C 59 01F7CEB 50 10FF FF E250D 00 00

< P> Packet 4: 00 00 00 24c4b8 7b1a00 90f 43ff0a1 08 00 45 00 01 38d8 52 00 00 40 06 4a7 cb 7a 9d E 9 7BD 71 527A AAD 04 068C 62 42F 9 01F7 0 CEB 50 10FF FF 20 91 00 00 Packet 5: 00 00 00 24C4B8 7 B1A 00 90 7F 43 FE 08 08 45 45 00 00 D08 00 00 40 06 D6 49 CB 7 A 9 DE 9 7 BD DD 71 7 7 7 EE 04 08 4b FB 0 B8F350D51 1A 50 10FF FF E988 00 00

< P> These are common Eepi look like packets but the front was tagged with two additional 00 bytes. It is not certain why this will happen, but they appear from 00-90-7f-43-0f-a1 (watchguard) to 00-24-C4-B8-7B-1A (Cisco).

IP header 45 00 01 10F 4 4 00 00 40 06 2F13 CB7A9DE 9 7BD052 52

TCP header 7A Ed 04 06 8C 61 5D A 9 01 F7 is 0c EB 50 10FF FF 58B 9 00 00

so you can get the remaining details from there.


networking - How can I re-establish a network connection in a Perl script? -


I have a Perl code that goes to a particular website and removes the required data if I lose my connection. I have a problem: the script stops working. How can I resume the Perl script connection and start the process from where it is paused? Can I use Pearl to resume the connection if such a person can guide me with steps.

It is not possible to do a transport-level network (such as TCP / IP) Afterwards you can not get it back And the HTTP protocol does not provide a high level way of doing this.

You have to open a new HTTP connection on the server and restart your withdrawal. Whether you have to restart from the beginning, or from where the relationship was broken when you can resume close to the time of what you are bringing, how the website presents, and the client-side tool Are using to


OSGi unit testing without step that packages bundles -


A bundle related to jar up and bundle is needed. I hope this works without intermediate steps.

Imagine the ability to pack packages on your classpace so that the package can create X and Y bundle XY and make Package X and Jade Bundle Xs. The bundle XZ package will not be able to see "Y" but package X can import one service from XY. Any comments if this is possible or if a similar examination case / library exists?

I think that using the Tiny PACS bundle with OPS 4J is looking for you .


c# - Is there any way to profile .NET Framework? -


We have a complex client-server application that was developed using the .NET Framework and uses SQL Server 2005 is. We use LinqToSql but we manage the life time of all connections and we pass an open connection from any datacontent that has been created. We have also used Microsoft WF in this product.

When the server works about one or two, then we end up with some "reclaimed connection", which means that we have some SQL connections We are using all of the code and we have reviewed all the code and have used the potential means to ensure that we are closing any other connections which we are making May include. It seems almost impossible to be open for connections because there are few places where we use them.

Is there a way to find out that SqlConnection.Open () or SqlConnection.Close () . We need to know where these methods go and who was the caller (maybe it's a call stack.)

thanks

You can use or add to Visual Studio.