Search Results

Search found 1872 results on 75 pages for 'magic trackpad'.

Page 7/75 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • WinAPI magic (TCM_ADJUSTRECT message) and MONO runtime

    - by Luca
    I'm trying to get the same result of a .NET application (see the link Hide TabControl buttons to manage stacked Panel controls for details), but using the MONO runtime instead of the MS .NET runtime. Pratically, when the custom control is executed using the MONO runtime, the underlying message is not sent to the control, causing the tab pages to be shown... There is a portable solution which is elegant as the linked one? If it is not possible, what are possible workarounds (apart from removing/adding tabs at runtime)?

    Read the article

  • How to set up Mac Os X like dragging behaviour on Linux

    - by ticking
    I would like to use Linux(Fedora) on a Aluminum MacBook Pro, but since the Touchpad on a MacBook Pro is only a giant button Apple does some custom tracking. When there is one finger placed, and a second follows (the click can occur before or after that) it will be interpreted as a drag. So the strong thumb can be used to hold pressure and the more accurate index finger can do the pointing. But Linux interprets this as a right click, since it only cares if two fingers are on the pad. Is there a way to achieve said behaviour? Cheers Jan

    Read the article

  • Merging exists and not exists into one query - oracle magic

    - by stic
    Hi, In a WHERE part of query we have SELECT * FROM SomeTable st WHERE NOT EXISTS (SELECT 1 FROM Tab t1 WHERE t1.A = st.A OR t1.B = st.A) OR EXISTS (SELECT 1 FROM Tab t2 WHERE (t2.A = st.A OR t2.B = st.A) AND t2.C IS NULL) Seems like a good candidate for merging... But I'm staring on that for an hour without any idea. Would you have some thoughts? Thanks,

    Read the article

  • magic records being deleted

    - by chris
    i have customised oscommerce to pull in a csv file of products, delete anything thats not with an image/proper description/proper title gets removed. The import runs on a cron job basis pulling information from a supplier, it hasnt run since yesterday but a product has disappeared- Anyone who has used oscommerce will know that, product information is stored over multiple tables. example is- products product_description and so on. the thing that has got me that the information is deleted from the product table but not from the product_description table. The product that is being deleted is a manually input one which carries a special tag/prefix on the model item of the product table. Therefore shouldn't be touched at all. Am clueles as what is going on. Is there mysql integrity checks deleting records? could there be another plugin working on oscommerce?

    Read the article

  • Where to learn about VS debugger 'magic names'

    - by Gael Fraiteur
    If you've ever used Reflector, you probably noticed that the C# compiler generates types, methods, fields, and local variables, that deserve 'special' display by the debugger. For instance, local variables beginning with 'CS$' are not displayed to the user. There are other special naming conventions for closure types of anonymous methods, backing fields of automatic properties, and so on. My question: where to learn about these naming conventions? Does anyone know about some documentation? My objective is to make PostSharp 2.0 use the same conventions. Thank you!

    Read the article

  • C# - retrieve file path from config file - @ doesn't do it's magic

    - by Bart
    Hi guys, I'm currently working on a web service that retrieves an XML message, archives it and then processes it further. The archive folder is read from the Web.config. This is what the archive method looks like private void Archive(System.Xml.XmlDocument xmlDocument) { try { string directory = System.Configuration.ConfigurationManager.AppSettings.Get("ArchivePath"); ParseMessage(xmlDocument); directory = string.Format(@"{0}\{1}\{2}", @directory, _senderService, DateTime.Now.ToString("MMMyyyy")); System.IO.Directory.CreateDirectory(directory); string Id = _messageID; string senderService = _senderService; xmlDocument.Save(directory + @"\" + DateTime.Now.ToString("yyyyMMdd_") + Id + "_" + System.Guid.NewGuid().ToString().Substring(0, 13) + ".xml"); } The path structure I retrieve is C:\Program Files\Subfolder\Subfolder. In the development, QA, UAT and PRD environments everything works fine. But on another machine I now need to install the web service on (which I cannot debug, unfortunately), the directory string is 'C:Files'. Just to be sure I double checked the .NET version on the different machines (I thought perhaps the usage of @ before a string was version-dependent); all machines use 2.0.50727. Does anyone recognize this problem? Thanks in advance!

    Read the article

  • Can PHP Perform Magic Instantiation?

    - by Aiden Bell
    Despite PHP being a pretty poor language and ad-hoc set of libraries ... of which the mix of functions and objects, random argument orders and generally ill-thought out semantics mean constant WTF moments.... ... I will admit, it is quite fun to program in and is fairly ubiquitous. (waiting for Server-side JavaScript to flesh out though) question: Given a class class RandomName extends CommonAppBase {} is there any way to automatically create an instance of any class extending CommonAppBase without explicitly using new? As a rule there will only be one class definition per PHP file. And appending new RandomName() to the end of all files is something I would like to eliminate. The extending class has no constructor; only CommonAppBase's constructor is called. Strange question, but would be nice if anyone knows a solution. Thanks in advance, Aiden (btw, my PHP version is 5.3.2) Please state version restrictions with any answer.

    Read the article

  • last_login_at not working (null) w/ Authlogic Magic Columns...

    - by bgadoci
    I am using the Authlogicgem for authentication and most of it seems to be working great. Authlogic provides several columns that you can add to your Users table (for example) that it knows to fill in if they are present. i.e. login_count, current_login_ip, last_request_at and last_login_at. All seem to be working fine with the exception of the last_login_at field which is null for each user. Is there anything specific that could be causing this perhaps having to do with the user sessions, etc? I can post code if needed but wasn't sure what would relate to this.

    Read the article

  • CSS, Internet Explorer and the magic !ie

    - by Kirk Bentley
    I came across this strange bit of CSS tonight... display: inline !ie; Now I've created and seen a lot of CSS and I have never seen this before or it's magical powers. You can add "!ie" at the end of any rule and it will only be applied by M$ Internet Explorer 6 & 7 Can anyone shed any light on this WTF?

    Read the article

  • dynamic access magic constants in php

    - by Radu
    Hello, Is there a way to shortcut this: function a($where){ echo $where; } function b(){ a(basename(__FILE__).'::'.__FUNCTION__.'()::'.__LINE__); } to something like this: define("__myLocation__", ''.basename(__FILE__).'::'.__FUNCTION__.'()::'.__LINE__.''); function a($where){ echo $where; } function b(){ a(__mYLocation_); } I know that this cannot be done with constants (is just an theoretical example), but I can't find a way to shorthen my code. If a use a function to get my line it will get the line where that function is not the line from where the function was called. I usualy call a function that prints directly to the log file, but in my log I need to know from where the function was called, so i use basename(__FILE__).'::'.__FUNCTION__.'()::'.__LINE__ this will print something like: index.php::b()::6 It is a lot of code when you have over 500 functions in different files. Is there a shorten or better way to do this? Thank you.

    Read the article

  • Magic Method __set() on a Instantiated Object

    - by streetparade
    Ok i have a problem, sorry if i cant explaint it clear but the code speaks for its self. i have a class which generates objects from a given class name; Say we say the class is Modules: public function name($name) { $this->includeModule($name); try { $module = new ReflectionClass($name); $instance = $module->isInstantiable() ? $module->newInstance() : "Err"; $this->addDelegate($instance); } catch(Exception $e) { Modules::Name("Logger")->log($e->getMessage()); } return $this; } The AddDelegate Method: protected function addDelegate($delegate) { $this->aDelegates[] = $delegate; } The __call Method public function __call($methodName, $parameters) { $delegated = false; foreach ($this->aDelegates as $delegate) { if(class_exists(get_class($delegate))) { if(method_exists($delegate,$methodName)) { $method = new ReflectionMethod(get_class($delegate), $methodName); $function = array($delegate, $methodName); return call_user_func_array($function, $parameters); } } } The __get Method public function __get($property) { foreach($this->aDelegates as $delegate) { if ($delegate->$property !== false) { return $delegate->$property; } } } All this works fine expect the function __set public function __set($property,$value) { //print_r($this->aDelegates); foreach($this->aDelegates as $k=>$delegate) { //print_r($k); //print_r($delegate); if (property_exists($delegate, $property)) { $delegate->$property = $value; } } //$this->addDelegate($delegate); print_r($this->aDelegates); } class tester { public function __set($name,$value) { self::$module->name(self::$name)->__set($name,$value); } } Module::test("logger")->log("test"); // this logs, it works echo Module::test("logger")->path; //prints /home/bla/test/ this is also correct But i cant set any value to class log like this Module::tester("logger")->path ="/home/bla/test/log/"; The path property of class logger is public so its not a problem of protected or private property access. How can i solve this issue? I hope i could explain my problem clear.

    Read the article

  • Black Magic in Grails Data Binding!?

    - by Tiago Alves
    As described in http://n4.nabble.com/Grails-Data-Binding-for-One-To-Many-Relationships-with-REST-tp1754571p1754571.html i'm trying to automatically bind my REST data. I understand now that for one-to-many associations the map that is required for the data binding must have a list of ids of the many side such as: [propName: propValue, manyAssoc: [1, 2]] However, I'm getting this exception Executing action [save] of controller [com.example.DomainName] caused exception: org.springframework.orm.hibernate3.HibernateSystemException: IllegalArgumentException occurred calling getter of com.example.DomainName.id; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.example.DomainName.id However, even weirder is the update action that is generated for the controller. There we have the databinding like this: domainObjectInstance.properties = params['domainObject'] But, and this is the really weird thing, params['domainObject'] is null! It is null because all the domainObject fields are passed directly in the params map itself. If I change the above line to domainObjectInstance.properties = null the domainObject is still updated! Why is this happening and more important, how can I bind my incoming XML automatically if it comes in this format (the problem is the one-to-many associations): <product> <name>Table</name> <brand id="1" /> <categories> <category id="1" /> <category id="2" /> </categories> </product>

    Read the article

  • Magic Method __set() on a Instanciated Object

    - by streetparade
    Ok i have a problem, sorry if i cant explaint it clear but the code speaks for its self. i have a class which generates objects from a given class name; Say we say the class is Modules: public function name($name) { $this->includeModule($name); try { $module = new ReflectionClass($name); $instance = $module->isInstantiable() ? $module->newInstance() : "Err"; $this->addDelegate($instance); } catch(Exception $e) { Modules::Name("Logger")->log($e->getMessage()); } return $this; } The AddDelegate Method: protected function addDelegate($delegate) { $this->aDelegates[] = $delegate; } The __call Method public function __call($methodName, $parameters) { $delegated = false; foreach ($this->aDelegates as $delegate) { if(class_exists(get_class($delegate))) { if(method_exists($delegate,$methodName)) { $method = new ReflectionMethod(get_class($delegate), $methodName); $function = array($delegate, $methodName); return call_user_func_array($function, $parameters); } } } The __get Method public function __get($property) { foreach($this->aDelegates as $delegate) { if ($delegate->$property !== false) { return $delegate->$property; } } } All this works fine expect the function __set public function __set($property,$value) { //print_r($this->aDelegates); foreach($this->aDelegates as $k=>$delegate) { //print_r($k); //print_r($delegate); if (property_exists($delegate, $property)) { $delegate->$property = $value; } } //$this->addDelegate($delegate); print_r($this->aDelegates); } class tester { public function __set($name,$value) { self::$module->name(self::$name)->__set($name,$value); } } Module::test("logger")->log("test"); // this logs, it works echo Module::test("logger")->path; //prints /home/bla/test/ this is also correct But i cant set any value to class log like this Module::tester("logger")->path ="/home/bla/test/log/"; The path property of class logger is public so its not a problem of protected or private property access. How can i solve this issue? I hope i could explain my problem clear.

    Read the article

  • Apple MagicMouse randomly loses connection

    - by Yuval
    My Magic Mouse periodically randomly loses connection to my macbook, sitting approximately a foot and a half away from it. There are no software updates available for Snow Leopard (10.6.3). I have a bluetooth keyboard (that sits a little closer to the macbook, though I'm not sure this is the issue) that rarely suffers from this problem. Google results mostly suggest to update the software but I have the most updated version of it already. Does anybody have any idea what could be causing the issue? Is this simply a defective mouse? Additional info: I tried replacing the batteries with new ones, making sure they are sitting tightly in their position with no change in behavior (still disconnects periodically). Also, this doesn't seem to be a problem that the mouse is turning itself off to save battery - it does not reconnect when I move or click it. If I wait long enough (a couple of minutes) it reconnects on its own. Otherwise I have to go to the bluetooth menu with my macbook touchpad and choose "yuval's mouse - Connect"

    Read the article

  • Why my /usr/share/file/magic is not found, in PHP at CentOS?

    - by Vincenzo
    This is what I'm doing: $ php <?php $finfo=finfo_open(FILEINFO_MIME, '/usr/share/file/magic'); This is what I'm getting: PHP Notice: finfo_open(): Warning: description `8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data enco' truncated in - on line 2 PHP Notice: finfo_open(): Warning: description `8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data enco' truncated in - on line 2 PHP Notice: finfo_open(): Warning: <= not supported in - on line 2 PHP Notice: finfo_open(): Warning: <= not supported in - on line 2 PHP Notice: finfo_open(): Warning: <= not supported in - on line 2 PHP Notice: finfo_open(): Warning: >= not supported in - on line 2 PHP Warning: finfo_open(): Failed to load magic database at '/usr/share/file/magic'. in - on line 2 This is a clean CentOS 5.5 installation, PHP 5.3. The file /usr/share/file/magic exists and is accessible.

    Read the article

  • Is MarshalByRefObject special?

    - by Vilx-
    .NET has a thing called remoting where you can pass objects around between separate appdomains or even physical machines. I don't fully understand how the magic is done, hence this question. In remoting there are two base ways of passing objects around - either they can be serialized (converted to a bunch of bytes and the rebuilt at the other end) or they can inherit from MarshalByRefObject, in which case .NET makes some transparent proxies and all method calls are forwarded back to the original instance. This is pretty cool and works like magic. And I don't like magic in programming. Looking at the MarshalByRefObject with the Reflector I don't see anything that would set it apart from any other typical object. Not even a weird internal attribute or anything. So how is the whole transparent proxy thing organized? Can I make such a mechanism myself? Can I make an alternate MyMarshalByRefObject which would not inherit from MarshalByRefObject but would still act the same? Or is MarshalByRefObject receiving some special treatment by the .NET engine itself and the whole remoting feat is non-duplicatable by mere mortals?

    Read the article

  • Hello, T4MVC &ndash; Goodbye, ASP.NET MVC &ldquo;magic strings&rdquo;

    - by Brian Schroer
    I’m working on my first ASP.NET MVC project, and I really, really like MVC. I hate all of the “magic strings”, though: <div id="logindisplay"> <% Html.RenderPartial("LogOnUserControl"); %> </div> <div id="menucontainer"> <ul id="menu"> <li><%=Html.ActionLink("Find Dinner", "Index", "Dinners")%></li> <li><%=Html.ActionLink("Host Dinner", "Create", "Dinners")%></li> <li><%=Html.ActionLink("About", "About", "Home")%></li> </ul> </div> They’re prone to misspelling (causing errors that won’t be caught until runtime), there’s duplication, there’s no Intellisense, and they’re not friendly to refactoring tools.   I had started down the path of creating static classes with constants for the strings, e.g.: <li><%=Html.ActionLink("Find Dinner", DinnerControllerActions.Index, Controllers.Dinner)%></li> …but that was pretty tedious.   Then I discovered T4MVC (http://mvccontrib.codeplex.com/wikipage?title=T4MVC). Just add its T4MVC.tt and T4MVC.settings.t4 files to the root of your MVC application, and it magically (and this time, it’s good magic) generates code that allows you to replace the first code sample above with this: <div id="logindisplay"> <% Html.RenderPartial(MVC.Shared.Views.LogOnUserControl); %> </div> <div id="menucontainer"> <ul id="menu"> <li><%=Html.ActionLink("Find Dinner", MVC.Dinners.Index())%></li> <li><%=Html.ActionLink("Host Dinner", MVC.Dinners.Create())%></li> <li><%=Html.ActionLink("About", MVC.Home.About())%></li> </ul> </div> It gives you a strongly-typed alternative to magic strings for all of these scenarios: Html.Action Html.ActionLink Html.RenderAction Html.RenderPartial Html.BeginForm Url.Action Ajax.ActionLink view names inside controllers But wait, there’s more! It even gives you static helpers for image and script links, e.g.: <img src="<%= Links.Content.nerd_jpg %>" />   <script src="<%= Links.Scripts.Map_js %>" type="text/javascript"></script> …instead of: <img src="/Content/nerd.jpg" />   <script src="/Scripts/Map.js" type="text/javascript"></script>   Thanks to David Ebbo for creating this great tool. You can watch an eight and a half minute video about T4MVC on Channel 9 via this link: http://channel9.msdn.com/posts/jongalloway/Jon-Takes-Five-with-David-Ebbo-on-T4MVC/. You can download T4MVC from its CodePlex page: http://mvccontrib.codeplex.com/wikipage?title=T4MVC.

    Read the article

  • Docs for auto-generated methods in Ruby on Rails

    - by macek
    Rails has all sorts of auto-generated methods that I've often times struggled to find documentation for. For example, in routes.rb, if I have: map.resources :projects do |p| p.resources :tasks end This will get a plethora of auto-generate path and url helpers. Where can I find documentation for how to work with these paths? I generally understand how to work with them, but more explicit docs might help me understand some of the magic that happens behind the scenes. # compare project_path(@project) project_task_path(@project, @task) # to project_path(:id => @project.id) project_task_path(:project_id => @project.id, :id => @task.id) Also, when I change an attribute on a model, @post.foo_changed? will be true. Where can I find documentation for this and all other magical methods that are created like this? If the magic is there, I'd love to take advantage of it. And finally: Is there a complete resource for config.___ statements for environment.rb? I was able to find docs for Configuration#gem but what attributes can I set within the stubs like config.active_record.___, config.action_mailer.___, config.action_controller.___, etc. Again, I'm looking for a complete resource here, not just a settings for the examples I provided. Even if you can only answer one of these questions, please chime in. These things seem to have been hiding from me and it's my goal to get them some more exposure, so I'll be upvoting all links to docs that point me to what I'm looking for. Thanks! ps, If they're not called auto-generated methods, I apologize. Someone can teach me a lesson here, too :) Edit I'm not looking for tutorials here, folks. I have a fair amount of experience with rails; I'm just looking for complete docs. E.g., I understand how routing works, I just want docs where I can read about all of the usage options.

    Read the article

  • Reseting Macbook Pro keyboard and trackpad's power usage on Windows?

    - by Dan the Man
    I recently installed a utitlity for Windows (ASUS Ai Charger) which modifies the USB ports on the computer to output more power (for charging iPads, etc). The problem is, I believe it is also giving more power to my keyboard and trackpad. And now, neither devices are working at all, yet they work on Mac OS X. So does anyone know the amount of power MacBook Pro (2007) keyboards and trackpads use, and how I can set these settings in Windows 7?

    Read the article

  • Eliminating Magic Numbers: When is it time to say "No"?

    - by oosterwal
    We're all aware that magic numbers (hard-coded values) can wreak havoc in your program, especially when it's time to modify a section of code that has no comments, but where do you draw the line? For instance, if you have a function that calculates the number of seconds between two days, do you replace seconds = num_days * 24 * 60 * 60 with seconds = num_days * HOURS_PER_DAY * MINUTES_PER_HOUR * SECONDS_PER_MINUTE At what point do you decide that it is completely obvious what the hard-coded value means and leave it alone?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >