w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to disable the pinch-zoom gesture on Windows8 laptops
In IE10 (and soon other browsers), the easiest way to prevent touch pinch zoom in HTML/CSS/JS is to use the touch-action CSS property (vendor prefixed in IE10). The default value is "auto", which includes panning, pinch zoom, and double tap zoom by default in IE10. You can override with just the touch behaviors that you want enabled: html { -ms-touch-action: pan-x pan-y; /* Enables only panning */ } For more, see the W3C Standard for Pointer Events: http://www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch-behaviors

Categories : C#

Serial communication between two Linux running laptops using Python
Reading a serial device is as easy as reading a file: import serial com = serial.Serial('/dev/ttyUSB0',baudrate=115200) print "Waiting for message" char = com.read(1) print char com.close()

Categories : Python

Styling for various screen resolutions (smart phones, tablets, laptops, etc.)
honestly I would use a site like this to redirect users to appropriate subdomains with their own respective css. If you opt not to do such a thing, I would suggest just using css to scale all the media based on screen size using values such as max-width: 100% and width:auto9. Another good tutorial would be this youtube video good luck!

Categories : Android

Zurb Foundation visibility classes for ultrabooks and hybrid laptops
Foundation 4 uses Modernizr for detecting support for the Touch Events API in browsers, not touch devices. I think your best 'fix' for the problem is to sniff the user-agent to see if it matches the relevant one Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Touch) , taken from User-agent string. To make it future proof, maybe just see if the user-agent string ends in Touch and contains Windows. If you detect such a user-agent then have Modernizr execute alternative code (you decide what). I see the current Foundation 4 version uses a custom Modernizr build, namely Build: http://modernizr.com/download/#-inlinesvg-svg-svgclippaths-touch-shiv-mq-cssclasses-teststyles-prefixes-ie8compat-load. In order to write a custom test for Modernizr, you'll need Modernizr.addTest, w

Categories : CSS

changing swf through revers engineering
I assume you have permission from the people who made those games to modify them in this way, in that case I recommend asking them for the source code and recompiling the games with the features you want. If you don't have permission then you shouldn't be doing this, so don't.

Categories : Actionscript

Reverse engineering on a php function
It's just a regular class method: class Traslator{ public function trans($a, $b, $c){ return 'Hello world'; } } Now, you only need another class method called get() that returns an instance of the previous class: class Foo{ public function get(){ return new Traslator; } } Full code: <?php class Traslator{ public function trans($a, $b, $c){ return 'Hello world'; } } class Foo{ public function get(){ return new Traslator; } public function test(){ ?> <?=$this->get('translator')->trans('dashboard.actions', array(), 'front');?> <?php } } $f = new Foo; $f->test();

Categories : PHP

Numpy engineering notation
I think that this topic might be helpful for you. On the other hand, I would try to create a few "buckets" for values in specific ranges and check a simple condition > (lowest value in range), then multiply that value by a range, e.g. 2e-5 by 1e6 to get 20u. Not quite efficient, but easy.

Categories : Python

Reverse engineering a GET request parameter
HTTP GET request parameters are passed in query string, so you just can just take a look at resulting request URL. Cookies are passed in HTTP request headers; you can use browser developer tools (Chrome DevTools / Firebug / IE Developer Tools) to look at request headers.

Categories : Http

How secure is proguard against reverse engineering?
Generally, You can make the crackers life harder. The harder you make it, the fewer will remain. Especially if the financial incentive is limited. Your code obfuscation options are: Use proguard, it does a good job, not perfect of course, but good Use DexGuard, which can make reverse engineering even harder, like by encrypting strings, or detecting code tampering Write critical parts in C Regardless of code obfuscation, make your network protocol also hard to mess around with: encrypt and sign messages, make sure messages can not be repeated (by using time or a sequence), and authenticate the client Don't save on disk any clear texts that are sensitive.

Categories : Android

Hibernate Reverse Engineering Exception
I spent the whole day trying to resolve this issue... and did learn a lot (although am still confused about JPA stuff a bit). The issue is due to using following line in the "hibernate.cfg.xml" file: <property name="dialect">org.hibernate.dialect.SQLServer2005Dialect</property> Changing the property to "org.hibernate.dialect.SQLServerDialect" solved the issue and exception disappeared.

Categories : Hibernate

Reverse engineering Delphi code - UML
To the best of my knowledge, the IDE's built in UML diagram support does not reverse engineer code into diagrams. Various third party tools claim this ability, for example ModelMaker, Enterprise Architect, Rational Rose, etc.

Categories : Delphi

Reverse engineering Crontab string
Have never used it but CronExpressionDescriptor seems to be what you're looking for, click here to see a live demo. CronExpressionDescriptor on GitHub CronExpressionDescriptor on NuGet

Categories : C#

Reverse engineering Javascript behind Google+ button
VICTORY! Well for me at least =p the SAPISIDHASH I was looking for was the one in the api console. Automation for rather large job, totally legitimate. Anyways -> the one I found was a SHA1 on the current javascript milliseconds timestamp plus your current SAPISID from your cookie plus the domain origin In order for my request to work I had to include the following headers in the request Authorization:SAPISIDHASH 1439879298823_<hidden sha1 hash value> and X-Origin:https://console.developers.google.com The first header I assume tells the server your timestamp and your sha1 value. The second ( breaks if you don't include it ) tells it the origin to use in the sha1 algorithm. I found the algorithm by digging through and debugging the hell out of tons of minified js NOTE there are sp

Categories : Javascript

Reverse engineering C codes with GCC -march=i686
In this case, you can find out that the each registers corresponding to a variable: %eax - var %ebx - a contextual temporary variable %ecx - x %edx - y If you mean 'exactly' for the identifiers, it is only possible when a special structure named 'symbol table'. (compiled with -g flag in GCC) Anyway, you should know a code can be always optimized by the compiler. It means, in this case, your code is changed to another having same mathematical meaning. If your code is backward-translated, it should be like this. int test(int x, int y) { int val; if (y > 0) { if (x < y) val = x - y; else val = x ^ y; } else { if (y < -2) val = x + y; else val = 4 * x; } return val; } If you wan

Categories : C

Engineering a better solution than getting a whole HTML document with AJAX
animate the content change with some pretty javascript visual effects. Please don't. Anyway, you seem to be looking for a JS MVC framework like Knockout. Using such a framework, you can let the server return models, represented in JSON or XML, which a little piece of JS transforms into HTML, using various ways of templating and annotations. So instead of doing the model-to-HTML translation serverside and send a chunk of HTML to the browser, you just return a list of business objects (say, Addresses) in a way the browser (or rather JS) understands and let Knockout bind that to a grid view, input elements and so on.

Categories : Javascript

Stanford Engineering Everywhere CS106B C++ Libraries in XCode 4.6.2
I just ran into this problem myself after upgrading to the newest version of xcode (ver. 5.0, OSX ver. 10.8.5). Try switching the architecture of the project to 32-bit Intel (i386). The default is "Standard Architectures 64-bit Intel (x86_64)".

Categories : C++

ASP NET Code First Existing database - no reverse engineering
You should install Entity Framework Power Tools extension. There is a list of new features of this tool set: Summary of Commands As there is mentioned: Reverse Engineer Code First - Generates derived DbContext class, POCO classes, and Code First mapping classes for an existing database.

Categories : C#

What is difference between Digital Forensic and Reverse Engineering?
Digital Forensic practice usually involves: looking at logfiles doing recovery of unlinked filesystem objects (e.g deleted files) recovering browsing history through cache, etc. looking at timestamps of files (usually for the purpose of law enforcement) Reverse Engineering usually involves determining how something works by: looking at binary file formats of multiple files (or executables) to determine patterns decompilation of binary executables to determine intent of the code black-boxing and/or debugging of known-good applications to determine nominal behaviour with respect to data. (usually for the purpose of interoperability) They're completely different activities. EDIT: so many typos.

Categories : Debugging

Python Decimal - engineering notation for mili (10e-3) and micro (10e-6)
The decimal module is following the Decimal Arithmetic Specification, which states: to-scientific-string – conversion to numeric string [...] The coefficient is first converted to a string in base ten using the characters 0 through 9 with no leading zeros (except if its value is zero, in which case a single 0 character is used). Next, the adjusted exponent is calculated; this is the exponent, plus the number of characters in the converted coefficient, less one. That is, exponent+(clength-1), where clength is the length of the coefficient in decimal digits. If the exponent is less than or equal to zero and the adjusted exponent is greater than or equal to -6, the number will be converted to a character form without using exponential notation. [...] to-eng

Categories : Python

sqlite3 select of BIGINT returns engineering representation
SQLite's largest data type is signed 64-bit integer, or floating-point. If you want to store larger numbers exactly, you have to store them as strings.

Categories : Sqlite

Reverse engineering what version of ruby and rails a project was developed under
If there is no Gemfile, it points to the Rails app being 2.3 or earlier. As for the Web server, they are interchangeable, but there is really very little chance that they were using Webrick, due to its ability (or lack thereof) to handle many concurrent requests. Chances are, they were using mongrel, or passenger via Apache or Nginx.

Categories : Ruby On Rails

Enterprise Architect Reverse Engineering: 'Unexpected symbol' error
Your code contains usage of a macro definition (SIMMDLENVv01_EXPORT) that isn't part of EA's standard macro definitions (there's whole a lot of them covering ATL and MFC mostly). You'll need to add additional ones under 'Settings->Language Macros' (as the hint in the error message suggests). NOTE Use the syntax MACRO() when declaring macros that were #defined to receive any number of arguments. If you're trying to reverse engineer framework libraries like Qt or alike, you'll need to set many of these that you're able to reverse engineer the code without getting errors. May be you should think of a different strategy to reference these types and classes in your model then. Another workaround might be to solely preprocess all the code you want to import first, and import from the preproce

Categories : C++

Simulate MySQL connection to analyze queries to rebuild table structure (reverse-engineering tables)
Crazy task. Is the code such that the DB queries are at all abstracted? Could you replace the query functions with something which would log the tables, columns and keys, and/or actually create the tables or alter them as needed, before firing off the real query? Alternatively, it might be easier to do some text processing, regex matching, grep/sort/uniq on the queries in all of the PHP files. The goal would be to get it down to a manageable list of all tables and columns in those tables.

Categories : PHP

What is the easiest way to get ZedGraph to use scientific notation instead of engineering notation?
I couldn't figure out an automatic way to do this, but it's only one line of code to do it manually: zedGraph1.GraphPane.YAxis.Scale.Mag = (int)Math.Floor(Math.Log10(zedGraph1.GraphPane.YAxis.Scale.Max));

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.