Search Results

Search found 5817 results on 233 pages for 'multi threading'.

Page 5/233 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Multi Threading - How to split the tasks

    - by Motig
    if I have a game engine with the basic 'game engine' components, what is the best way to 'split' the tasks with a multi-threaded approach? Assuming I have the standard components of: Rendering Physics Scripts Networking And a quad-core, I see two ways of multi-threading: Option A ('Vertical'): Using this approach I can allow one core for each component of the engine; e.g. one core for the Rendering task, one for the Physics, etc. Advantages: I do not need to worry about thread-safety within each component I can take advantage of special optimizations provided for single-threaded access (e.g. DirectX offers a flag that can be set to tell it that you will only use single-threading) Option B ('Horizontal'): Using this approach, each task may be split up into 1 <= n <= numCores threads, and executed simultaneously, one after the other. Advantages: Allows for work-sharing, i.e. each thread can take over work still remaining as the others are still processing I can take advantage of libraries that are designed for multi-threading (i.e. ... DirectX) I think, in retrospect, I would pick Option B, but I wanted to hear you guys' thoughts on the matter.

    Read the article

  • my multi boot can't boot to XP 'resumeobject' is missing

    - by GwenKillerby
    In my multi boot set up, booting to vista and 7 goes fine, but when I try to boot to XP, i get an error Windows failed to start. A recent hardware or software change might be the cause. To fix the problem: 1. Insert your Windows installation disc and restart your computer. 2. Choose your language settings, and then click "Next." 3. Click "Repair your computer." If you do not have this disc, contact your system administrator or computer manufacturer for assistance. File: \NTLDR Status: 0xc000000e Info: The selected entry could not be loaded because the application is missing or corrupt. See below. Clearly the resumeobject seems to be missing in the XP entry ("Real Mode Boot sector"), only I don't know how to restore it. Vista is on **C:**, Win7 is on **F:** (as is the bootmgr ??? ) and WinXP is on **E:** What I've tried: [1] I've used about 5 windows discs, that is the Recovery Consoles from real XP install CD's and 3 virtual Recovery Consoles. All failed. The real CD's work ONE time, but won't let me finish, I only got as far as [b]fixboot E:[/b] Then they shut the laptop down, I kid you not. On a next startup, all 5 CD's ask me for some Admin password that I've never added! [2] I have VisualBCD and EasyBCD, but the most obvious things I tried there didn't solve the problem. So know I don't exactly know what to do with them. [3] I CAN boot into XP with the FIX NTLDR workaround of http://milescomer.com/tinyempire.com/notes/ntldrismissing.htm, but it doesn't fix it permanently QUESTION: How do I fix it permanently? bcdedit /enum output: Windows Boot Manager -------------------- identifier {bootmgr} device partition=F: path \bootmgr description Windows Boot Manager locale en-US default {current} displayorder {current} {812e27a9-27b7-11e4-8fb4-dfa8174ae8dc} {812e27ac-27b7-11e4-8fb4-dfa8174ae8dc} timeout 30 resume No Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.exe description Vista locale nl-NL osdevice partition=C: systemroot \Windows resumeobject {73d8b5bc-2764-11e4-b181-806e6f6e6963} Windows Boot Loader ------------------- identifier {812e27a9-27b7-11e4-8fb4-dfa8174ae8dc} device partition=F: path \Windows\system32\winload.exe description Daisy Etta locale en-US osdevice partition=F: systemroot \Windows resumeobject {b8c234a4-27b0-11e4-b8b3-806e6f6e6963} Real-mode Boot Sector --------------------- identifier {812e27ac-27b7-11e4-8fb4-dfa8174ae8dc} device partition=E: path \NTLDR description XP Thank you.

    Read the article

  • System.Threading.ThreadAbortException executing WCF service

    - by SURESH GIRIRAJAN
    In one of our prod server we recently ran into issue when we went and update the web.config and try to browse the service. We started seeing the service was not responding and getting the following warning in the application log. Our service is WCF service, BizTalk orchestration exposed as service. We have other prod server where we never ran into this issue, so what’s different with this server. After going thru lot of forum and came up on some Microsoft service pack and hot fix which related to FCN. But I don’t want to apply any patch on this server then we need to do on all the other servers too. So solution is simple, I dropped the existing website, created a new site with different name with updated web.config browse the service. Then dropped that site and recreate the original web site and it worked fine without any issue. Event Viewer:  Event Type:        Warning Event Source:    ASP.NET 2.0.50727.0 Event Category:                Web Event Event ID:              1309 Date:                     6/6/2011 Time:                    5:41:42 PM User:                     N/A Computer:          PRODP02 Description: Event code: 3005 Event message: An unhandled exception has occurred. Event time: 6/6/2011 5:41:42 PM Event time (UTC): 6/6/2011 9:41:42 PM Event ID: a71769f42b304355a58c482bfec267f2 Event sequence: 3 Event occurrence: 1 Event detail code: 0  Application information:     Application domain: /LM/W3SVC/518296899/ROOT/PortArrivals-2-129518698821558995     Trust level: Full     Application Virtual Path: /TESTSVC     Application Path: D:\inetpub\wwwroot\RFID\TESTSVC\     Machine name: PRODP02  Process information:     Process ID: 8752     Process name: w3wp.exe     Account name: domain\BizTalk_Svc_Hostlso  Exception information:     Exception type: ThreadAbortException     Exception message: Thread was being aborted.  Request information:     Request URL: http://localhost:81/TESTSVC/TESTSVCS.svc     Request path: /TESTSVC/TESTSVCS.svc     User host address: 127.0.0.1     User:      Is authenticated: False     Authentication Type:      Thread account name: domain\BizTalk_Svc_Hostlso  Thread information:     Thread ID: 22     Thread account name: domain\BizTalk_Svc_Hostlso     Is impersonating: False     Stack trace:    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)    at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)  at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)    at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)  <Description>Handling an exception.</Description> <AppDomain>/LM/W3SVC/518296899/ROOT/TESTSVC-6-129518741899334691</AppDomain> <Exception> <ExceptionType>System.Threading.ThreadAbortException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType> <Message>Thread was being aborted.</Message> <StackTrace> at System.Threading.Monitor.Enter(Object obj) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state) at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2() at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke() at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks() at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state) at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped) </StackTrace> <ExceptionString>System.Threading.ThreadAbortException: Thread was being aborted.    at System.Threading.Monitor.Enter(Object obj)    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)    at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)    at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)</ExceptionString>

    Read the article

  • multi boot: xp + xp + xubuntu, how to?

    - by Jassano
    My laptop (with a single harddrive) currently has xp + xubuntu dual boot. I want to make that triple boot: xp + xp + xubuntu Please don't ask why, take it as given. How can I accomplish this triple boot? I tried using gparted to add a partition (worked!), used dd to clone the xp install to the new partition (worked!), edited grub (my bootloader) to list a third entry pointing to the correct device (worked!). But regardless of which of the two xp entries in grub I select I still get booted into one and the same XP. The files for the other XP show up under D: so I know they're there alright. I have edited the boot.ini on the new partition so everything looks to be in order. What do I need to do to change that and make both xp instances bootable in this scenario?

    Read the article

  • How to reference other locations in making multi-boot live cd

    - by Nrew
    There is a tool in pen drive linux that allows you to boot directly with multiple iso files. And here is a sample in the menu.lst which allows you to choose which iso file you want to boot. title Fedora 13 find --set-root /Fedora-12-i686-L.iso map /ubuntu-10.04-desktop-i386.iso (0xff) map --hook root (0xff) kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/ubuntu-10.04-desktop-i386.iso splash initrd /casper/initrd.lz I'm just using it on my 8gb flash drive and the location of the iso file is in the flash drive itself. Is it possible to reference other locations. So that I could boot from it, without limitations. because the flash drive can only contain 8gb of data. Is it possible? Anyone here tried this before?

    Read the article

  • Fortigate 80C multi wan

    - by emamdouh
    I've Fortigate 80c and two internet lines from two separate ISPs. I'm trying to distribute sessions between both internet lines following http://docs-legacy.fortinet.com/cb/html/index.html#page/FOS_Cookbook/Install_advanced/routing_ecmp_basic.html , but it seems connections go through just one of two internet lines. I have "wan1 as it's configured first, and I could edit static route table to be wan2 instead of wan1", but not both of internet lines I have. Any ideas why this happens? Thanks in advance

    Read the article

  • Control which os is booted on multi-boot system

    - by mooware
    I am setting up a server with multiple operating systems for the automatic testruns of my company's product. I'd like to be able to control with a script which OS boots up after a restart, so I could say for example "after the windows run, boot into linux". I thought of using the windows bootloader for all OSes, because it should be easy to just change the default entry in C:\boot.ini to whichever system I want to boot. Is this a feasible way of doing this? Are there better options?

    Read the article

  • Add multi monitor option to remote desktop web access

    - by Eds
    I have a test environment for a remote desktop farm with a connection broker load balancing logins across remote desktop session host servers. All servers are built on Server 2012 R2. Using rd web access, we can access this farm from anywhere. When logging in via web access, you can choose the screen resolution or use full screen. If you have two monitors when selecting full screen, it will always use both your monitors. Does anyone know how to adjust the RDWeb page so that you can choose whether or not to use both your monitors? This option is in the GUI from RDP 6.1 onwards, so I would imagine there is a way to also add it the web access page.

    Read the article

  • Multi server management

    - by user788721
    We are running a website that allow users to create their own content, then share it through an iframe. We would like to get more servers to host the user content, and the main one for our website. Each user has a link like xxxx.com/content989856, xxxx.com/content45454545 We were thinking of two options : using a htaccess on the main server that will redirect to the good server but the problem is that if the main server is out, then all the content is out as well using subdomain depending on where the content is hosted, but then if we change the user content from one domain to another one, we will have to change his links as well Do you know a better option or is that really the only two available ? I am wondering how big websites like youtube handle this problem. Thank you very much for your help,

    Read the article

  • Android multi-touch support

    - by Zdenek F
    Hi, I wonder if is the Android multi-touch support reliable? I've read it suffers from some problems. I also wonder, how can I define custom multi-touch gestures? Like: 3 fingers rotate or 3 fingers stay static and fourth is moving. I've come across some resources (Gestures or MotionEvent on developer.android.com) but nothing states it clearly. Regards, Zdenek

    Read the article

  • ASIHTTP: multi threads and multi UIPorgressView

    - by user262325
    Hello everyone I have a project to download multi files (fileurl). It display the each thread on a UITableView. In UITableView - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row=[indexPath row]; NSInteger section=[indexPath section]; //UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"any-cell"]; static NSString *SimpleTableIdentifier1 = @"SimpleTableIdentifier1"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: SimpleTableIdentifier1]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier: SimpleTableIdentifier1] autorelease]; } UIProgressView *aUIProgressView; aUIProgressView =[[UIProgressView alloc] initWithFrame:CGRectMake( 10.9f,48.0f,300.0f,28.0f)]; [aUIProgressView setTag:row]; [aUIProgressView setProgress:0]; [cell addSubview:aUIProgressView]; [self startADownloadThread : [[downloadArray objectAtIndex:row] getURL] progressview:switchView ]; [aUIProgressView release]; [cell setText: [[downloadArray objectAtIndex:row] getURL]]; return cell; } It calls 'startADownloadThread' - (IBAction)startADownloadThread:(NSString *)fileurl progressview:(UIProgressView *)a { [a setProgress:0]; NSLog(@"Value: %f", [a progress]); [networkQueue cancelAllOperations]; [networkQueue setDownloadProgressDelegate:a]; [networkQueue setDelegate:self]; [networkQueue setRequestDidFinishSelector:@selector(requestDone:)]; [networkQueue setShowAccurateProgress:true]; NSURL *url = [NSURL URLWithString:fileurl]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDelegate:self]; [networkQueue addOperation:request]; [networkQueue go]; } I hope each aUIProgressView display the download progress of each download thread. The above source codes : Display the aUIProgressView list correctly, but only the last aUIProgressView link to a thread display the correct progress, others' value are 0 Welcome any comment Thanks interdev

    Read the article

  • Hey, Google: It’s Time to Add Multi-Window Multitasking To Android

    - by Chris Hoffman
    In 2012, Google’s Dianne Hackborn threatened to revoke CyanogenMod’s access to the Android Market if they moved forward with adding “Cornerstone” multitasking to their custom ROM. Samsung has since created their own multi-window multitasking feature. Dianne Hackborn said this “is something that needs to be done at the mainline platform level” so apps wouldn’t break. She was right — Android needs this as a standard feature and it’s time for Google to provide it. Doesn’t Android Have Multitasking? Android originally stood out from Apple’s iOS with its powerful multitasking. Applications can continue running in the background while you’re using another application. This makes Android powerful — you can even have BitTorrent clients downloading files in the background while using another app. Android still kept the design of a single app on screen at a time. This made a lot of sense when Android only ran on smartphones with small screens. Today, Android runs on everything from smaller smartphones all the way up to huge “phablets” like the Galaxy Note. Android has gone beyond phones and runs on 12-inch tablets, convertibles with keyboard docks, laptops, and even Android desktops. Android isn’t just a phone operating system. Samsung’s Multi-Window Isn’t Good Enough Samsung has tried to add value to Android by adding a multi-window feature. When you’re using a high-end phone like the Galaxy Note or Galaxy S, or a Galaxy tablet, you have the ability to run certain apps side-by-side with each other. There are big problems here. This only works on Samsung devices, and only on specific Samsung devices. To add support for this feature in a way that doesn’t break other apps, Samsung’s multi-window feature also only works with specific apps. You can’t just run any app in multi-window view, only the apps on the Multi Window bar Samsung provides. This prevents third-party apps from breaking, which is what Google was worried about with CyanogenMod’s Cornerstone feature. A feature that only works with a handful of apps on specific devices from a single manufacturer isn’t good enough. This feature needs to work on every Android device — or at least ones with suitably large screens and powerful enough internals. It needs to be an Android platform feature so application developers can ensure their apps will work properly with it on every device. Android developers shouldn’t have to add support for each manufacturer’s own multi-window feature if other manufacturers decide to copy Samsung. Floating Apps Are a Dirty Hack Floating apps also enable real multitasking. Remember that Android allows apps to run in the background while you’re using an app in the foreground. These apps can present interfaces that appear floating above the current app — think of it like using “always on top” to make a window always appear over every other app on a desktop operating system. You can install floating apps to browse the web, take notes, chat, and watch videos while using any app. Only apps specifically designed to run as floating apps will work, so you have to seek them out. Floating apps are also awkward to use because they float over the app you’re using, blocking parts of its interface. Microsoft added floating-window support to Skype for Android. You can have a video conversation and the other person’s face will always appear on your screen, even when you leave the Skype app. Microsoft is using more of Android’s multi-window multitasking power than Google is. Custom ROMs and Root-Only Tweaks Aren’t Acceptable Some custom ROMs are adding this feature to Android. Google threatened to revoke CyanogenMod’s access to the Android Market (now known as Google Play) if they added this feature because it could potentially break third-party apps. Today, other custom ROMs are working on split-screen multitasking. Samsung added their own version to their own devices. You can also get this feature by using a root-only Xposed Framework tweak known as XMultiWindow. If you have root access, you can get multi-window multitasking or any app on your device. This shouldn’t require rooting your device or installing a custom ROM. These third-party solutions often have awkward interfaces and bugs. We need an integrated, supported solution that works the same on every device. Why Multi-Window is Important Microsoft’s Windows 8.1 stands out among tablet operating systems for its powerful multitasking support, allowing you to view several apps side-by-side at the same time. Apple is also reported to be working on adding side-by-side apps to the iPad with iOS 8. On every competitor’s operating system, you’ll be able to view a web page while you write an email, watch a video while you browse the web, or chat with someone while you do anything else. But Android’s still remained frozen in time. Despite all Android’s underlying power — and despite the way Android allows apps to adapt to different screen sizes — Google is resisting adding this feature. Large-screen Android tablets like the Nexus 10 (remember that tablet Google hasn’t updated in over 18 months?) need this feature. So do huge phones, convertibles, laptops, and Android desktops. If tablets are the future of personal computing, we should be able to do more than one thing at a time on our tablets’ big screens. Microsoft, Samsung, and even Apple are realizing this — now it’s Google’s turn. Image Credit: Sergey Galyonkin on Flickr, Karlis Dambrans on Flickr

    Read the article

  • Low-level 10-finger multi-touch data on the Nexus 7?

    - by Croad Langshan
    I'm considering getting a Nexus 7 to do some multi-touch development on Ubuntu in the run-up to 13.04 (i.e., now :-). What APIs, /dev files, or protocols are available, or could be made available with not too much work on my part? What data is available from the device? The data I want to get my hands on is -- if I can -- the same as I get from /dev/uinput/event* from an Apple Magic Trackpad, viz: positions of all touches (could be as many as 10 simultaneous touches, but much more typically 6 or fewer) their size/pressure (in both x and y directions) their angle their identity -- i.e. an integer that is somewhat reliably preserved across touch events, for as long as a finger doesn't lift off the surface Not all of this data is essential -- but the more of it there is, the merrier.

    Read the article

  • How to assemble a multi-project ant build system

    - by Alex Worden
    At my new gig, they use Ant and cannot be persuaded to move to Maven. I've looked everywhere for a decent example of how a multi-project ant build system should be assembled. The apache site falls short. I'm looking specifically for best practices to: Automatically build local projects that are dependencies of a project Share artifacts from project to their dependents Export a project's dependencies and generated artifacts (jars) to be inherited by dependent projects Share third-party dependencies between projects I'm sure I can do all this without using Ivy - what did people do before Ivy? I really don't want to have to set up a corporate repository or rely on external repositories - the engineers here are really against that and have all their third-party jars checked into src control. Can anyone point me at a good open source example of a multi-project ant build?

    Read the article

  • Multi-lingual Applications

    - by Bobby Harrell
    I came accross this thread about multi-lingual applications. I really liked the second answer and I am trying to implement it. Can I ask if anyone has example codes of the search scripts and of a translator program or web service I could use. I use C# if that helps. The secion dealing with: MessageBox(Localize("Hello"), Localize("Title"), MB_OK); RegOpenKey(NoLocalize("\\SOFTWARE\\RegKey"), ...); I am trying to follow those ideas. Here is the link to the Article in question: http://stackoverflow.com/questions/490297/what-are-the-best-practices-for-building-multi-lingual-applications-on-win32 Thank you very much Bobby

    Read the article

  • System.Threading.Timer keep reference to it.

    - by Daniel Bryars
    According to [http://msdn.microsoft.com/en-us/library/system.threading.timer.aspx][1] you need to keep a reference to a System.Threading.Timer to prevent it from being disposed. I've got a method like this: private void Delay(Action action, Int32 ms) { if (ms <= 0) { action(); } System.Threading.Timer timer = new System.Threading.Timer( (o) => action(), null, ms, System.Threading.Timeout.Infinite); } Which I don't think keeps a reference to the timer, I've not seen any problems so far, but that's probably because the delay periods used have been pretty small. Is the code above wrong? And if it is, how to I keep a reference to the Timer? I'm thinking something like this might work: class timerstate { internal volatile System.Threading.Timer Timer; }; private void Delay2(Action action, Int32 ms) { if (ms <= 0) { action(); } timerstate state = new timerstate(); lock (state) { state.Timer = new System.Threading.Timer( (o) => { lock (o) { action(); ((timerstate)o).Timer.Dispose(); } }, state, ms, System.Threading.Timeout.Infinite); } The locking business is so I can get the timer into the timerstate class before the delegate gets invoked. It all looks a little clunky to me. Perhaps I should regard the chance of the timer firing before it's finished constructing and assigned to the property in the timerstace instance as negligible and leave the locking out.

    Read the article

  • Using Clojure instead of Python for scalability (multi core) reasons, good idea?

    - by Vandell
    After reading http://clojure.org/rationale and other performance comparisons between Clojure and many languages, I started to think that apart from ease of use, I shouldn't be coding in Python anymore, but in Clojure instead. Actually, I began to fill irresponsisble for not learning clojure seeing it's benefits. Does it make sense? Can't I make really efficient use of all cores using a more imperative language like Python, than a lisp dialect or other functional language? It seems that all the benefits of it come from using immutable data, can't I do just that in Python and have all the benefits? I once started to learn some Common Lisp, read and done almost all exercices from a book I borrowod from my university library (I found it to be pretty good, despite it's low popularity on Amazon). But, after a while, I got myself struggling to much to do some simple things. I think there's somethings that are more imperative in their nature, that makes it difficult to model those thins in a functional way, I guess. The thing is, is Python as powerful as Clojure for building applications that takes advantages of this new multi core future? Note that I don't think that using semaphores, lock mechanisms or other similar concurrency mechanism are good alternatives to Clojure 'automatic' parallelization.

    Read the article

  • Multi lined Multi styled button

    - by user1321811
    Hi i'm trying to recreate this button style more specifically the 'view basket' button. waitrose app The button needs to have multiple lines of text each with a different text size and font colour etc. Here's the code so far. I've created the button and its displays correctly but when you click on it the state pressed isn't working. Where am I going wrong. Thanks in advance. xml button file: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:state_pressed="true" android:state_focused="true" android:background="@drawable/button_bg" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Some Text" android:state_pressed="false" android:state_focused="false" android:textColor="#ffffff" /> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Some Text" android:state_pressed="false" android:state_focused="false" android:textColor="#ffffff" /> </LinearLayout> java file code: package com.buttons2; import com.buttons2.R; import android.app.Activity; import android.os.Bundle; import android.widget.Button; public class Buttons2Activity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button) findViewById(R.id.button1); setContentView(R.layout.button); } }

    Read the article

  • Prototype Multi-Event Observation for Multi-Elements

    - by Phonethics
    ['element1','element2','element3'].each(function(e){ Event.observe(e, 'click', function(event){ ... }); Event.observe(e, 'blur', function(event){ ... }); Event.observe(e, 'mousedown', function(event){ ... }); Event.observe(e, 'mouseover', function(event){ ... }); }); Is there a way to reduce this so that I can do ['element1','element2','element3'].each(function(e){ Event.observe(e, ev, function(event){ switch(e){ switch (ev) } }); }); ?

    Read the article

  • Automatic multi-page multi-column flowing text with QtWebkit (HTML/CSS/JS -> PDF)

    - by Peter Boughton
    I have some HTML documents that are converted to PDF, using software that renders using QtWebkit (not sure which version). Currently, the documents have specific tags to split into columns and pages - so whenever the wording changes, it is a manual time-consuming process to move these tags so that the columns and pages fit. Can anyone provide a way to have text auto-wrapped into the next column/page (as appropriate) when it reaches the bottom of the current container? Any HTML, CSS or JS supported by QtWebkit is ok (assuming it works in the PDF converter). (I have tested the webkit-column-* in CSS3 and it appears QtWebkit does not support this.) To make things more exciting, it also needs to: - put a header at the top of each page, with page X of Y numbering; - if an odd number of pages, add a blank page at the end (with no header); - have the ability to say "don't break inside this block" or "don't break after this header" I have put some quick example initial markup and target markup to help explain what I'm trying to do. (The actual documents are far more complicated than that, but I need a simple proof-of-concept before I attack the real ones.) Any suggestions? Update: I've got a partially working solution using Aaron's "filling up" suggestion - I'll post more details in a bit.

    Read the article

  • Sign Up/Login system for multi-domain/multi-server

    - by David
    I'm thinking about a good solution for implementing a sign up/login system that works across different domains and servers. A working example is Olx (you can register in one domain, and your login will work in the rest of domains). The scenario is that every domain (one per country) has its own database. And there will be 2 servers (for example), each one will have the 50% of the domains (and so the 50% of databases). What would you suggest to start with? Database: MySQL 5.1 Server-side language: PHP 5.3 (I will be using Symfony 1.4, so if someone has some suggestion for this framework, it will be interesting too, although it is optional)

    Read the article

  • using multi-markers with multi info-windows

    - by mohsen
    I have an array of info-windows corresponding to an array of markers. Now, I have a problem, I use the below code to generate an info-window, when clicking on the marker all the markers disappear unless one, also when I click on that marker there is no info-window come out. What is the wrong with my code ? or what shall I do ? Any answer will be very appreciated, Thanks in advance. This code is inside a for loop: infoWindoArray[i][j] = new google.maps.InfoWindow({ content:"Lat: "+this.position.lat() + "\nLng: " + this.position.lng() + "\n"+ this.customInfo, }); google.maps.event.addListener(AllMarkers[i][j], 'click', (function(x) { return function() {infoWindoArray[i][j].open(map,AllMarkers[i][j]);} })(x));

    Read the article

  • exporting html table multi line columns to excel multi line cells

    - by Passat
    I have a html table in a view MVC4 that I am sending to excel as output. Inside the view page I have some columns that have multiple lines that are built with forloops within the HTML. What's the best way to add the or \r\n so that excel renders it correctly? I have a table and inside I build each row looping thru a recordset. In each row I also loop thru different recordsets to populate columns within each row so that some of the columns may contain more than one value and they should show in different lines in the table that will export to excel.

    Read the article

  • Detecting Hyper-Threading state

    - by jchang
    To interpret performance counters and execution statistics correctly, it is necessary to know state of Hyper-Threading. In principle, at low overall CPU utilization, for non-parallel execution plans, it should not matter whether HT is enabled or not. Of course, DBA life is never that simple. The state of HT does matter at high over utilization and in parallel execution plans depending on the DOP. SQL Server does seem to try to allocate threads on distinct physical cores at intermediate DOP (DOP less...(read more)

    Read the article

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