Search Results

Search found 4866 results on 195 pages for 'ngu soon hui'.

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

  • Debug.Assert Appears in Release Mode

    - by Ngu Soon Hui
    We all know that Debug.Assert will not be compiled into the dlls when compiled in release mode. But for some reason Debug.Assert did appear in the release version of a component I wrote. I suspect that I might have mess up my csproject setting. Any idea why Debug.Assert appears in release mode? P/S: I have double checked to make sure that I was really compiling in release mode before asking this question.

    Read the article

  • Upload files in Google App Engine

    - by Ngu Soon Hui
    I am planning to create a web app that allows users to downgrade their visual studio project files. However, It seems Google App Engine accepts files uploading and flat file storing on the Google Server through db.TextProperty and db.BlobProperty. I'll be glad anyone can provide code sample ( both the client and the server side) on how this can be done, thanks

    Read the article

  • Declare a Dictionary inside a static class

    - by Ngu Soon Hui
    How to declare a static dictionary object inside a static class? I tried public static class ErrorCode { public const IDictionary<string , string > ErrorCodeDic =new Dictionary<string, string>() { {"1","User name or password problem"} }; } But the compiler complains that "A const field of a reference type other than string can only be initialized with null".

    Read the article

  • How to copy a ram_base file to disk efficiently

    - by Hui Jin
    I want to copy a large a ram-based file (located at /dev/shm direcotry) to local disk, is there some way for an efficient copy instead of read char one by one or create another piece memory? I can use only C language here. Is there anyway that I can put the memory file directly to disk? Thanks!

    Read the article

  • Double.ToString with N Number of Decimal Places

    - by Ngu Soon Hui
    I know that if we want to display a double as a two decimal digit, one would just have to use public void DisplayTwoDecimal(double dbValue) { Console.WriteLine(dbValue.ToString("0.00")); } But how to extend this to N decimal places, where N is determined by the user? public void DisplayNDecimal(double dbValue, int nDecimal) { // how to display }

    Read the article

  • lock statement not working when there is a loop inside it?

    - by Ngu Soon Hui
    See this code: public class multiply { public Thread myThread; public int Counter { get; private set; } public string name { get; private set; } public void RunConsolePrint() { lock(this) { RunLockCode("lock"); } } private void RunLockCode(string lockCode) { Console.WriteLine("Now thread "+lockCode+" " + name + " has started"); for (int i = 1; i <= Counter; i++) { Console.WriteLine(lockCode+" "+name + ": count has reached " + i + ": total count is " + Counter); } Console.WriteLine("Thread " + lockCode + " " + name + " has finished"); } public multiply(string pname, int pCounter) { name = pname; Counter = pCounter; myThread = new Thread(new ThreadStart(RunConsolePrint)); } } And this is the test run code: static void Main(string[] args) { int counter = 50; multiply m2 = new multiply("Second", counter); multiply m1 = new multiply("First", counter); m1.myThread.Start(); m2.myThread.Start(); Console.ReadLine(); } I would expect that m2 must execute from start to finish before m1 starts executing, or vice versa, because of the lock statement. But the result I found was the call to lock first and lock second was intermingled together, i.e., something like this Now thread lock First has started Now thread lock Second has started lock First: Count has reached 1: total count is 50 lock First: Count has reached 2: total count is 50 lock Second: Count has reached 1: total count is 50 What did I do wrong?

    Read the article

  • gmail app 504 server timeout

    - by Hui
    this is the part of code I use for getting info from gmail, it's working alright on my localhost, but somehow when i deploy it online, I got 504 gateway timeout error. Did I missed something in my code? can someone give some advices , thanks a lot public class GetGmail { static String last = null; public static ArrayList run(String username, String password, String lastloggin)throws Exception { ArrayList result = null; System.out.println("Getting Gmail......"); last = lastloggin; Properties props = System.getProperties(); props.setProperty("mail.store.protocol", "imaps"); try { Session session = Session.getDefaultInstance(props, null); Store store = session.getStore("imaps"); store.connect("imap.googlemail.com", username, password); result = readMessage(store); store.close(); } catch (NoSuchProviderException e) { e.printStackTrace(); return null; } catch (MessagingException e) { e.printStackTrace(); return null; } return result; } }

    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

  • Windows 8.1 VPN Connection Crash

    - by Anthony Russell
    I am attempting to connect to a VPN that I have used for quite some time. I followed these instructions to setup my VPN on both my desktop and my surface pro Both my desktop and surface pro have all of the current updates for Windows 8.1. However, my surface pro connects to the VPN without issue and my desktop crashes when I attempt to do ANYTHING VPN related. If I Attempt to connect to a VPN it freezes and crashes without error as soon as I hit connect Attempt to remove a VPN it freezes and crashes without error as soon as I hit remove Attempt to connect to a newly created VPN it freezes and crashes without error as soon as I hit connect I have tried disabling all Windows Firewall proticols. I have tried disabling the Windows Defender antimalware shenanigans I have no other antimalware, virus or firewalls on this machine. I am at a loss on how to fix this so any insight is appreciated.

    Read the article

  • How to follow up new technologies and software releases as they come out

    - by Developer
    I don't know if this is right place to ask question, if not please move it to right area please. Is there a website/app/forum/newsletter where I can followup different softwares or technology and feature soon after their new releases. i.e. ipad iphone ios 7 release as soon as it will release with its feature. andriod next version soon after it release with its feature. coreldraw x7 whenever it will rlease zend framework new version when ever it will release. mac php new version photoshop new version ....... there are lot more list than that which goes on and on and Its difficult to follow up new technology as they come out. Any better and less time consuming way to follow up.

    Read the article

  • Open Multiple Sites Without Reopening the Menus in Firefox

    - by Asian Angel
    Are you frustrated with having to reopen your menus for each website that you need or want to view? Now you can keep those menus open while opening multiple websites with the Stay-Open Menu extension for Firefox. Stay-Open Menu in Action You can start using the extension as soon as you have installed it…simply access your favorite links in the “Bookmarks Menu, Bookmarks Toolbar, Awesome Bar, or History Menu” and middle click on the appropriate entries. Here you can see our browser opening the Productive Geek website and that the “Bookmarks Menu” is still open. As soon as you left click on a link or click outside the menus they will close normally like before. Note: Middle clicked links open in new tabs. The only time during our tests that a newly opened link “remained in the background” was for any links opened from the “Awesome Bar”. But as soon as the “Awesome Bar” was closed the new tabs automatically focused to the front. A link being opened from the “History Menu”…still open while the webpage is loading. Options The options are simple to sort through…enable or disable the additional “stay open” functions and enable automatic menu closing if desired. Conclusion If you get frustrated with having to reopen menus to access multiple webpages at one time then you might want to give this extension a try. Links Download the Stay-Open Menu extension (Mozilla Add-ons) Similar Articles Productive Geek Tips Make Firefox Use Multiple Rows of TabsDisable Web Site Window Resizing in FirefoxQuick Hits: 11 Firefox Tab How-TosPrevent Annoying Websites From Messing With the Right-Click Menu in FirefoxJatecblog Moves to How-To Geek Blogs (Linux Readers Should Subscribe) TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional StockFox puts a Lightweight Stock Ticker in your Statusbar Explore Google Public Data Visually The Ultimate Excel Cheatsheet Convert the Quick Launch Bar into a Super Application Launcher Automate Tasks in Linux with Crontab Discover New Bundled Feeds in Google Reader

    Read the article

  • Desktop icons disappears when Nautilus is launched, until next boot

    - by Santosh
    What happens: When I log in into my Ubuntu everything is normal, I have some icons on my desktop and I can see them at this point of time. As soon as I click on the explorer (nautilus) on the Launcher bar, everything goes (disappers) and never comes. No matter how many time you click on the launcher, you can't open nautilus. I tried opening nautilus from the terminal, get the following: santosh@santosh:~$ nautilus Initializing nautilus-gdu extension ** (nautilus:2158): DEBUG: SyncDaemon already running, initializing SyncdaemonDaemon object Initializing nautilus-open-terminal extension (nautilus:2158): Gtk-CRITICAL **: gtk_action_set_visible: assertion `GTK_IS_ACTION (action)' failed (nautilus:2158): Gtk-CRITICAL **: gtk_action_set_visible: assertion `GTK_IS_ACTION (action)' failed Segmentation fault I suspect on "Segmentation fault" on the last line, whats that? I was amazed when I run this command in sudo.: santosh@santosh:~$ sudo nautilus Initializing nautilus-gdu extension ** (nautilus:2216): DEBUG: Syncdaemon not running, waiting for it to start in NameOwnerChanged Initializing nautilus-open-terminal extension (nautilus:2216): Gtk-CRITICAL **: gtk_action_set_visible: assertion `GTK_IS_ACTION (action)' failed (nautilus:2216): Gtk-CRITICAL **: gtk_action_set_visible: assertion `GTK_IS_ACTION (action)' failed Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory Please ask your system administrator to enable user sharing. As soon as I type sudo nautilus and hit enter, nautilus starts and the desktop background changes (to the default which ubuntu has). Don't know why but at this point as soon as I click on Desktop (from the left pane) then nautilus closes. Did anyone has same issue? I am corrently working with commandline to do my work and its a big pain. Additional Information: Another thing I have noticed that when I want to open the location of PDF file I am reading in document viewer (by clicking the folder icon). It gives error "Could not open the containing folder" and "Failed to execute child process "nautilus" (Permission denied)". Any idea?                

    Read the article

  • New Packt Books: APEX & JRockit

    - by [email protected]
      I have received these 2 ebooks from Packt Publkishing and I am currently reviewing them. Both of them look great so far.   Oracle Application Express 3.2 - The Essentials and More First of all, I have to mention that I am new to APEX. I was interested on this product which is a development tool for Web applications on the Oracle Database. As I support JDeveloper and ADF, which are products that work very closely with the Oracle Database and are a rapid development tool as well, it is always interesting and useful to know complementary tools. APEX looks very useful and the book includes many working examples. A more complete review of this book is coming soon. Further information about this book can be seen at Packt.   Oracle JRockit: The Definitive Guide Many of our Oracle Coherence customers run their caches and clusters using JRockit. This JVM has helped us to solve lots of Service Requests. It is a really reliable, fast and stable JVM. It works great on both development and production environments with big amounts of data, concurrency, multi-threading and many other factors that can make a JVM crash. I must also mention JRockit Mission Control (JRMC), which is a great tool for management and monitoring. I really recommend it. As a matter of fact, some months ago, I created a document entitled "How to Monitor Coherence-Based Applications using JRockit Mission Control" (Doc Id 961617.1) on My Oracle Support. Also, the JRockit Runtime Analyzer (JRA) and it successor of newer versions, the JRockit Flight Recorder (JFR) are deeply reviewed. This book contains very clear and complete information about all this and more. I will post an entry with a more complete review soon (and will probably post an entry about Coherence monitoring with JRMC soon too). Further information about this book can be seen at Packt.  

    Read the article

  • Fight for your rights as a video gamer.

    - by Chris Williams
    Soon, the U.S. Supreme Court may decide whether to hear a case that could have a lasting impact on computer and video games. The case before the Court involves a law passed by the state of California attempting to criminalize the sale of certain computer and video games. Two previous courts rejected the California law as unconstitutional, but soon the Supreme Court could have the final say. Whatever the Court's ruling, we must be prepared to continue defending our rights now and in the future. To do so, we need a large, powerful movement of gamers to speak with one voice and show that we won't sit back while lawmakers try to score political points by scapegoating video games and treating them differently than books, movies, and music. If the Court decides to hear the case, we're going to need thousands of activists like you who can help defend computer and video games by writing letters to editors, calling into talk radio stations, and educating Americans about our passion for and appreciation of computer and video games. You can help build this movement right now by inviting all your friends and fellow gamers to join the Video Game Voters Network. Use our simple tool to send an email to everyone you know asking them to stand up for gaming rights: http://videogamevoters.org/movement You can also help spread the word through Facebook and Twitter, or you can simply forward this email to everyone you know and ask them to sign up at videogamevoters.org. Time after time, courts continue to reject politicians' efforts to restrict the sale of computer and video games. But that doesn't mean the politicians will stop trying anytime soon -- in fact, it means they're likely to ramp up their efforts even more. To stop them, we must make it clear that gamers will continue to stand up for free speech -- and that the numbers are on our side. Help make sure we're ready and able to keep fighting for our gaming rights. Spread the word about the Video Game Voters Network right now: http://videogamevoters.org/movement Thank you. -- Video Game Voters Network

    Read the article

  • Mobility Card in Bangalore for Transportation

    - by Rekha
    Transport Minister R Ashoka announced Bangalore Metropolitan Transport Corporation (BMTC) services are going to be best in the world soon. BMTC has planned to launch a Mobility Card with which commuters can get rides in BMTC, KSRTC and future Metro Train facilities without buying tickets for each ride. The conductor with have a simple device in which the commuters can swipe their cards to deduct the ticket tarrif for bus or metro rides automatically. This Mobility card can be obtained by paying a fixed amount. This method is time saving and the commuters can be saved from paying the exact change for tickets. Ashoka says the Volvo Vayu Vaira services have internet connectivity and voice announcements of every bus stop names and this has been appreciated by the commuters. With WiFi Connections in Shatabdi Trains soon and Mobility Cards, India is soon to match the services of US Standards. Government officials are keen in implementing these services before the end of this year. Hope all these services are well used and maintained.   This article titled,Mobility Card in Bangalore for Transportation, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • How to change system time or force a time sync

    - by cpury
    My laptop is probably running out of CMOS battery, I know I have to fix it soon, but until then, this very annoying issue keeps me from using it. Scenario: My system clock is reset to 15/12/08 11:00 AM every time I turn on my computer. This has all sorts of side-effects, one of the more annoying being that I can't log into my gmail. At first I just waited for a time sync to happen, as I have that activated and all. It never happened. I googled and didn't find any way of enforcing a time sync, which I found very strange. Is there really none? Setting the time and date by hand is also a problem. For my 12.10 installation, the time & date settings are bugged. I remember it being for my last, older installation as well, though. Of course the easiest way should be to just manually edit the date and time fields by entering a new date. This is possible in theory, but the changes are reverted as soon as the text boxes loose focus. The other way to do it is to click the +-buttons for a long, long time. The first time I did that, the changes weren't stored either. I found out that afterwards I have to switch from manual to internet-sync mode and wait ~5 seconds until the in the top left corner of my system the new time is shown, or otherwise it won't have effect. So a nice solution would be one of the following: Setting the time/date by hand, maybe via terminal, so I can just enter the right values. Or, a command that would enforce an immediate time sync, that I can run after booting. I know I have to change the batteries soon, but this is seriously keeping me from working...

    Read the article

  • Google doesn't seem to update the description or title of my homepage

    - by Dayson
    Before we launched our website, we had set up a "coming soon" page and google picked up the title and description from its contents. So the description in the search results said, "Coming soon! Visit epicwhale.org for updates." It's been a few weeks since we launched our website. We've even created a sitemap and submitted it to google. In the google webmaster panel, the pages have been crawled and all the pages are appearing as expected on google, EXCEPT the homepage which is still not updated! The title and description of the homepage in google search results still says coming soon.. The website I am referring to is textmewidget.com and below are the images of the search result. Google: http://i.imgur.com/vAkJg.png I checked on bing too, but it appears to be fine there. Bing: http://i.imgur.com/Q8O6L.png All other pages seem to be indexed fine on google. I don't even have any crawl errors in my reports. So what seems to be the problem? I've already waited for 2 weeks. Thanks in advance!

    Read the article

  • Recent update killed unity 3d launcher

    - by Steve
    I am scratching my head on this one, a lot of things are still new to me. I updated 126 packages just now through the update manager, and upon reboot everything works fine except the unity launcher. It's just a dark space. The dash still works, as does the top panel and docky. When I try: unity --replace I end up with this and then an indefinite hang: (compiz:3689): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed WARN 2012-09-23 02:18:29 unity.favorites FavoriteStoreGSettings.cpp:139 Unable to load GDesktopAppInfo for 'ubiquity-gtkui.desktop' WARN 2012-09-23 02:18:30 unity.favorites FavoriteStoreGSettings.cpp:139 Unable to load GDesktopAppInfo for 'ubuntuone-installer.desktop' ERROR 2012-09-23 02:18:30 unity.launcher.trashlaunchericon TrashLauncherIcon.cpp:62 Could not create file monitor for trash uri: Operation not supported Initializing unityshell options...done WARN 2012-09-23 02:18:31 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-writer.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-09-23 02:18:31 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-calc.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-09-23 02:18:31 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-impress.desktop' is using a deprecated format for its actions that will be dropped soon. Setting Update "main_menu_key" Setting Update "run_key" Unfortunately I cannot make heads or tails of this. Anyone, please help?

    Read the article

  • MVC pattern synchronisation

    - by Hariprasad
    I am facing a problem in synchronizing my model and view threads I have a view which is table. In it, user can select a few rows. I update the view as soon as the user clicks on any row since I don't want the UI to be slow. This updating is done by a logic which runs in the controller thread below. At the same time, the controller will update the model data too, which takes place in a different thread. i.e., controller puts the query in a queue, which is then executed by the model thread - which is a single-threaded interface. As soon as the query executes, controller will get a signal. Now, In order to keep the view and model synchronized, I will update the view again based on the return value of the query (the data returned by model) - even though I updated the view already for that user action. But, I am facing issues because, its taking a lot of time for the model to return the result, by that time user would have performed multiple clicks. So, as a result of updating the view again based on the information from model, the view sometimes goes back to the state in which the previous clicks were made (Suppose user clicks thrice on different rows. I update the view as soon as the click happens. Also, I update the view when I get data back from the model - which is supposed to be same as the already updated state of the view. Now, when the user clicks third time, I get data for the first click from model. As a result, view goes back to a state which is generated by the first click) Is there any way to handle such a synchronization issue?

    Read the article

  • Adding a button bar at the bottom of ListView upon checkbox select (as in gmail app)??

    - by elto
    I have a ListView with custom adapter. In each row there is a checkbox and couple of textviews. I want user to give option to delete the check marked items, so as soon as soon clicks on one of the checkbox, I want a button bar to slide in from the bottom and stay at the bottom regardless of listview scroll. This is something like the email app behavior of Motorola Cliq and to some extent gmail app itself. I have tried adding a relativelayout (containing buttons) below the listview, which has visibility set to gone initially, but as soon as user checks a button, the visibility changes to "visible". I have added a slide-in animation to it too. It is working but problem is that it is overlapping the last element of the listview which user can not checkmark if the button bar has already become visible. So I tried to set the bottom margin of the listview equal to the height of the button bar when I'm changing the button bar visibility, which solves the problem of overlap, but now the checkbox behavior has gone weird. Clicking on one checkmark tries to checkmark another checkmark in the list for some weird reason. I noticed that this happens because as soon as I change the listview margin, list redraws itself, and during this new call to getView() method of adapter, things mess up. I wanted to ask if anyone has done something like this. What is the best method to add such button bar below list while keeping the slide-in animation intact. Also, What is the footer-view of listview and can that solve my problem?

    Read the article

  • how to force an illegal netmask in ubuntu

    - by user1064232
    I want to force a netmask on my Ubuntu machine. For example, I want 11.0.0.1 to get a netmask of 255.255.255.0 I tried editing /etc/network/interfaces and I forced the desired netmask, but as soon as I restarted the interfaces it changed it back to the default value. When I used ifconfig the netmask that I gave survived the interface restart but it was reset as soon as I rebooted the machine. Is there a way to force an "illegal" netmask on an interface?

    Read the article

  • DBRD dual primary Heartbeat resource management

    - by Jon Skarpeteig
    I have the following setup: Two servers with DRBD running dual primary with OCFS2 Heartbeat with two virtual ips, one for each server Round robin DNS to load balance NFS across the two vIPs Shutting down Server1 for a period of time, cause Server2 to take over the vIP for failover. However, when Server1 returns - it takes over the designated vIP as soon as heartbeat gets connection again - even though the DRBD is running sync (and thus not up to date) How can I configure heartbeat to perform failback as soon as Server1 again is in sync with Server2 ? (And not before)

    Read the article

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